The (lack of) cognitive load of readable code

pramodbiligiri1 pts0 comments

#AgentAnecdotes: The (lack of) cognitive load of readable code

This is 2nd of my #agentanecdotes series where I want to share a story of an insightful session of agentic engineering. This one was particularly fruitful for me, and I'm pretty excited what came out of it, because I feel that it connects directly to a universal feeling of unease across our industry. As always, follow along via RSS.<br>tl;dr: I had Claude create a /readable-python skill and I'm shocked with how well it turned out.<br>Update : A few folks asked for the full exchange that led to the creation of the skill linked at the end. I added it to the Appendix.<br>Then<br>In December 2022, I was in Las Vegas for the opening day of AWS re:Invent, Amazon's yearly cloud conference. That Thursday, Werner Vogels was going to be launching EventBridge Pipes during the Developer Keynote to a frankly lukewarm reaction. My journey with shipping Pipes at AWS took 3 years and is a bittersweet story for another day. But right now it's not Thursday, it's Monday night, and my team pages me because some last-minute testing found a bug, and we're worried it's a launch blocker. Deployments at AWS are understandably frozen during re:Invent, short of SVP approval (aka to fix catastrophic or security bugs). But we're launching a new service, so there's no risk to existing customers. We are pre-approved to deploy if we want to, so the decision is ours and whether it's worth it. What's important today isn't what the bug was or how we evaluated to ship it or not. What's important is what happened when my team paged me to tell me about the bug in apparently a module I worked on.

Coworker: "So it looks like when I blah blah, I get this exception: yadda yadda."

Nikki: "Ah, ****, I know exactly what happened. Dang it."

This scenario is becoming an endangered species in our industry. Everyone I talk to who is doing their earnest best to be productive with agentic engineering is aware of the risks of cognitive debt. Yet try as we might (those of us still actually reviewing all the code of our agentic partners), it onsets. There are a couple of reasons. First, even with the best of intentions (trust, but verify), it's impossible to not get a bit complacent. As Simon Willison writes,<br>The problem is that as the coding agents get more reliable, I’m not reviewing every line of code that they write anymore, even for my production level stuff. I know full well that if you ask Claude Code to build a JSON API endpoint that runs a SQL query and outputs the results as JSON, it’s just going to do it right. It’s not going to mess that up. You have it add automated tests, you have it add documentation, you know it’s going to be good. But I’m not reviewing that code. And now I’ve got that feeling of guilt: if I haven’t reviewed the code, is it really responsible for me to use this in production?<br>Second, reading code is not the same as understanding the code. And understanding code is not the same as internalizing a mental map of it. My story from re:Invent 2022 isn't rare. Every experienced programmer has had the feeling of someone reporting a bug to them, and immediately realizing what scenario their code missed, by effectively navigating through the callgraph in their brain. And everyone I talk to about this today (May, 2026) is concerned they are losing that ability, even when they're overall happy with the quality of the code and features they are pushing out.<br>Now<br>Jump ahead to April 2026. It's the last week of a junior engineer at my startup, who is heading for a big tech internship, and then to finish her degree. She's an incredibly bright and capable engineer and applied researcher. She's going to go far in this industry with or without AI. But right now I'm looking at her code (because I'll be owning it after she leaves), and I'm struggling. In and of itself, this is not unusual. Noone, however smart they are, knows how to write readable comprehensible code out of the box. If anything, intelligence may be a detriment. Being too smart means you have less trouble creating and maintaining that callgraph in your head, and you struggle to empathize with your peers who can't. But this mental model is what's essential to the scenario I started this post with. And when you own a software system or service, ideally this includes not just the code you wrote, but the code you reviewed also.<br>This is why we are all struggling with building mental models of AI-generated code. The models are too smart to need to read or write readable code. They can follow a callgraph of logic too well, and they have no theory of mind of what a median human can do. Their role model is the corpus of open source source code, which is...fine.<br>Back to my code review: It's important to understand why I'm taking it seriously. The only way to get better at this is through feedback from others. Senior+ engineers are super effective with leveraging AI coding tools because we already have experience and judgement to evaluate...

code readable going because cognitive story

Related Articles