Skip to content

Advanced Text Editing Using Karabiner & macOS KeyBindings

I’ve always wanted some of the fancy keybindings I have in VS Code across my entire macOS experience. Additionally, ever since I discovered back/forward for code navigation in VS Code I wanted to bind my mouse keys to these shortcuts. I ended up digging into Karabiner and the native macOS keybindings. Here are my notes! Most of the resulting code is here. macOS Keybindings Here are some notes about what I learned about this hidden macOS feature: There are a set of special commands that control the native cocoa text system. You can combine these commands and tie them to keyboard shortcuts, but they only work in apps that use the native cocoa text system (not Chrome, for example!)…

Continue Reading

Learning Swift Development for macOS by Building a Website Blocker

I loved Focus App. It blocked websites and apps on a schedule. But, years ago it started glitching out: sucking up tons of ram and freezing my computer. They didn’t fix the bug and I abandoned using it and instead switched to a host-based blocking system which has served me well. However, there are some issues with the host-based approach: I can’t block specific URLs, only hosts (focus app couldn’t do this either) I can’t set a schedule I can’t block apps If I remove a host it will not automatically get blocked unless I sleep and wake the computer Sleepwatcher (cli tool) is dead and requires some manual set up to get working…

Continue Reading

My Experience With GitHub Codespaces

I have an older intel MacBook (2016, 2.9ghz) that I use for personal projects. My corporate machine is an M1 Macbook Pro and I love it, but I’ve been holding off on replacing my personal machine until the pro M2 comes out (hopefully soon!). I love playing with new technology, especially developer tools, and when I got accepted to the codespace beta I couldn’t resist tinkering with it. To speed up my ancient MacBook, try some new tech, and have the ability to learn more ML/AI tooling in the future. Summary I largely agree with this analysis. Codespaces are very cool. They work better than I expected—it felt like I was developing on a local machine…

Continue Reading

Blocking Websites on a Schedule With Pi-Hole

I’ve written about blocking adds and distracting websites before as part of my digital minimalism crusade. I’m a big fan of thinking through your lifestyle design and automating decisions as much as possible. For instance, after 9pm at night and before 7am there’s a set of distracting websites that I do not want myself, or anyone in my family, to be able to access. This introduces just enough friction to bad behavior (like scrolling Twitter at 9pm) that it prevents me from doing the wrong thing. Below I’ve described how I block (and then subsequently allow) websites on a schedule, and some other misc related trick with the Raspberry Pi & Pi-Hole. Block Sites on a Schedule I wanted to block my Roku TV based on my cron schedule…

Continue Reading

Using the Multiprocess Library in Python 3

Python has a nifty multiprocessing library which comes with a lot of helpful abstractions. However, as with concurrent programming in most languages, there are lots of footguns. Here some of the gotchas I ran into: Logging does not work as you’d expect. Global state associated with your logger will be wiped out, although if you’ve already defined a logger variable it will continue to reference the same object from the parent process. It seems like the easiest solution for logging is to setup a new file-based logger in the child process. If you can’t do this, you’ll need to implement some sort of message queue logging which sounds terrible. Relatedly, be careful about using any database connections, file handles, etc in a forked process…

Continue Reading

Book Notes: The Hard Thing About Hard Things

Something new I’m doing this year is book notes. I believe writing down your thoughts helps you develop, harden, and remember them. Books take a lot of time to read, taking time to document lessons learned is worth it. Here are the notes for The Hard Thing About Hard Things by Ben Horowitz. Definitely worth reading, especially if you are actively building a company, although I wouldn’t say it’s in the must-read category. Below are my notes! Enjoy. Leadership A much better idea would have been to give the problem to the people who could not only fix it, but who would also be personally excited and motivated to do so. I think any good leader feels personally responsible for the outcome of whatever they are doing…

Continue Reading

Book Notes: Successful Fathers

An older book (no kindle version!), Successful Fathers, was recommended to me by a father I really respect. Here are my book notes for it. Fathers and mothers today, isolated as they are from their own parents and extended family, need as much experienced advice as they can get. In our own era, they need to work harder to get it. Rings very true. Most parents, who aren’t under some other massive life stress (finances, health, etc) are very concerned about raising their kids the "right way". I am too. However, parenting advice is an industry. It’s a business. There’s lots of advice in books, videos, courses, etc and much of it is conflicting. We aren’t missing advice, we are missing advice we can trust…

Continue Reading

Book Notes: Making it All Work

Something new I’m going to try doing this year is book notes. I’m continually more bought into the idea that writing down your thoughts helps you harden and remember them. Books take a lot of time to read: if I’m going to invest the time in a book, I should be ok investing another ~hour in calcifying the lessons I learned—so that’s what I’m going to try to do. This should help me better filter what books to read: if it’s not worth spending the time to write the notes, I probably shouldn’t read the book (obviously excluding entertainment-only reading). Here are the notes for Making it All Work. The book wasn’t great, I wouldn’t read it unless you haven’t read Getting Things Done and are new to personal productivity. Here are the notes!..

Continue Reading

2021 Goal Retrospective

I’ve been doing yearly retrospectives on my yearly goals for awhile now. My belief in incremental improvement being the key to achieving anything great life has only been strengthened as time has gone on. Here’s my review of last year’s goals and my thoughts about what I can change going forward. What Worked Focusing on just two habit changes for the year is the right balance for me. I think of a habit as a recurring behavior I want to change, as opposed to a specific one-time event or project completion. I implemented the two habits I targeted. Setting goals that are just hard enough is really critical. I set a couple goals that were just enough of a stretch that I felt like I could push and get them across the line…

Continue Reading