It looks like I've linked you here myself. Linking people to a blogpost I wrote is often a bit akward, especially at work.
I likely shared this blog in an attempt to further a conversation. Usually the post does a better job at succinctly sharing information than I could by talking.
In any case, I hope me sharing this post doesn't come across as humblebragging, that's really the opposite of what I'm trying to achieve.
Thanks for reading!
These programs are at the intersection between automating a tedious task, having fun, learning something new and not worrying about quality.
They often serve a very specific purpose and are really intended just for me - if they break, have ugly code, or if a tool exists that does it better, it all doesn’t matter!
A random sample.
Scraping lists from listchallenges.com
After wasting a few hours on listchallenges.com, I wanted to export the lists I had filled out so I could store them elsewhere (e.g in a google docs) and not be dependent on the listchallenges website. So I wrote a scraper script in Go (using Agouti) to export any given list to json, making it easy to further manipulate the data using e.g.
Backing up all my github repos
I wrote a small script to backup all my github repositories as well as my starred repositories. I ran this script for multiple years, backing up my repos twice a day. After recently changing my homelab setup, I still have to set this up again. I might consider using something like ghorg instead, although my simple script also gets the job done.
Raspberry Pi flasher
When operating a Raspberry PI from an SD card, the SD card tends to get corrupted over time, especially when power cycling the Raspberry Pi without shutting it down first. As I found myself reflashing Raspberry Pi images on a regular basis, I decided to automate the process using a bash script. While I try to avoid SD card storage all together these days, I still use occasionally use this script.
A tiny program (written in typescript) that calculates aggregate home automation statistics based of existing datapoints in InfluxDB. One use-case for this was calculating how many hours of TV we watched in a given day based of timestamps of the TV turning on and off. Nowadays, such aggregations can more easily be achieved in Grafana using transformations.
Scraping Order info from Amazon website
Near the end of the year I often spend some time evaluating our finances, including analyzing our purchasing behavior from the past year. Since we buy a lot on Amazon, and since Amazon does not allow for an easy export of purchase data (Amazon for Business does, but not for consumers), I wrote a scraper script in NodeJS using Playwright to get the data I wanted.
Quite a few moons ago, I was doing some work with Memcached and I found it difficult to easily explore the data that it was storing. I decided to write “memclient”, a small CLI program in Go that allowed me to easily manipulate memcached data from the commandline. This was my first hands-on exposure to Go, I remember really enjoying it!
Fetching Top videos Youtube
I watch a lot of Youtube. At one point I wondered whether I had seen the top videos of all my subscriptions. Not finding an easy way to obtain that info, I wrote a small python program that uses the Youtube API to loop over all subscribed channels for a given user and prints each channel’s top videos.
Our home has a partially flat roof on which water sometimes accumulates when I don’t unclog the draining pipe on a regular basis. In the past this has led to some water damage as standing water was leaking from the draining pipe joint.
To alert me whenever there is standing water on the roof, a few years ago I pointed a cheap camera at the roof and wrote a small python program that used super simple image recognition (using Pillow) to do this. This worked ok-ish, but also gave a bunch of false positives.
I still want to revisit this at some point and maybe use a machine learning approach to solve this.
Hammerspoon is an automation framework for macOS. I’ve used it to to automate various tasks using the Lua scripting language, such as creating tray menus, automatically switching audio sources or automatically moving windows to a different screen when plugging in an external monitor. I no longer actively use Hammerspoon as of now, but it’s a great tool for automating macOS.
A small Ruby program that pulls messages from a Slack channel and publishes them to a yaml file. I use(d) this to automatically publish interesting articles to the What I’m Reading page on my website by sharing them to Slack from my phone or computer. This program runs every hour (via Github Actions).
The listed personal tiny programs above are only just subset of those I’ve written: I tend to write a few every year.
At lot of them are abandonware: I don’t actively use or maintain them after they’ve served their purpose. Yet, some I do occasionally revisit, and the satisfaction and value I’ve gotten from writing them is without question.
Other than serving an immediate need, they have allowed me to explore technology I might not otherwise have gotten an opportunity for. This has had major indirect benefits for my day job as a software engineering professional.
Publishing them on Github has had it’s benefits too in terms of re-use of code for other projects and a bit of public portfolio building (although perhaps debatable given the code quality).
Taking a step back, what perhaps stands out most is how programming is truly a super power. With so much of our lives spent on computers, us programmers have the ability to manipulate our digital environment almost entirely to our liking.
If a program or website doesn’t do something, with enough determination, there’s usually a way around it. In many cases, a tiny program already suffices. That ability to make a computer do whatever you want is something our non-programmer family or friends just don’t have access to - often with frustration as a consequence (”why can’t it just do this thing 🤬”).
I don’t know of any other engineering context where this holds so strongly: software is truly malleable like little else. And tiny personal programs are perhaps the purest expression of that. I love it.