Saturday, July 17, 2021

Hotels! Let me play stuff on my room's TV screen!

It has been my observation that successful hotel chains seem to always be on the lookout for new ways to positively differentiate themselves from their competition -- and thus, to attract more guests, and/or be able to charge higher rates. Such differentiating amenities range from the lavish -- such as building elaborate "pool complexes" on the hotel property -- to the simple -- a classic example being offering a warm cookie at check-in.

In this spirit: Hey, hotel chains! Here's a simple "amenity" suggestion that would get me to book with you over your competition, all else (e.g. location and price) being approximately equal: You know those nice big flat-screen TVs you've put in each of your guest rooms? It would be super great if you'd let me use that nice screen with my gaming console to play a game, or with my laptop to watch a video -- instead of, say, actively blocking my ability to do so!

Pictured: Not necessarily the optimal guest experience.

I was recently fortunate enough to be able to spend a couple of weeks traveling around Utah with my family, hiking in the national parks. Beautiful, and highly recommended! (Although if the forecast calls for 110°F+ temperatures, I recommend heading out as early in the morning as you can manage!)

Unfortunately, we had a lot better luck with the natural scenery than we did getting streaming video to work in our various hotel rooms' TVs.  I had come on the trip prepared -- or so I thought -- with a laptop and an HDMI cable, so we would be able to stream a show in the evenings after our daily adventures (or in the hot afternoons between them!).

In the trip's best-case hotel, we had a TV where I was able to reach around to the back of the TV to get at an HDMI port, then access a hidden function of the remote to change the input source on the TV, managing to get the show being streamed via my laptop to play on the TV.

In the worst-case hotels -- plural -- the TV's onboard HDMI ports had evidently been disabled entirely. Even though (peering behind the wall-mounted TVs) there were HDMI ports present on the TVs, there was no way to switch to them. The TVs were "hotel models" whose only physical control was an on/off button, and there was also no way to switch via the TV's remote controls.

This resulted in some silly situations like the one pictured above, with the family sitting around the hotel room's TV to watch some LEGO Masters -- with the TV uselessly powered off, while we huddled around the show on my laptop's small screen. 

While certainly a trivial problem in the grand scheme of things, it would nevertheless be quite a nice amenity to stay in a hotel which made it easy, instead of difficult or impossible, to play content on the room's TV screen from my laptop or gaming console, via an HDMI connection!  (And I have to imagine that this would be cheaper and easier for hotels to implement than adding more "pool complexes" to their properties!)

Sunday, April 18, 2021

ClipEmoji.com Updated With New 2021 (Unicode 13.1) Emoji

My single-page website for quickly and easily getting a particular emoji character onto your clipboard for pasting into a document you're composing, ClipEmoji.com, has been updated with the new 2021 set of emoji from the Unicode Consortium. New emoji include "face in clouds" and "heart on fire".

As of the time of this writing, these newest emoji likely aren't available on your preferred platform yet, but when they are, ClipEmoji.com will be ready!

Incidentally, ClipEmoji.com isn't strictly needed anymore. The latest versions of both Windows and MacOS now include built-in emoji pickers that can be accessed from any place where you're composing text. The keyboard shortcuts to access them are Win+Period (Windows) and Cmd+Ctrl+Space (Mac).

Still, I find myself still regularly using ClipEmoji.com while composing text on desktop platforms. You're welcome to use it, too! Enjoy! 😁

Friday, March 12, 2021

Jon's Five-Monitor Work-From-Home Desk Configuration: 2021 Edition

Although many folks are working remotely these days due to the Coronavirus pandemic, I've had longer than most to accumulate a nice desk configuration!  For the past seven years now, I've worked remotely full-time from my home in Michigan.

Here's my current desk setup:

Five-monitor Mac desk configuration

My current primary computer, a 2019 16" MacBook Pro, is the screen on the far left.  Of the other four monitors, two are connected directly to the MacBook Pro via USB-C cables; the remaining two are connected to my OWC 13 Port Thunderbolt 3 Dock -- that's the component sitting on the desktop behind my keyboard.

Delta since 2018

I didn't purchase and assemble this setup overnight! Instead, I've been able to add a part every year or so, building it up over time. This current setup is a nice improvement over my 2018 desktop configuration:

My 2018 monitor configuration

