Ramblings from a Researcher-In-Training

Peer Reviewed

Posts in Productivity
What's Your "Best Practice Alert"?

Nebraska Medicine — the largest healthcare provider in the state of Nebraska, and the clinical partner of my university, UNMC — recently implemented changes in their electronic health record system to reduce the rate of opioid overdoses in our community. From the Omaha World Herald:

In August, the health system added an advisory to its patient records system, known as One Chart, that alerts health care providers ordering opioids for patients who meet certain criteria to also prescribe naloxone for them.

Naloxone is a rapid-rescue medication for opioid overdoses, blocking the receptors in the body that opioids typically bind to. By creating this automatic "flag" in the electronic health record whenever a physician enters an order opioids — the tiniest of automation additions to this workflow — Nebraska Medicine may well save hundreds of lives (emphasis mine):

Since the alert launched in August, the number of prescriptions for naloxone filled at the health system’s pharmacies has increased from 36 in the five months before the move to more than 1,290, said Dr. Alëna Balasanova, an addiction psychiatrist with Nebraska Medicine.

More than 200 Nebraskans died of drug overdoses in 2020, an increase of nearly 43% from the previous year, according to a report last summer from the federal Centers for Disease Control and Prevention.

Given that I work at UNMC and have set up a similar targeted alert in the electronic health record (called a "best-practice alert"), I can tell you how simple these tweaks are on the user's end. Usually, it's just a quick pop-up window triggered by certain criteria (in this case, an opioid prescription and the presence of certain respiratory risk factors) that alerts the clinician to a best practice. It's a pretty straightforward system with the potential for serious impact; even a single overdose death prevented with naloxone stemming from this best-practice alert would be well-worth the automation effort.

The same principles can be applied to our personal workflows (though of course with considerably lower stakes). Recurring reminders in Due, clever Shortcuts automations, elaborate smart home systems, or random encouragements from Affirmations — all of these "small" systems we build up around ourselves can have real impacts on our efficiency, our effectiveness, or just our happiness; "bulwarks against madness" erected over months and years. Not every procedural pop-up has to prevent something as serious as an opioid overdose; your "best practice alert" could simply be a morning reminder to take your medication or a "Left Behind" notification for your wallet tracker. My point in all of this being: none of these improvements are possible if you don't stop to ponder your system from time to time. Someone at Nebraska Medicine took a moment to evaluate their system, identified a 10-second tweak, and 36-times more naloxone is now being distributed to the community. Take a moment today to consider your systems, and ask yourself the question: "Where might a 'best practice alert' make my life better?"

A Shortcut for Generating Local Timestamps in Discord

I spend a lot of time in Discord — at this point, it is probably my most-used social media app. Part of this is certainly due to the fact that I help moderate the Relay FM Members Discord; a delightful and international gathering of like-minded nerds. Because of this diverse and widespread community (and the occasional live-streamed event therein), handling timezone conversion is a frequent occurrence; like sharing a keyboard group buy date or marking the next live podcast stream on your calendar. Luckily, Discord recently added Unix timestamp message formatting, which allows you to send a string that automatically displays the appropriate client-side time. So, instead of saying "Hey, the game is on August 20th at 12PM CDT" and everyone translating on their end, I can instead say "Hey, the game is on <t:1629478800>" and Discord natively parses that Unix timecode (wrapped appropriately) into the end-user's local time. It looks something like this:

A screenshot of a Discord conversation demonstrating the timestamp feature.
Using the Unix timecode for a date/time automatically displays the end-user’s local time — so Zach sees 1PM EDT!

But of course, who can convert human-readable time to Unix time (seconds since midnight UTC on January 1st, 1970) on the fly? I know I can't — but Siri Shortcuts sure can!


Is this article helpful? Consider saying thanks by buying me a coffee!
Buy me a coffeeBuy me a coffee

Generating Unix Time in Shortcuts

This sort of thing is exactly what Shortcuts is great at — taking otherwise-tedious but ostensibly-handy tasks and mostly removing the tedium. In this case, I made a Shortcut that can quickly generate the Unix timecode Discord needs to do its client-local-time magic. I started simple: I wanted a Shortcut to take the Current Date/Time, convert that to the Unix timecode, placing it in its home within the <t:[timecode]> format, and copying it to my clipboard. That only took three Shortcuts actions:

Screenshot of a simple Siri Shortcut to generate the Discord timecodes.
Starting simple is usually where I begin when making a new Shortcut — the fewest actions possible to get the result I’m looking for.

