Lee Byron

  1. mac xdg

    I like a tidy computer. I don’t have a desktop and I organize my config files within XDG base directories. XDG base directories defines a standard way to layout a user directory that’s portable across environments and defines a set of environment variables that many programs will look for to determine…

    PublishedUpdated

  2. how to remove the mac desktop

    After nearly two decades on a Mac, I’ve finally come to the conclusion that the Desktop is actively harmful. It is the junk drawer of the Mac. It distracts me, it collects stuff, things get lost there, I’m done with it. Here’s how to get rid of it. Remove everything from the Desktop folder. Make sure…

    PublishedUpdated

  3. time impact of kids

    As part of a recent reflection of my mental health and self care routines, and a desire to tighten up my work/life balance, I tracked how I spend my time over the course of a week. What became most clear was just how much time I spend on childcare of my two young sons (4yo and 1yo). I repeated this from…

    PublishedUpdated

  4. grug brain developer

    meet grug. grug no big brain, but grug survive many code winter. grug self-aware smol brain. grug wise. grug tell many secret for young grug (also mostly for grug, grug forget important things). young grug should read whole grug story1, but grug story long so old grug share favorite part: grug enemy…

    PublishedUpdated

  5. resolutions

    Most New Year’s resolutions fail. Gym memberships spike in January followed by a surge of cancellations weeks later. There’s some research suggesting that fewer than one in five have resolutions that last through a second year. Creating new habits is hard, kicking existing ones is even harder. I’m approaching…

    PublishedUpdated

  6. pace layers

    Stewart Brand1, in his book The Clock of Long Now, described the concept of pace layers: that within a society different groups move at different speeds. The relationship between layers creates both internal tension and desirable systemic effects, allowing for society to innovate and disrupt while simultaneously…

    PublishedUpdated

  7. radiate intent

    It’s easier to ask forgiveness than it is to get permission.— Grace Hopper1 This is classic advice when operating in a large organization. There’s a problem to be solved, you have a bold solution in mind and everything necessary to take action, but there will be very real costs felt broadly. You think…

    PublishedUpdated

  8. ikigai

    Years ago I came across the concept of “Ikigai” (or “life’s reason”) in a blog post, along with an explanatory four-axis venn diagram1. It introduced the idea of honing in on a life’s purpose by way of doing what you’re good at, what you enjoy, what the world needs, and what you can be paid for. This…

    PublishedUpdated

  9. leap®

    The Canon Cat was a computer designed by Jef Raskin, who also dreamed up the Apple Macintosh. Steve Jobs meddled too much in the Mac and Raskin left Apple to create the Cat1. It was a commercial flop, but had some awesome ideas mostly lost to time. Raskin was no fan of the computer mouse2 and thought…

    PublishedUpdated

  10. meta tags & the semantic web

    For better or worse these days a lot of the web is consumed via an aggregator platform. Search engines like Google, or Duck Duck Go, and social media like Facebook, Twitter, Reddit, and Mastodon. When links are displayed on these platforms, they use available metadata to give as rich a preview as possible…

    PublishedUpdated

  11. ascii table

    The ASCII 7-bit character encoding is ubiquitous1 and foundational to how computers talk to each other. It has an absolutely fascinating history that dates surprisingly far back. The ASCII standard started in 1963, and was iterated until 1986. ASCII was based on ITA2, a telegraph standard from 1924,…

    PublishedUpdated

  12. markdown footnotes

    Much like markdown link references, footnotes are defined in one place and referenced in another, but it doesn’t matter where the footnote is defined, they’ll always be collected at the end of the document in the order in which they are referenced1. Footnotes are created similar to shortcut reference…

    PublishedUpdated

  13. inverse conway

    Conway’s law is an expression coined by computer scientist Melvin Conway as an observation that companies tend to design software in a way which directly mirrors their organization and communication structures. Any organization that designs a system (defined broadly) will produce a design whose structure…

    PublishedUpdated

  14. torus

    One of my favorite mathematical shapes is the torus. Not only does it remind me of a doughnut (mmm), but it’s the first step into topology with the introduction of a hole. Not only is a doughnut topologically a torus, but so is your accompanying coffee mug1! But where does this word “torus” come from…

    PublishedUpdated

  15. contrails

    Air flights have a surprisingly complex impact on climate warming. In addition to burning jet fuel emitting CO₂ and other greenhouse gasses, the contrails left behind linger as artificial clouds. These contrails act as a blanket both trapping thermal heat as well as reflecting away solar radiation. The…

    PublishedUpdated

  16. four thousand weeks

    We live our lives week by week. A week feels frustratingly limited and there are alarmingly few of them. Assuming you live to eighty, you’ll have had about four thousand weeks. Reflecting on the books I read last year, four thousand weeks by Oliver Burkeman stuck with me the most. While pitched as yet…

    PublishedUpdated

  17. don't escape full screen

    I prefer small laptops and tidy screens, so keep most of my apps in full screen mode on my Mac. Lots of these apps, especially browsers, may have modals, forms, or other elements I need my Esc key to control. If I overzealously hit Esc one times too many, my window leaves full screen. Ugh. A quick solution…

    PublishedUpdated

  18. noTunes

    There’s many things I love about Apple’s software and OS, but one thing that feels particularly… monopolistic, and also annoying, is how the Apple Music app opens automatically whenever you connect bluetooth headphones. I literally never want this. This is behavior that cannot be disabled, the Apple…

    PublishedUpdated

  19. Brewfile

    I’m a huge fan of brew. I use it for installing a broad list of command line tools, as well as Mac apps. Most apps you use can be installed with brew install --cask. However, where I’ve found Brew most helpful is as a lightweight way to set up new computers with all the apps and utilities I rely on.…

    PublishedUpdated

  20. autoSetupRemote

    Ever seen this git error message while creating and pushing a new branch before opening a PR? fatal: The current branch my-pr-change has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin my-pr-change Perhaps you have a script you use which…

    PublishedUpdated

  21. opaque types

    One of my favorite features from Flow is opaque types. This allows a separation between interface and implementation that’s incredibly helpful as a type API designer, and a rare example of a “nominal type” in an otherwise “structural type” environment. Unfortunately, TypeScript still does not support…

    PublishedUpdated

  22. meetingbar

    As a manager I live and die by my calendar. While Google Calendar gives me a birds-eye view, what I need at a glance is where I’m supposed to be and how I’m supposed to get there. I’ve tried many plugins and apps and my favorite is incredibly simple: MeetingBar. MeetingBar sits in your menu bar and at…

    PublishedUpdated

  23. smooth scrolling

    Browser’s automatic scrolling behavior has traditionally been very jumpy, with developers needing to write custom JavaScript code to simulate a smooth scroll. However thanks to the smooth scrolling specification, browsers over the years have adopted an API for CSS and JavaScript to natively smooth scroll…

    PublishedUpdated

  24. community git aliases

    After writing about git aliases I asked my Twitter followers for their favorite custom aliases, and learned about a number of new ones! To list them here, I’ll show them in git configfile syntax. You can find yours at either ~/.gitconfig or ~/.config/git/config. [alias] # My MVPs (@leeb) s = "!git add…

    PublishedUpdated

  25. git alias

    If you use git frequently you ought to set up some shortcuts with git aliases. For example, while git show is useful, sometimes you just want the last commit information and not the entire contents of the commit. Consider adding git last git config --global alias.last 'log -1 HEAD' Now running git last…

    PublishedUpdated

  26. vim time travel

    To undo and redo in Vim, use u and ⌃⇧R (“CTRL-R” in Vim lingo, note the capital R) respectively. This works as you’d expect, but there are a few shortcomings: It is very easy to undo, but dexterously challenging to redo. If you undo, then accidentally make an edit, you can’t redo. Fortunately Vim has…

    PublishedUpdated

  27. numeric string type

    One of the most powerful recent features from TypeScript is template types. While they’re capable of everything from string manipulation to implementing generic parsers, sometimes it’s the simplest uses that are the most useful. A type I’ve come to find very helpful is “numeric string”: type NumericString…

    PublishedUpdated

  28. staff eng archetypes

    As I write this it’s performance reviews season at my company, which means renewed interest in the expectations of engineers of each level. My role is to help define this for our front-end engineers and ensure fair outcomes. A common question I hear throughout this process is: what is a staff engineer…

    PublishedUpdated

  29. multi-purpose modifier keys

    I spent a very long time not thinking too hard about customizing my keyboard beyond remapping caps lock. That is not until recently when I started playing around with the custom keyboard firmware QMK and macOS keyboard customization software Karabiner. The most immediately useful thing I discovered was…

    PublishedUpdated

  30. r.i.p. grep

    One of the oldest and most incredible tools in the terminal is grep1. It was written overnight by the GOAT, Ken Thompson, back in the early 1970s. It allows you to search through a file (or stdin) for a regular expression pattern2. Useful then, useful now. Incredible. However, it turns out that software…

    PublishedUpdated

  31. bat, a cat with wings

    On macOS there is the fantastic “Preview” utility. Select a file and hit space bar to quickly take a look at the contents. In terminal things are a little different. There’s tail, cat, and less. Bash denizens will be familiar with the results. Good luck if you try taking a look at a massive file, a file…

    PublishedUpdated

  32. launch control

    I need to run a command every time a particular file changed. In the past I’ve used tools like watchman to do this, and found them heavyweight. In this particular case, I could safely assume I was running on macOS and wanted to avoid the dependency of installed software. Then I learned about launchctl…

    PublishedUpdated

  33. command-z in vim

    Vim, run from the terminal, does not make use of the Command key. So most of my muscle memory has been lost while learning it. However I found a shortcut: iTerm’s key mapping. In iTerm, open Preferences (or press Command-, and in the Keys tab add a new Key Binding. Keyboard Shortcut: ⌘z Action: Send…

    PublishedUpdated

  34. type unicode from the keyboard

    I’m often looking up Unicode code points to use in various places. There are two ways I type them quickly from the keyboard. The first way is a cheat. In the first tab of Keyboard preferences, ensure “Press 🌐 to: ” is set to “Show Emoji & Symbols”. Now tap the fn key to bring up the Symbols picker.…

    PublishedUpdated

  35. enable key repeat

    In macOS, when you hold down a letter key you see a small popover with available alternates for that letter (for example by applying accents). This behavior can be disabled, returning to the previous behavior where holding a key repeats that letter until you release it. To do so for a specific app: defaults…

    PublishedUpdated

  36. remap caps lock

    The caps lock key is conveniently located next to your left pinkie on the home row, easier to press than almost all other modifiers despite being one I find least useful. Luckily, macOS makes it very easy to remap this key1. In System Preferences → Keyboard, press “Modifier Keys…” to open a menu mapping…

    PublishedUpdated

  37. mac find buffer

    Most text based apps on the Mac have a find buffer accessed with ⌘F. A common workflow is to select some text, copy it with ⌘C, open find with ⌘F, paste the searched text with ⌘V, hit return to find the next instance, and hit return multiple times until you find the instance you’re looking for, then…

    PublishedUpdated

  38. mac screenshot

    Mac has some keyboard shortcuts for capturing your screen via an app called “Screenshot.” Capture your entire screen with Command+Shift+3 Capture a portion of the screen with Command+Shift+4, then drag and release a rectangle. Before dragging, press space bar to toggle on capture window mode, then click…

    PublishedUpdated

  39. by RSS you mean Atom

    I set about adding an “RSS feed” for this til site, only to find that despite reader apps calling themselves “RSS readers”, that most “RSS” feeds out there are not actually written in RSS, they’re mostly written in Atom. There are actually a small handful of feed document formats out there, and RSS is…

    PublishedUpdated

  40. setup a simple screencast

    There’s plenty of good software out there for screencasting, but if you’re in a pinch Quicktime Player does a solid job with a bit of prep. Get a clear desktop and open all windows you want to screencast, not full screened. Also open Quicktime Player. Don’t forget to increase font size in any terminals…

    PublishedUpdated

  41. how to rearrange bits

    If you have a bit-powered display where the elements don’t align to the bits in the byte, you may want to remap bits from the source byte to the destination byte. Manually writing a bunch of shifts is frustrating, and I found a great tool which writes this code for you! http://programming.sirrida.de…

    PublishedUpdated

  42. changing a word in vim

    The c key starts a chord to change something. This is super useful for changing the word under the cursor. cw will change from the current position until the end of the next word, and ciw will change the whole word under the cursor (read: change in word). This, combined with other movements can lead…

    PublishedUpdated

  43. markdown link references

    Inline markdown links and images can be hard to read with long URLs. References are a great way to keep prose readable and keep a catalog of links. There are quite a few variations of the syntax. Write references with a box around the reference identifier followed by a colon and the URL, optionally include…

    PublishedUpdated