The current setup replaces that smaller rightmost monitor with a new portrait orientation monitor; the remaining monitors are the same, just repositioned.

Application layout

One reason I've opted for this setup of multiple monitors, as opposed to a single ultra-large monitor -- in addition to having had the ability to slowly purchase and assemble the setup over a period of years  -- is that the multi-monitor setup lends itself really nicely to having a particular application always be placed at a particular location.

It is a really nice luxury to just be able to just look at a particular screen to get a view of a given application, instead of having to Cmd+Tab or otherwise search through multiple windows to find an application that I'm looking for. 

Here's how I typically have my applications arranged in this current setup:

5-monitor application arrangement

Leftmost monitor

As mentioned above, this is the MacBook itself. I have it up on a stand, both to better match the vertical positions of my other monitors, and to get a little bit of desk real estate back to store some small items under the stand.

I typically have my (multi-tab) iTerm2 terminal window running on this monitor, as well as a music player in "mini" mode. 

I've been using the Mac App Store free app MiniPlay for the latter recently, and it's been working really nicely. In addition to being very similar in size and UI layout to my own "Schneider's Eleven" minimal skin for Windows Media Player that I previously used on a daily basis when I primarily developed on a Windows machine, it seamlessly supports both music player apps that I typically use, Music (formerly iTunes) and Spotify.

Left portrait-orientation monitor

This is where I view and write code! As I've blogged previously, I find it really productive to be able to view a long swath of code at once on the tall monitor.

 (An exception is when I'm pairing with someone over screen-sharing software, since most of my peers don't have a portrait-orientation monitor. In that case, I typically drag the IDE over to my primary monitor.)

Bottom landscape-orientation monitor

This is my "primary monitor". I keep the Mac's Dock on this monitor. I typically have my main web browser window open on this monitor. 

I'm currently composing this blog post on this monitor. 😁

Top landscape-orientation monitor

As mentioned in my 2018 post (and more visible in my 2018 image above), this monitor is mounted on a pole anchored to my desk via a WALI Extra Tall Monitor Desk Mount. 

Sometimes I've got nothing happening on this monitor -- when I'm sitting, I have to crane my neck just slightly to look up at it -- but when I need a place to put some secondary window like a database/SQL query window, a code diff, or just another browser window, it's another place I can do so without obscuring any of my other open apps!

Right portrait-orientation monitor

This is where I keep my communications windows. The bottom portion is dedicated to Slack while I'm at work. I use the top portion for other communications apps like Messages and WhatsApp.

Phone stand

The small, portrait-orientation "screen" in front of my MacBook is an iPhone 12. I finally caved and bought myself a new phone, replacing my venerable iPhone 6S. Despite the lamentable lack of headphone jack technology, I have been otherwise been enjoying the improved battery life and memory on the new device.

The phone's "stand" is a magnetic wireless charger from Choetech, which takes advantage of the new MagSafe technology in the 12. (The phone's position while on the stand doesn't actually obscure any of the area of the MacBook monitor behind it when I'm sitting at my desk, as it appears to do in this photo.)

The app that you can see running on the phone is my own free App Store app, Desktop Journey.  I developed it because I wanted my phone to be doing something useful while sitting and charging in its stand on my desk. I figured an at-a-glance "dashboard" view of the time, my next calendar event, my current Reminders app reminders, the weather, and occasional prompts to stand up and stretch or do a few reps of an exercise would be ideal. 

After failing to find such an app anywhere on the App Store, I decided to build it myself, and created Desktop Journey! It's a completely free and ad-free app (except for the weather functionality, to help cover my costs for the non-free weather API that I'm using to query global weather data), and collects no personal data. Free Desktop Journey download on the App Store.

Small top-left screen

The last remaining little screen, at the top-left, is a Raspberry Pi running Pi-Hole, a new addition to my home network, a Christmas gift from my wife Melissa this past winter. With my local high-speed Internet monopoly having started imposing a bandwidth cap -- which my family regularly bumps up against, just through normal everyday usage -- I'm happy to take advantage of the opportunity to save some bandwidth by declining to send outgoing telemetry and requests for ads from my local network.

Wallpaper

The image is of Peyto Lake at Banff National Park, which my family had the good fortune to be able to visit in 2019. Banff -- along with the other nearby national parks in Canada, Jasper and Yoho -- is the most beautiful place I've ever visited. I hope to be able to go back and visit again someday!