But of course, once the most basic form of a Shortcut was there, I got to thinking about improvements and edge cases. For starters, I also wanted to be able to pick something other than the current date and time — pretty straightforward change, I just swapped in a Choose Date action, which covers both Current Date and arbitrary dates quite nicely. Then I added in the ability to scan your clipboard for text containing a date — in the case where I might want to copy a message out of Discord and quickly convert the date in said message. Apple handily provides a Get Dates From Input action, which is usually smart enough to pick out dates and times from fairly lengthy strings of text (I think it’s the same system that detects dates in iMessages). A little bit of error handling, and some extra actions to automatically reopen Discord and give some helpful notification feedback, and the final shortcut for this simple Discord trick is ready!

Four screenshots of Shortcuts actions for the Discord Timestamp Generator shortcut.
A simple three-step shortcut can quickly turn into 37 actions, error handling, and decision trees!

Now, when I’m sharing an event in Discord (or reading about one), I can quickly convert the date & time of that event into a more useful format for everyone in the server with just a quick tap of a button.

Shortcuts And Systems: Start Simple, Then Sprawl

I wanted to write about this Siri Shortcut for an obscure Discord feature not so much because I think tons of people will find it useful, but more because it illustrates well how I typically end up using Shortcuts: I have a small “mosquito task” type of problem that I can solve in a few Shortcuts actions…but then I really solve it by taking the time to fully flesh-out the Shortcut. I start small, and then build out the tool to be more all-encompassing and hopefully anticipate the needs and problems of Future-Me. I find that I follow similar patterns in a lot of areas where I’m problem solving: find the “last step” of the solution, so to speak, and then build out a system around that “last step” to anticipate unforeseen circumstances. I think this sort of thinking can be helpful for people trying to create systems for themselves but don’t end up using them — sometimes, you need to take the time to make your system as appealing as possible for Future-You to actually get them to use the system you’ve built them.

The Perfect Tool Doesn't Exist

Brent Simmons with some tough task manager truth on Inessential.com:

There’s no perfect system for anybody. All of these apps are pretty good, and you may find one fits you better than another, but you’re not ever going to make it the perfect system for you. Even if you started from scratch and wrote your own, you’re not getting the perfect system.

He is, of course, absolutely right: OmniFocus, Todoist, TickTick, Things, Microsoft To Do, Reminders...name 50 more productivity systems and they will all share in common their infuriating imperfection. Luckily, none of us need perfection — what we ultimately need from our tools is for them to measurably assist in whatever work we are doing with an acceptable assortment of trade-offs. This stretches well-beyond task managers: I certainly don’t have the “perfect” table saw — in fact, I’m sure that such a saw doesn't exist! But the one I do have adequately addresses my needs (as they are now), but constantly requires me to work around its limitations.

That’s life in a nutshell: Imperfect people making imperfect things with many, many imperfect tools. The tools might improve, sure, and you might stumble upon a better one from time to time — but never the magic bullet. So stop chasing the dragon of the “perfect” task manager (or the “perfect” anything, really) and instead take a moment to be content with what’s working for you right now.

Reviewed: The El Gato Stream Deck

Everyone is always looking for a faster way to get something done — whether that be adding Siri Shortcuts to your workflow, third-party automation applications like Keyboard Maestro, or fancy macro pads with complex actions and keyboard shortcuts assigned to each key. Perhaps the most popular entrant in the world of customizable, quick-action macro pads is the Stream Deck from El Gato. As you might guess from its name, the Stream Deck is particularly ubiquitous among Twitch streamers for quickly switching between camera inputs or playing radio-show style soundboard clips; however, its 15 (or six or 32) LCD-backed buttons contain plentiful potential for everyday users as enablers of enhanced efficiency.

A photo of the Stream Deck.
My Stream Deck lives just above my mouse for easy access to all of my configured actions.

Colorful Shortcuts, Dead-Simple Setup

