RSSAmplifier

Blog

Jack's blog

...

jackevans.bearblog.devRSS feed ↗10 posts

Latest posts

Elm OpenAPI codegen

I spent this weekend scratching a personal itch. I'm working on a little toy project that's using Elm on the frontend and Go on the backend. I'm using an OpenAPI specification to define the contract between my frontend and backend. On the backend I'm using oapi-codegen to generate Go types from my spec. oapi-codegen -config oapi-codegen.yaml openapi.yaml Initially I was hand writing the…

Reading Highlights of 2025

In past years I diligently tracked the books I read on Goodreads. I set a goal of reading ~30 books a year with the aim to establish reading as a daily habit and used Goodreads to track my progress. This year I realized I haven't updated Goodreads in months—and ironically, I've been reading more than ever. Without fixating on 'books read' as a metric, I can read purely for enjoyment. If I'm not…

Debugging Slow Wi-Fi on Linux

I have a dirt cheap NUC desktop with a windows installation that I use primarily for recording guitar. Outside of running Reaper + a few Neural DSP plugins there's nothing else keeping me on Windows. This weekend my frustration with the Windows experience finally boiled over and I decided to install a Linux partition. The installation process was super smooth, I booted into Linux Mint for the…

Styling Django Forms

When you drop a {{ form }} tag into your template. By default it's going to look pretty awful: Standard Recommendations For these example I'm using Bootstrap 5 , but these approaches aren't tied to a specific CSS framework (just change the styles to meet your needs). Step 1: Add classes to widgets class DebtForm ( forms . ModelForm ): class Meta : model = Debt fields = "__all__" widgets = { "name"…

My thoughts on disclosing AI usage in Open Source

Recently on lobste.rs someone posted the article If AI is so good at coding … where are the open source contributions? which led to a lot of heated discussion about AI disclosure. A lot of people in the comments are pretty adamant that if you use AI in any capacity to contribute to an Open Source project you should be morally obliged to inform the maintainers of its usage. While agree with the…

I brought a cheap phone

My clumsy ass managed to drop and break my second phone in a row. Previously it was beloved pixel 3a, this time my pixel 6a. As you can see in the photos the screen is smashed in the bottom right, it looks like some moisture worked its way inside and is slowly destroyed the AMOLED panel underneath. Given a full repair / screen replacement would cost similar to a brand new device, I opted to go out…

Profiling slow imports in Python

This week at $WORK I went on a bit of a side quest investigating why pytest collection was so slow. Just running pytest --collect-only from our project root was taking a painfully long time. Following the advice on: awesome-pytest-speedup I discovered imports were taking up a significant amount of time after running: python -X importtime -m pytest &> profile And pasting the output in a nice…

Why I Prefer Gradual Typing

I'm no expert in writing type signatures for my Python code. But I find having to litter my code with robust error/condition checking during development takes me out of my flow state. Before Here's a contrived example: def handle_user ( user ): questionnaire = questionnaires [ user . tenant . slug ] ... # Rest of code omitted In this 'happy path' code I've made the following assumptions: The user…

(Kind of) REPL Driven Development

At work I'll regularly connect my REPL to our dev and staging environments (via a DB proxy) to explore & debug issues. Most snippets/queries I execute regularly are already there in my REPL history, so are quick and easy to find. Combine this with a PYTHONSTARTUP file to import a bunch of commonly used modules means everything I typically need is already there. Instead of having to write any SQL,…

Fun with trees in Python 🌳

I recently discovered this neat little trick in Python: using a recursive defaultdict to easily build a tree data-structure. >>> from collections import defaultdict >>> def tree (): return defaultdict ( tree ) This allows you to very quickly build up a tree: >>> t = tree () >>> t [ 1 ][ 2 ][ 3 ] >>> t [ 4 ][ 5 ] >>> t [ 6 ][ 7 ] Which if you try to print in your terminal will look pretty horrible…