As MacOS still lacks built-in support for spanning an image across multiple monitors, I used the App Store paid app Multi Monitor Wallpaper to generate this wallpaper.

Friday, February 19, 2021

Easy one-handed Control Center and Notification Center access on iPhone 12/11/X

 I finally opened up my wallet and replaced my aging iPhone 6S -- fare ye well, headphone jack -- with a new iPhone 12. It's my first purchase of a brand new iPhone since buying an iPhone 5S, all the way back in 2013. (I had bought the 6S secondhand, via a seller on Swappa.)

While I'm finding the 12 to be a nice upgrade, one big usability regression jumped out at me in the early going: The difficulty of activating Control Center. (That's the screen where you can adjust volume and brightness, enable/disable wi-fi and Bluetooth, and so forth.) 

On the 6S, activating Control Center was easily done while holding the phone in one hand, via an easy swipe up from the bottom of the screen. On the 12 -- which has no Home button -- that gesture now navigates to the Home screen. Control Center is now activated via a swipe down from the top-right corner of the screen. 

The 12's larger size makes that gesture difficult to perform one-handed. Compounding the problem, although I'm right-handed, I use my left hand when operating the phone one-handed -- so that top-right corner is unreachable without substantially shifting my grip on the phone (which increases the risk of fumbling it).

With its generally very good support for accessibility features, I figured Apple would provide a simple option somewhere in Settings to swap that top-right-corner gesture for the top-left-corner. Unfortunately -- at least as of iOS 14 -- there is no such option.

The solution

To the rescue comes a configurable accessibility gesture pointed out by @temptertemper: The "Double Back Tap". Under Settings → Accessibility → Touch → Back Tap, you can set a firm "tap tap" performed on the back of your phone to perform one of a number of options -- including bringing up Control Center!

That double-tap is easily done with an index finger, while still securely holding the phone in a one-handed grip. In the early going, I've found the double-back-tap to be a much easier-to-perform alternative to the stock swipe-down-from-top-right-corner gesture.

Triple-back-tap is also assignable from the same place in Settings. I've assigned that to bring up Notification Center, which is also by default activated by a swipe down from the (distant) top of the phone screen.

Thanks to @tempertemper for this great suggestion, which I expect to be a nice quality-of-life improvement in daily use of my new iPhone!

Monday, February 15, 2021

Interview: Amanda Schneider Milne, Software Developer / Manager / Executive

 

I’m super proud of my mom, Amanda Milne! She was among the first to earn a degree in Computer Science from the University of Michigan, has worked in the field of software development her entire career, and worked her way up to become president of her own custom software development company here in Michigan, and later on, a Senior Vice President of a Fortune 500 company.



This is an interview with Amanda about her early years in software development, back in the 1970s and 1980s, and about one project in particular that I remembered her doing from my days as a grade school kid.


You were among the first Computer Science graduates at the University of Michigan, right?


I was! I graduated from Michigan with a Computer Science Degree in 1974. The Computer Science degree program was fairly new back then. We had no textbooks, just mimeographed handouts (which I wish I’d kept!). 


Nearly all of our work was done on an IBM System/360 Mainframe Computer, primarily by submitting our code on punched cards via a remote card reader. I took one class on a DEC PDP-8 Mini Computer, and I learned to build logic boards by soldering chips in an elective Electrical Engineering course. The programming languages were primarily Fortran and Assembler. 


Only 43 of us graduated with a Computer Science degree from U of M in ‘74. Fun Fact: I graduated without ever actually seeing the IBM System/360 Computer!


What did you do after graduation?


I worked as a Programmer for various companies (and customer accounts). 


My first assignment was to single-handedly write the real time process control code to run a custom carburetor test stand for Oldsmobile.  The computer was a16-bit Modcomp mini computer with 16K of memory, and no disk! When I started that project, I knew nothing about Modcomp computers, their operating system, their language -- or what a carburetor was! 


I wrote the code in an Assembler level language, and loaded my compiled code into the machine via paper tape.  When I found a bug in my code, I wrote the fix, de-compiled it by hand, converted it to hexadecimal, and keyed the fix into memory using 16 binary switches. 


