Skip to content

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

Learning TypeScript by Migrating Mint Transactions

Years ago, I built a chrome extension to import transactions into Mint. Mint hasn’t been updated in nearly a decade at this point, and once it stopped connecting to my bank for over two months I decided to call it quits and switch to LunchMoney which is improved frequently and has a lot of neat developer-focused features. However, I had years of historical data in Mint and I didn’t want to lose it when I transitioned. Luckily, Mint allows you to export all of your transaction data as a CSV and LunchMoney has an API. I’ve spent some time brushing up on my JavaScript knowledge in the past, and have since used Flow (a TypeScript competitor) in my work, but I’ve heard great things about TypeScript and wanted to see how it compared…

Continue Reading

Building a SouthWest Price Monitor and Learning Server Side JavaScript

I originally wrote a draft of this post in early 2019. I’m spending some time learning TypeScript, so I wanted to finally get my JavaScript-related posts out of draft. Some notes and learnings here are out of date. Both sides of our family live out of state. Over the last couple years, we’ve turned them on to credit card hacking to make visiting cheap (free). SouthWest has some awesome point bonuses on credit cards, but you can’t watch for price drops on Kayak and other flight aggregators. After a bit of digging, I found a basic version of a tool to do just this. It’s a self-hosted bot to watch for flight cost drops so you can book (or rebook for free)…

Continue Reading

Building a Chrome Extension to Import Transactions into Mint

I originally wrote a draft of this post in early 2019. I’ve since stopped using Mint and switched to LunchMoney. However, I’m spending some time learning TypeScript so I wanted to finally get my JavaScript-related posts out of draft. I use Mint (although it’s rotting on the vine after being acquired by Intuit), and want to import a list of transactions from a bank account that isn’t supported. However, there’s not a way to do this through the mint UI, but there is a hack someone documented. I know old-school JavaScript but haven’t learned ES6, and I’ve never built a Chrome extension. Building a Chrome extension to use the private mint API to import transactions from a CSV is a perfect learning project…

Continue Reading

Building a Docker image for a Python Django application

After building a crypto index fund bot I wanted to host the application so the purchase routines would run automatically. In addition to this bot, there were a couple of other smaller applications I’ve been wanting to see if I could self-host (Monica, Storj, Duplicati). In addition to what I’ve already been doing with my Raspberry Pi, I wanted to see if I could host a couple small utilities/applications on it, and wanted to explore docker more. A perfect learning project! Open Source Docker Files As with any learning project, I find it incredibly helpful to clone a bunch of repos with working code into a ~/Projects/docker so I can easily ripgrep my way through them. https://github.com/schickling/dockerfiles/ Older, but simple Dockerfiles…

Continue Reading

Using GitHub Actions With Python, Django, Pytest, and More

GitHub actions is a powerful tool. When GitHub was first released, it felt magical. Clean, simple, extensible, and adds so much value that it felt like you should be paying for it. GitHub actions feel similarly powerful and positively affected the package ecosystem of many languages. I finally had a chance to play around with it as part of building a crypto index fund bot. I wanted to setup a robust CI run which included linting, type checking, etc. Here’s what I learned: It’s not possible to test changes to GitHub actions locally. You can use the GH CLI locally to run them, but GH will use the latest version of the workflow that exists in your repo. The best workflow I found is working on a branch and then squashing the changes…

Continue Reading