AI coding assistants destroy the virtue of laziness (and possibly impatience too)

It might come as a surprise based on the views expressed on this blog that I’ve used an AI coding assistant to write some parts of the application I’m working on for my job.

I’ve since stopped, and in my defense, I was strongly “encouraged” by my client and I was having mental health problems on a scale I’d never experienced before. I’m not writing because I need you to forgive me or something though. I want to share what I learned from the experience of maintaining that code.

I’m lazy. When I need to do something hard to achieve a goal, I can’t stop myself from thinking there must be an easier way.

This is a significant character flaw that’s caused me lots of trouble in my personal life as I found myself paralyzed in the face of grave problems where there is no easy solution. I’d say I’d give everything to be rid of it, but surely I don’t have to give everything, right?

Jokes aside, I wouldn’t want to let go of my laziness completely. Because “when you need to do something, spend most of your effort on trying to come up with an easier way to do it” is a paraphrasing of a popular programming adage:

Make the change easy, then make the easy change.

– someone who, with my luck, is probably selling seminars about How You Can Break Down Silos and Accelerate Business Transformation with Generative AI

This is my secret. When I get handed a feature request that would require complex and repetitive code, I don’t put my nose to the grindstone and do it. I fake work for an hour while daydreaming about entity-relationship diagrams until a flash of inspiration hits me and I redesign the schema.

At least, that’s what I do normally. I didn’t recognize this aspect of myself until recently. When I had access to an AI coding assistant, and I was feeling desperate enough to touch it, I worked around my “laziness” by having the complex code written for me. The agent is of course infinitely patient, and has no mechanism to make it stop before excreting slight variations of a gigantic SQL string in every route and consider whether the ORM we’re using has any features to make our task easier. (No mechanism other than a strongly-worded letter system prompt).

Those giant SQL strings are still in the codebase. I haven’t come up with an easy way of refactoring them yet. I don’t feel as bad about that as I would in the past though. What I interpreted as laziness was actually my professional instinct.