Writing process control code was fun because I could actually see my code working as it opened and closed mechanical valves, and turned stepping motors. I was only 21, but I did successfully complete the project.


That’s pretty amazing! As a developer these days, there are so many layers of indirection between code we write, and what’s actually happening at the hardware level.  You actually got to add instructions to memory directly, with no steps in between! (And without Google or StackOverflow to help you know what to do!)


After that, you worked at a startup called Custom Software Services, right? What was your role there?


In 1981, Custom Software Services, a programming consultancy startup in the Detroit area, hired me to work part-time on a two-month project. I only had 3 years of programming experience at the time, because I took a 4-year break when you and Jeremy were born. My assignment was to single-handedly develop a daily Profit and Loss system for a local restaurant chain on an IBM Series/1 Computer (a 16-bit mini computer with the EDX Operating System), using a low level language called EDL. At the time, CSS had only one employee. After the project was completed, I stayed on to work on other projects. After 4 years, I went full time as a programmer. 


Highland Superstores was a big appliance sales company back in the 1980s, right? What was the project that you did for them?


Highland Superstores was a national chain of 100 appliance stores selling TVs, electronics, washers, dryers and refrigerators. In 1987, the Internet did not yet exist. Highland Superstores wanted a networked Point of Sale (POS) system in all of their stores, and headquarters. The system would track their inventory, daily sales, gross margins, commissions, and so forth.


Highland Superstores wanted a system to enable the salespeople on the floor to negotiate pricing, view how a lowered price negatively affected their own commission, check accurate up-to-date store inventories, sell the items, and schedule delivery. 


Before this system, a salesperson had to leave the customer (or make a phone call) to check inventory in the back of the store. Salespeople had no idea if the next closest store had the item in stock that his customer desired. It was important to Highland to have up-to-date inventories of ALL of their stores available in each store. With this feature, a salesperson would be able to sell the item, and send the customer to the next closest store to pick it up.  


The POS system in each store had to communicate and update the headquarters computer every 15 minutes. It also had to download inventory updates from the other stores every 15 minutes.


How did IBM get involved in this project? 


Highland Superstores had spent 2 years working with another local software company to develop the POS system using PC LANs, but it wasn’t working and Highland was getting frustrated. 


Rick Teague, Highland’s IBM Salesperson, told them that putting an IBM System/36 in each store, all communicating with an IBM System/38 at their headquarters, would work.  The hardware was up to the job.


With no Internet, how did this kind of communication work? Dial-up modems?


Yes, dial-up modems. The POS system had to dial the headquarters IBM System/38 every 15 minutes, establish a connection, upload the local store inventory, and download updated inventories from the other 99 stores.


You mentioned Highland was getting frustrated? What was the issue with the other company’s in-progress implementation?


Well, they couldn’t get their PC LAN system to work. If I remember correctly, their software could perform  the in-store functionality, but it had a great deal of trouble getting the communications with headquarters to work properly and quickly.


So how did you, and CSS, get involved in this project? 


The IBM System/36 hardware solution was a good idea, but there was no POS software to run on that platform. Since Highland Superstores had been paying another software company, they weren’t willing to fund another software development project on a different platform.


Rick said, “If I can get your POS system up and running in one of your stores on an IBM System/36, will you buy 100 System/36s?” Highland Superstores said maybe, provided they didn’t have to spend any money for the trial, and that the system would be up and running in the pilot store in 90 days! 


Highland Superstores also made it clear they were keeping their focus and money on the PC LAN-based solution. The new IBM System/36-based solution would have to out-perform a solution that had a two-year head start! 


IBM approached several software companies in the Detroit area, and asked if they would be willing to develop the POS system for free, demonstrate that it worked, and then hope to get paid afterwards. They all said “No”... except my boss, Don George, who owned Custom Software Services.


Our company had about 15 employees at the time, business was slow, and we were in danger of going under.  Don was an ex-IBM Systems Engineer, so he knew the guys in the local IBM office. He sat down and had some serious discussions with them about the project, and then he decided to take on the risk and tackle the project. I got involved when my boss asked me to manage the project.


That does sound like quite a risk! What was it like working on a project, and leading a team, that would have a zero payout for everyone involved if it wasn’t successful? 


