Joy & Curiosity #81

Interesting & joyful things from the previous week

Open on Substack · Markdown

Know what agents are really bad at? Writing confident code. Code that says: this is how this works, boom, fist on the table. And this is true and this is false, forever and always. And if both have changed, it means we’ve been moved to a different universe. This thing can never be null, and this can never be nil, and if this isn’t wired up to that, then down is up anyway and we can pack up and go home.

Instead they’re prone to write code that constantly asks, with the voice of scared mouse: but what if this is null? What if this is missing? What if this is undefined? What if the file was overwritten? What if the database got corrupted, by space rays? What if a client reconnects, after a seven year ping timeout?

And then, the second time you let them loose on the codebase, they see all of those what-ifs and now rightfully conclude that in this codebase anything’s possible really and no one knows anything about how any of this works and their teeny tiny mouse voice gets even smaller and puts yet more questions into places where there should be statements. And then, the third time… Well.

Over the last few weeks, I’ve found again and again that what I once called paint-by-numbers programming is still required when you’re building something new, when there’s no statements in the codebase yet, only blank pages and possibilities. You put in the numbers and the lines and then you let the agent put in the colors. You also need to watch the agent to make sure it doesn’t put in new lines and numbers that you don’t agree with.

But here’s the tricky part: depending on what you’re doing, the lines and numbers might already be there — in the training data, in the framework, in the idea of what you’re building. If you’re building a web application with a popular framework, there’s already quite a few statements in the codebase. Of course there’s going to be request object, and this is how migrations work, and this is what happens on restart, and no, this isn’t possible.

When you’re building something new, the challenge now is to figure out what’s true about your idea and your codebase and whether the agents know that too. Once they do, you can let them loose again.