One habit that I have incorporated for myself these days after bashing my head over undocumented spaghetti code is to review what I have done more often. I get immense value from LLMs in this regard as well.

I do not let LLMs write code for me (only exception being an integration test project I wanted to vibecode with Qwen 3.6 as an experiment), it's well documented on how much cognitive context loss happens when you let it do so, but rather I trudge through the pain of getting an initial version out myself (a LLM is more like a Google search for me during this phase).

Coming back to my point, I remember reading this blog post by lawrence kesteloot a few years back, before LLMs became mainstream. He says, to quote:

I have 2 uv scripts that I use to help me with this. Whenever I sit down to program, I run a review_remainder script that runs in a loop to check if the combined insertions and deletions that I have performed so far is over 200 lines. If it is so, it notifies me to stop and review whatever I have written so far. I get the unified diff file and figure out any enhancements / edge cases that I might have missed myself. If I think its okay, I run the diff through another uv script which uses an LLM to explore my changes & I review its suggestions - if it trips up and misunderstands something then I know its something that needs to be better written / named / commented since the average joe reviewing PRs is also using LLMs to do it. If I find a suggestion genuinely better than my implementation, I adopt it and make a note of why. The feedback is immediate. My commits are frequent and better disciplined.

This style of programming seems to be getting popular - Using AI to write better code more slowly by Nolan was a top post on HN & lobsters last week. Albeit the approach is quite different but the basic principles are the same and I would argue, reviewing in chunks of 200 lines continuously is far more pleasant than reviewing a finished PR.

Review while context is still fresh. Eat an elephant one bite at a time.