It was extremely challenging. We couldn’t afford to pay a team of developers to write the software, so Don came up with a creative idea to share the risk. He offered several local developers a double-or-nothing deal. If they signed on with our project, we’d track all of their hours, and then pay them double their going hourly rate at the end -- if it was successful and Highland Superstores purchased it. If not, they’d get zero. 


Surprisingly, he found 7 developers who were willing to take his offer, but they all had to keep their day jobs. So, they worked on our POS project nights and weekends. 


And you were in charge of managing this? How did you approach that? 


I was 34 years old, and this was my very first project management assignment. The first thing I did was to read 3 books on project management. I knew that the project would be very difficult, and that I’d have to use every bit of education, new knowledge, guts, and perseverance I had! 


As it turned out, it was even more stressful, and challenging that I’d first thought. The project lasted 5 months, not 3. At the 90 day mark, we had accomplished enough that we earned another month or two as a grace period. 


The developers and I were all working 2 shifts, 7 days a week. Over that summer, none of us had any family time, or vacation time. There were many days when I came home late at night, dropped my clothes on the floor and fell into bed. Then, the next morning, I showered, grabbed clean clothes and was gone again. We worked 2 shifts, 7 days a week. The good news is that as the project progressed, everyone had more skin in the game. The developers saw their potential earnings mount, and became more and more unwilling to walk away. 


When we had the code (in the RPG language) running on a remote IBM System/36, IBM installed a System/36 in one of the Highland Superstores (for a free trial), and we spent about a month troubleshooting and debugging the software in a live store environment.


That must have been exhausting! How about the flip side? Was there a best part about the project?


Yes! No scope creep! This was the only software development project I’ve ever worked on with zero scope creep. 


We didn’t realize at first, how important this would be, but it was one of the biggest contributors to the project’s success. There was no scope creep because Highland Superstores had already invested 2 years in hammering out the functionality of the system. All we had to do was design and develop our code to exactly produce the same POS interface, files and results. 


Also, we were all working for free, so we had added incentive to stick to the exact specs. There were many, many times during the project that someone involved would suggest a change or improvement, and my answer was always ‘No’. 


The project team was all men… except for you! What was that like?

 

Amanda (far right), her team, her boss (Don, far left), and a few IBMers at the project kickoff meeting.



I don’t know what it was like for the other people involved. I can only tell you that I really didn’t think much about being the only woman, except on two occasions. 


The first time was at the beginning of the project. I knew I would be managing a team of all men, and that I had never managed a project of this scale, scope or importance before. I knew I had to establish credibility - and authority right from the start. So, I called a Project Kick Off Meeting and I invited all of the developers, and the local IBMers. 


At the meeting, I laid out the project plan, the timeline, the assignments, and the project ground rules. After the meeting, one of the IBMers told me it was the best kickoff meeting he’d ever attended.


Amanda with 2 IBMers and John, a fellow employee


The second time it mattered to me that I was the only woman, was during the roll-out phase of the project. At that point, our software had been awarded the contract, and I had a team working at the Highland Superstore headquarters to help install the software in all of their stores. 


We were all working long hours, and it was very stressful - getting the hardware and software up and running in 100 stores nationwide before the Christmas shopping season. One evening after most people had gone home for the day, one of the IBM Managers got into a heated argument with one of the Highland Superstores Managers -- they were yelling and screaming at each other so loudly, someone called security to stop them before they started hitting each other. 


A week or two later, I raised my voice in a meeting, and I was accused of ‘being emotional’!! No one ever said the screaming men were emotional, but I was accused of being emotional, which I thought was very unfair.


That’s super lame. I’m very glad there is generally more awareness in corporate environments in general, and in the software development industry in particular, about the unfairness (and lameness) of those kinds of double-standards. I’m hopeful that if either of my daughters get into the industry when they grow up, the state of things will be such that it won’t even cross their minds to be concerned about that kind of issue.


Were there any particularly memorable challenges during the project? 


Lots! At one point, a certain bug was making us all crazy. I solved it when I noticed -- on the old dot matrix print-outs we used at that time -- that there was a letter O where a 0 (zero) was supposed to be in the code. 


The worst was when my lead developer, who was working on the critical path, decided to walk off the project when we were about ⅔ through development. That surprised me, and freaked me out. Especially since, although I was a developer, I didn’t know RPG, and wasn’t able to jump in and take over his code myself.  Luckily, another of the developers on the team agreed to step up and successfully took over his portion of the code. 


