Of course I use AI to write all my code lately š¤, but Iām still in the camp of reading the code š (outside of vibe-coded hobby projects, where I mostly donāt look at the code š ).
While reading all this AI-written code, one of my favorite new code review tactics is rewriting the AIās awkward, esoteric comments BY HAND. š±
I know itās easy to either a) not care about the awkward comments š¬ or b) just ask the AI āplease rewrite thisā (which tbh is often the right call).
But, for the handful of key comments in each PRāthe ones that will help future me, future maintainers, future AI know wtf weāre doing and whyāI rewrite them by hand. āļø
Iāve found two upsides to this:
-
The comments will actually be good.
AI is great for many things, but articulating rationale in prose is something that, at the moment anyway š , experienced humans are still better at.
Note that I donāt mean just copy editing out the AI slop terms of āload bearingā and āgateāābecause you can tell the AI to do that copy editing, sure.
I mean really stepping back and articulating, in ~2-3 simple sentences/phrases, why weāre doing what weāre doing.
Applied consistently, this practice makes all the difference in a codebase staying robust, healthy, and enjoyable for long-term developmentāit really is one of my āsecret saucesā and so far something AI cannot replicate.
-
You can ask the AI to check your rewrite for accuracy, and then debate back & forth when the AI says itās not.
Honestly itās somewhat embarrassing how often my first rewrite-by-hand is not 100% correct, which is great because it means Iāve missed some understanding of the code/approach, and now the AI & I can debate that.
Did the AI do something smart, and I just missed it? Honestly often yes.
Did the AI do something dumb or over-engineered that my rephrase is catching that it doesnāt need to do? Also often yes.
Whatever the result (Iām wrong, the AIās wrong, weāre both mostly right, etc) the outcome is better understanding for both myself and the AI.
And thatās really itāmy personal, current āconsidered best practiceā tip/recommendation: write your own comments! š