On the most basic level, the Stream Deck is grid of buttons that can be configured to trigger actions using El Gato's accompanying software; pre-installed actions range from common Twitch streaming tasks (starting a recording, soundboard actions, changing video sources) to actions that talk with your system (multimedia controls, Open-a-File, or just a simple hotkey). For instance, I have my Stream Deck set up to always show me a few multimedia controls: a Play/Pause toggle, Volume Down, Volume Up, and Next Track. Since my keyboard doesn't have built-in multimedia keys, I've added them to my Stream Deck so I can still quickly control Spotify while I'm working. Setting up one of the buttons as any generic keyboard shortcut is super easy: Just drag the Hotkey action to one of the squares in the Stream Deck software, record your desired hotkey, and give it a name. Just like that, you have a dedicated button that can instantly invoke Alt+F4 (Or ⌘Q for you Mac folks) to close the current program. Have a more advanced process that uses two hotkeys to switch between two "modes"? Use the built-in Hotkey Toggle action to record two hotkeys — one for each mode — and the Stream Deck will switch between them each time you press the button, displaying a different icon/image depending on the state of that button.

Speaking of images: The Stream Deck software makes setting a custom image for each of your physical buttons (or one button's toggle states) as easy as, well, finding the right image! El Gato has created a dedicated web tool that allows you to quickly create Stream Deck icons with a wide assortment of available glyphs and colors. Make yourself an aesthetic palette of hotkeys, launcher buttons for frequently-used applications with their logos, or a page of friends' faces where each button starts a Skype or Zoom call. What might seem like a pretty basic feature is actually the most distinguishing aspect of the Stream Deck; customizable images add a crucial layer of information to your hotkeys, and the ability to dynamically change those images based on a toggle state (or even self-updating background processes) turns a simple array of buttons into an interactive information dashboard. For example, I have a key that toggles the system-wide Mute state of my microphone; when the mic is "hot" the background is green, and when the mic is muted the background switches to black and the microphone icon gets crossed out. Though an incredibly simple button, always having a visual cue when my mic is live is an invaluable quality-of-life improvement.

Two screenshots of Stream Deck button settings, and Multi-Action setup.
Each Stream Deck action is customizable to an extent, from its icon to its functionality — and Multi-Action setup is very similar to creating a Siri Shortcut.

You can also designate individual keys on your Stream Deck as Folders or Multi-Actions — the former to help organize actions into separate "pages" on your Stream Deck, and the latter to chain multiple separate actions together behind the click of a single button. Both of these features can be super useful if they fit with your mental model for hotkey organization, or if you want single-click triggers for many individual tasks; that said, I don't personally use either in my Stream Deck setup — I much prefer taking advantage of a more automatic organization strategy.

Contextual Quick-Actions

The real magic of the Stream Deck is a bit buried in its settings pane in the form of Profiles. Profiles are basically saved Stream Deck configurations that you can switch between depending on your context. For instance, when you are transitioning from a day of work into a night of Twitch streaming, just swap to your “Streaming” profile and all of the buttons on your Stream Deck will change configurations. But, here’s the real gem: Each profile can be “matched” to a specific application on your computer, and will be automatically switched to when that application is in focus. What this means in practice is that you can configure app-specific Stream Deck configurations that surface your most-used shortcuts in different individual applications right when you need them.

A screenshot of the Stream Deck Profile editor settings.
Creating Profiles for your most-used applications allows your Stream Deck to intelligently present actions as you bounce between projects.

I have separate profiles configured for Outlook, Discord, iA Writer, Apex Legends, and Chrome, all presenting a number of useful quick actions I might need when using those application. My strategy is to duplicate the bottom row of Stream Deck keys across all of my profiles for actions I want accessible no matter what I am doing (like my Multimedia controls), and the top row of my Stream Deck is constantly changing depending on what app I am working in. In Outlook, I can quickly Archive messages or open a specific recurring calendar event I revisit often; in iA Writer I have a few esoteric text snippets (α, β, ⌘, and ) mapped to Stream Deck keys so I can stop copy/pasting them off of Google, and in Apex Legends I have a button that saves the last 10 minutes of game play to folder for particularly good clips I might want to share. Every time I change my computing context, my Stream Deck quickly flashes a set of readily-retrievable actions that will always be relevant to that specific context.

A .gif of various Stream Deck profiles and their changing key layouts.
App-specific Profiles on the Stream Deck allow you to create contextual dashboards that automatically appear right when they are needed.

I consider Profiles to be one of the best ways to use the Stream Deck because they allow you to pre-define what actions you find useful in a given application, and those actions will be automatically surfaced — complete with helpful visual icons and text. Many people swear by memorizing complex, claw-handed keyboard shortcuts to streamline tasks in various contexts, but I've never been able to fully wrap my head around any but the most basic of keyboard shortcuts (like copy & paste). The Stream Deck allows me to find out what shortcuts I am missing out on in a specific program and deliberately create a hotkey to activate that shortcut...without having to memorize each and every modifier key incantation. And when my workflow changes or if I discover a new useful shortcut, incorporating it into my everyday use is as easy as mapping it to an available key for that specific app's Stream Deck Profile. No memorization, no complex finger stretching — just the click of a clearly-labeled LCD button to trigger a simple (or complex) action with no fuss.

Plugins, Integrations, and Endless Possibilities

So far things are fairly straightforward: You can make a button do a thing, toggle between two things, or do many things, and you can have the buttons appear when specific applications are open. Easy enough, right? Well...it is if you stick to the pre-installed plugins that El Gato provides — but if you start to explore the library of third-party plugins in the built-in “store”, things can quickly get out of hand (in the best possible way). The complexity of these third-party plugins ranges from an unassuming stock ticker tracker that updates every minute with the new share price, to plugins written specifically to control certain smart home accessories via the Stream Deck, all the way to plugins like API Ninja that allow you to send HTTP requests to arbitrary web APIs even with complex JSON or XML payloads — you can even point the request to a local file as the source of the payload, and authenticate if need be. If you have the patience, you can create a handful of Stream Deck keys to fully control a service like Toggl using its web API in conjunction with API Ninja — the plugin even allows you to change the appearance of the Stream Deck key based on the API’s response to your request.

If the available third-party plugins don’t cover your needs, another option for more powerful Stream Deck integrations is the “Domino Strategy”: triggering a second piece of automation software with the push of a Stream Deck button. Keyboard Maestro is a good example; it natively supports individual Stream Deck keys as triggers for any of its actions, and it has many actions capable of automating a wide array of tasks on the Mac. Another (extremely advanced) option is Companion from BitFocus — a locally-hosted server that can translate your Stream Deck button-presses into complex interactions with a wide range of hardware and software platforms, other local server-based systems like Home Assistant, as well as generic HTTP requests, all while fostering an open-source development community for tackling other wacky and unique use cases.

Ultimately, a single Stream Deck button's potential is functionally limitless. Even if the most advanced plugins and integrations listed above somehow remain insufficient, you can always write your own plugin using the Stream Deck SDK or simply point a Stream Deck button at an executable Python script on your local machine that could do just about anything you want it to.

Bonus Round: Pro Tips

  1. Stabilize your Stream Deck: Order a sheet of adhesive micro-suction padding, and affix some small squares to the bottom of your Stream Deck. I've found that pushing the buttons can scooch the device further and further back on my desk even with its existing rubber feet. Now, with just a bit of micro-suction padding, my Stream Deck isn't going anywhere.
  2. Find an Icon Pack: Re-purpose any number of icon packs for iPhone home screens or artist sticker packs from Etsy as your Stream Deck key images. All of my Stream Deck images are from the Macstories Shortcuts Icon Pack, a set designed for Siri Shortcut Home Screen icons — making them a perfect fit for the similar-in-shape-and-purpose Stream Deck keys!
  3. Go Mobile: The El Gato Stream Deck iOS app has feature-parity with the hardware Stream Deck — in other words, you can control any and all Stream Deck actions wirelessly from your iPhone. The drawback is the $2.99/month subscription cost of the app, but is a good entry-point for folks unwilling to shell out the $150 for an actual Stream Deck (Personally: the satisfying click-clack of a physical button is what justifies the high price). And, as a bonus: It supports Siri Shortcuts, allowing you to trigger any individual Stream Deck key by summoning the voice assistant with a supported device!
Two screenshots of the El Gato Stream Deck app for iOS.
The Stream Deck iOS app can act as a remote control for your desktop Stream Deck, and even supports Siri Shortcuts.

First-Order Action Retrievability

It may seem strange to plug in an array of programmable buttons to a desktop PC with the inherent ability to trigger any action in software, especially considering many of the same actions can be triggered by the keyboard I am typing on now. However, I think the allure of the Stream Deck is the combination of its aesthetic polish (pretty and pleasant buttons are more-often-used buttons) and its removal of friction between the user and an abstract action or series of actions. The Stream Deck takes otherwise-intangible keyboard shortcuts and quick actions and displays them in my face as tempting tactile triggers; always there, eager to be clicked. The Stream Deck is an embodiment of the "first-order retrievability" philosophy — the thing that I want to do or the tool I need should be no more than one step, one click, or one tap away. Whether it saves me a a minute, a second, or no real time at all to use a Stream Deck button over some alternative, it saves me the mental energy of going past that first degree of action abstraction — and that mental energy saved is incalculable in value.