Another time, in the middle of the project, Northwest Airlines Flight 255 crashed shortly after takeoff from Detroit Metropolitan Airport killing all six crew members and 148 of its 149 passengers -- including a family member of one of our software developers. We were all horrified, but we soldiered on. 


What wisdom would you share with people working on software projects today?


Make sure to keep an open mind, open communications, and always hear both sides of the story. 


I remember one time, the customer came to me with “evidence” that one of my developers had deliberately caused a significant problem in the code. Upon seeing the evidence, I too became very upset, and thought about firing him on the spot. 


But, I calmed myself down and went to talk with the developer in question. I asked him to tell me about the day, and code in question -- just tell me what happened. His description threw a completely new light on the situation, and made it clear that he was not trying to sabotage the project. I was then able to explain it to the customer, and keep the project going. 


Another lesson is one I learned was from Rick, the IBM salesperson. One evening, after a team meeting at my home, we were in my driveway talking about the odds that Rick had to surmount to get this project started. With great persistence, Rick had spent months and months calling on Highland Superstores before they even began to consider his pitch, and a possible IBM-based solution. 


During our talk. Rick picked up a basketball and started bouncing it while he walked down my long, curved, sloped driveway. When he neared the street he said, “You have to be optimistic. You’ll never get a parking spot closest to the mall entrance if you don’t drive down the first row. You have to take a shot.” Then, without turning around, with his back to the basketball hoop, he shot the basketball one-handed, over his head -- and the ball swooshed through the basket!! I will never forget that moment!


How did it all turn out in the end?


Well, it was a true horse race right to the end. After 5 months of working grueling hours, Highland Superstores made the decision to scrap the PC LAN-based system, and purchase ours! 


Testing the software in a live store environment


We were ecstatic. We all celebrated with an impromptu party. Over the following months, Highland Superstores successfully installed an IBM System/36 and our software in all 100 stores. 


Rick, the IBM Salesperson was handsomely rewarded with commissions on all of those machines. My boss, Don paid each of the software developers double their hourly rate for every hour they worked on the project. 


And me?  Don promoted me to VP of the company, gave me a $25,000 bonus, a new car, a Caribbean sailing vacation, and the opportunity to purchase a minority stake in his company -- which I did!


I’m so impressed that you were able to do all of that! I’m super proud to have been able to follow in your footsteps, in having a career creating software to solve problems for people!


Thanks, Mom, so much for taking the time to do this interview and share this part of your story!

Sunday, February 07, 2021

Why Not Take a Break?

Here's a graphic that I whipped up today, which I thought would be fun to occasionally post on social media sites, to appear in folks' feeds as they scroll though posts:

Why not take a break? You can stop scrolling this feed by pressing your phone's Home button.

I was amused by the contrast between Nintendo including the original version of this image in a couple of their games -- most notably Wii Sports -- and the hypothetical likelihood of any of the big social media companies inserting some content like this into their users' feeds.

