Articles on Python · Rust · AI

  • Profile First: A 10x Faster Django Test Suite

    The Rust Platform Django test suite took 30 seconds to run. I had a hunch it was database-related. Of course I was wrong. I profiled it with cProfile and cut it from 30 to 3 seconds.

  • End-to-End Testing Every Rust Exercise with Playwright

    The Rust platform has 71 exercises and counting (I just added a new track of Unix exercises). They all share the same interface: load an editor, type code, validate it against a Rust backend. When I make any changes to the platform, how do I confirm nothing breaks? Enter end-to-end testing with Playwright.

  • When to use classmethod, staticmethod, or instance method in Python

    In a coaching call this week we discussed a create classmethod, and someone asked the obvious question: why is that here? It just forwarded its arguments to __init__. We ended up discussing the difference between instance methods, classmethods, and staticmethods, and how to tell which is which. Here's a simple decision rule.

  • Building an AI Agent in 6 Weeks (and Finally Understanding How They Work)

    Jeff Haemer has written software since he was teaching it at the University of Colorado in the early 1980s. But he felt he needed to brush up his Python, and above all get a grounding in AI.

    In his words AI was "a big undifferentiated cloud of things I didn't know." Time to change that.

  • Why Rust does not need OOP

    When I heard structs replace classes in Rust, I was a bit surprised. I thought, how can you do without classes? But as I started to learn Rust, I realized that structs, traits, ownership and composition help resist the temptation of OOP. In fact, Rust's approach to programming is more focused on data and behavior rather than objects.

    Let's look at 5 reasons why Rust does not need OOP.

  • AI Doesn't Change What Software Engineering Is

    Kelsey Hightower said something on the Pragmatic Engineer podcast that I keep coming back to: AI does not change what software engineering is. It is a tool, a more powerful one, but the job did not fundamentally change.

  • How to Update Multiple Page Elements from One htmx Request

    A button submits code, tests run, feedback appears. Standard htmx. But the submissions dropdown stays stale; the new submission is in the database, just not in the dropdown. One request, two elements to update.

  • "Rust Is for People Who Want to Be Punished." Now Jochen Trusts It More Than Python.

    Jochen Deister is a lawyer who codes for fun. He has years of Python behind him and no intention of ever being hired to program.

    Three months ago, Rust was just a name to him, the language for "the big shots" with a notoriously steep learning curve. Then he built a JSON parser from scratch in Rust, and it ran faster than the equivalent in Python on every dataset he tested, up to 3.5x faster on some. "Holy F" he reacted when he saw the results.

  • How to Tell if Your Python Mock Is Actually Working

    A test can pass for the wrong reason. When you're mocking a third-party API call, the test might look green because the real API happened to return an error, not because your mock did anything at all.

  • Build the Simplest Thing That Works

    I needed a CRM the other day. Not Salesforce, not even a web application. I just needed a way to track contacts, notes, reminders, and a small product catalog.

    Before writing any code, I focused on the constraints first.

Notes on Python, Rust, and AI for developers who value deep work over shallow trends.

Read the newsletter →