Skip to content

How to Inject Custom Code on Python Interpreter Startup

Ruby and Javascript both allow you to execute arbitrary code before your main application runs without modifying your application code. My most common use case is executing monkey patches to make it easier to debug an application. However, this is not possible with Python. This makes using development tools like pretty-traceback challenging. In my case, I work across a bunch of reports, and injecting six lines of Python into each repo is annoying (especially since many open-source repos don’t have a concept of a PYTHON_ENV, so there’s not an easy way to disable it in prod). The Magic .pth File In any engineering discipline, the more you understand the entire stack you are working with, the faster you’ll be able to fix issues…

Continue Reading

What I’ve Learned Searching for a New Startup Idea, Part 3

This is part 3 of a series of blog posts (here’s part 1 & part 2) about what I’m learning as I hunt for a new startup idea to work on). PE Rollups Create Opportunity Private equity is rolling up every industry you can imagine 1 . Plumbers, electricians, dental offices, primary care offices, machine shops, lawn businesses, RV parks, and software. PE is brilliant at extracting returns from an unoptimized business. It’s bad at focusing on the customer and building a great product. As industries roll up, prices increase, the quality of service decreases, and opportunities for a new disruptor at the bottom of the market emerge. Why does this happen? When PE acquires a business, the original founders lose motivation…

Continue Reading

How I Think About Insurance Products

Following up on my financial directives post, here are some of my thoughts about insurance. Nearly everyone has to purchase multiple insurance policies. It’s a constant cost you’ll have your entire financial life. It’s worth spending some time optimizing. Friends and family have asked me about this multiple times, so I’ve slowly compiled my notes for them. Here they are! Don’t Prepay, Self-Insure Instead I like to think of insurance as something you most likely never have to use. If you expect to use insurance, you’ll pay for it in increased premiums and the insurance companies will come out ahead. Then, it’s not really insurance, it’s prepayment for services you are going to use…

Continue Reading

Vertical SaaS is Dead

Ok, not completely, but it’s a catchy headline, huh? Last year, I set out to find a new startup idea with a straightforward thesis: There’s important B2B SaaS software to build. It’s easy to feel like so much software has been built, but if you look under the surface, there’s so much that’s broken. There’s much opportunity to build B2B SaaS—especially for underserved markets. Specific markets are grossly underserved by technology. For instance, founders and engineers don’t generally build for civil engineers or landscape architects, but developers love building devtools and infrastructure. If we build modern software for these underserved markets, they’ll eagerly adopt it…

Continue Reading

Fixing Broken Ethernet on Orange Pi 3B

I attempted to get my Orange Pi running as a tail-scale exit node. To do this, I had to enable IPv6 on the device. I ran the commands to enable the IPv6 connection, but it didn’t seem to work, so I rebooted the Orange Pi. After rebooting the Pi, the Ethernet would not connect. I ended up having to plug a screen into the orange Pi and wasted a bunch of time trying to understand why the Ethernet connection wasn’t working. I eventually ran into this blog post which indicated that there’s some low level memory issue with a recent firmware upgrade which broke the Ethernet device on the orange Pi. Super dissapointing! Here’s how to fix the ethernet across reboots…

Continue Reading

AppleScript Tips: Inspecting Objects, Modal Dialogs, and More

AppleScript is an amazing, quirky tool within the macOS ecosystem. It enables you to control any application on your Mac, even if the original developer didn’t explicitly write an API for it. This can be incredibly useful when attempting to automate certain actions. However, the language is incredibly weird and confusing, especially to a "real" software developer. I’ve compiled a list of tips and tricks below that help me write various tools and scripts to automate my computer (I’ve written about applescript before in case you are looking for other tricks)…

Continue Reading

Financial Directives for a New Graduate

Writing creates clarity, and defining directives for various areas of your life is an interesting exercise. I first ran into this idea via Derek Sivers: "It’s just a succinct and powerful way to communicate an idea. Focus on the action." I’ve tried distilling my personal investing principles as a series of directives. My siblings and other younger people I know also ask for my financial advice. This post is partly an effort to make it easy to share my thinking with others when it comes up so I don’t need to repeat myself. Obviously, I’m not a financial advisor, lawyer, CPA, etc. I’ve simply written down my personal opinions…

Continue Reading

Learning Docker Compose by Self-hosting Monica

I ran into Monica a while back, which bills itself as an "open source CRM"—an advanced address book. I’ve made it a hobby to meet random people I run into online. I really enjoy meeting new & interesting people, and I thought it would be nice to note down who I’ve met. This post is a compilation of notes from 1-2 years ago, and at the time, I did not have much experience with Docker (I really just used Heroku for all hosting and deployment before then). Self-hosting Monica on my raspberry pi was a great excuse to go deep and learn a lot about docker compose. Here’s some of what I learned getting Monica to run self-hosted on my raspberry pi…

Continue Reading

Categorizing Personal Email Contacts with AI

For years I’ve wanted to send out a yearly update (digital Christmas card of sorts) email to friends, both new and old. One of the problems is I don’t have a good address book that indicates who is a personal or work contact. I’ve been playing with datasette and I thought it would be fun to index all of my past emails and have AI categorize if they are a work, personal, or vendor contact. Importing Emails The first step is importing your emails from gmail into a local database. The easiest way to do this is to use a combination of Google takeout and a datasette plugin (note that it’s easiest to use my fork of the datasette plugin, the original package is dead)…

Continue Reading

Setting up eMMC on an Orange Pi

The main reason I ended up getting the orange pi (3B, to be exact) was because it has an eMMC connector. This means you don’t have to use an SD card for your boot drive, which I’ve had issues with in the past (they aren’t built for the read/write patterns that OS systems require, so they fail fairly often). I also assumed the device would be quite a bit snappier with an SSD (which turned out to be true). However, it ended up being trickier than I thought to get the OS on the eMMC card. tl;dr: you want to use dd to copy the .img file to the emmc after bootstrapping the system with a SD card with the OS image…

Continue Reading