(Anecdotally, I've heard that Facebook, at least, tends to favor implementation of new features that increase the amount of time that their users spend scrolling through their feeds -- of which something like this, encouraging their users to stop scrolling and take a healthy break, would be the opposite!)

It was pointed out by my wife that modern phones -- including the one that I photoshopped into the image in place of the original Wii Remote -- do not actually have home buttons. As the proud carrier of an iPhone 6S, this admittedly didn't even cross my mind. I'll just leave it there as an intentional anachronism, hearkening back to the time of the Wii's popularity. 🤷‍♂️

In any event, feel free to share this image onto your own social media feeds, should you be so inclined!


Friday, January 22, 2021

Can we make Cmd+Z undo Cmd+V (only)?

Hey developers! If you're fortunate enough to be doing greenfield development on a new text editing app or component, I have a quick feature request for you!

In all existing text editors and text fields that I'm aware of, if you do the following:

  1. Key in some text.
  2. Append another piece of text via a press of Cmd+V (Ctrl+V on Windows) to paste from the clipboard.
  3. Press Cmd+Z (Ctrl+Z on Windows) to undo.

What happens is that both the pasted text, and some or all of the keyed-in text, get removed.

What I'd like to have happen is for only the pasted text to be removed. The keyed-in text can be removed upon additional Cmd+Z press(es).

I bump into this problem quite frequently when I Cmd+V to append something to some text I'm in the middle of composing. I see that the wrong thing was on the clipboard and got added to the text, reflexively hit Cmd+Z to try and undo that mistake -- and now I have two problems, because some of the text that I had keyed in got removed along with the incorrect pasted-in value.

It would be super fun to have this no longer be an issue in the text editors of the future. Thanks in advance! 👍

Monday, January 18, 2021

Controversy corner: Wired earbuds vs Airpods

This is a "just for fun" post on the pros and cons of traditional wired earbuds vs Apple AirPods for everyday use. 

Hat tip to my brother Jeremy for inspiring me to finally put this post together. He was recently seen on Instagram rocking some sweet wired earbuds, even though he's retired, and has sufficient discretionary funds to buy himself AirPods, if he so chose!


Wired Earbuds

Apple AirPods

Price tag 💸

✅ From around US $10-15 💰

US $159+ 💰💰💰💰💰💰💰💰💰💰

Ease of switching between multiple devices (e.g. iPhone 📱 and MacBook 💻) 

✅ Plug them in

Fiddle with the Bluetooth settings menu

Troubleshooting pairing issues / charging issues / audio issues

✅ 100% reliable

Seldom, hopefully...?

Charging ⚡

✅ Never needs charging

Up to 5 hours listening per charge; requires charging case + Apple lightning cable or wireless charging mat (💰)

Anxiety when they get lost 😰

✅ Shrug and buy a new pair

High

Works with Nintendo Switch, the treadmill TV at the gym, the entertainment systems on airplanes

✅ Plug them in

No; can work around with Bluetooth adapter (💰)

Battery lifespan 🔋

✅ Unlimited

2-3 years

Audio quality 🎶

✅ Great

✅ Great

Can simultaneously charge device 🔌 and listen

✅ Yes (on devices with a 3.5mm jack, like my iPhone 6S)

✅ Yes

Risk of inadvertently getting yanked or knocked out of ears 👂

Wires can get caught when doing chores

✅ Minimal 

Works with newer iPhones

Dongle needed 🙄

✅ Yes 🍎💰


Looks like AirPods win in a landslide! Let's all throw away our inexpensive, never-needs-charging, high-fidelity earbuds, and buy AirPods! 😜

For clarity, I am indeed perfectly aware that the ship has (for the most part) sailed on this debate. Apple, at least, doesn't seem likely to release a new phone ever again with 3.5mm headphone jack technology, when they could sell the folks buying that phone $160 AirPods instead. I stand by my entitlement to my (unpopular) opinion on this topic regardless. 😁

Friday, January 08, 2021

Configuring git to prevent commits of temporary/debug code

Developers, have you ever embarrassingly pushed a commit that inadvertently included temporary debug log/print statements, or other code that you intended to remove before committing? I have!

I wondered if it was possible to add some keyword to a code file -- for example, DONOTCOMMIT -- which, if present, would cause git to automatically reject the commit. This could be added as a comment alongside any temporary debug code, to make it impossible to forget to remove that code before committing.

It turns out that it is possible to do this -- and have it apply automatically to all of your local git repositories -- using a git pre-commit hook.

Quick instructions

(The specifics in these instructions apply to Unix-like filesystems, including Mac OS.)

1. If it doesn't already exist, create the directory: ~/.git_templates/hooks/

2. If it doesn't already exist, in that hooks directory, create a text file named: pre-commit (no extension).

3. Add the following content to the pre-commit file:

#!/bin/bash

FOUND=$(git diff-index --cached -U0 HEAD -- | grep DONOTCOMMIT | wc -l)

if [[ $FOUND -gt 0 ]]; then
    echo "pre-commit hook: DONOTCOMMIT detected, commit not allowed"
    echo "(enforced from: ~/.git_templates/hooks/pre-commit)"
    exit 1
fi

4. To apply that pre-commit hook to all git commit operations on your local machine, from the terminal, run:

git config --global core.hooksPath ~/.git_templates/hooks

References

Credit to https://github.com/mudrd8mz for the pre-commit hook code.

Credit to https://stackoverflow.com/users/6309/vonc for the core.hooksPath global git config command.