Live data from Hacker News

Using AI to write better code more slowly

nolanlawson.com

331–340 of 511 posts

Re: Using AI to write better code more slowly

#331

I've hit this point with AI where it's not a simple process, but a long drawn out back and forth. I'll use AI to design the implementation of a medium sized, cross cutting feature. Review all the details, maybe iterate on just that. Then implement with Claude 4.7 Max - which runs slower, but does a better job. Then review the implementation, then have Codex GPT 5.5 xhigh fast review it - which almost always finds cor…

You've essentially promoted yourself from coder to engineering manager, trading syntax fatigue for the mental marathon of refereeing specialized AI developers to ship v3-quality code on the first try.

Some see it as a promotion other (like me) as a demotion. I still prefer to do it myself, although I like code reviews done by AI, they do help to make code a bit better.

Re: Using AI to write better code more slowly

#333
post #283

Earlier quoted context omitted.

>> and still largely understand the code [...] ,that, I feel has made me a better engineer the cynic in me would say that a good engineer should fully understand the code you write. I'm not suggesting that AI is the problem here - you could vibe code with the AI have have it explain the reasoning and patterns - or else tell it to use 'simpler' patterns from the outset. For any one problem in software engineering, the…

> How can you reason about code you don't fully understand? We all do, though. It takes months for a human to really get to know a project and, unless you’re working at a small startup, you’ll probably never know most of the code outside the corner you work in.

Yes, this is why bugs get often worked around instead of being fixed properly.

Re: Using AI to write better code more slowly

#334

Does anyone have good recommendation for ai auto completion? My goal is to draft the solution with ai, write it myself but faster with auto complete, then throw ai review.

So your "goal" is to find an existing ai-auto completion that allows you to draft with AI then "write it yourself" by hitting tab? Sounds like the goal is actually to build that, then use it on projects....

I get pretty good results by writing specs and prototype with a LLM, through more or less managed conversations.

But once the prototype is done, I spend too much time refining the details, fixing everything going wrong (bas design details, wrong implementation, half done testing ...)

A full agentic setting would be too expensive for me (I wonder how much Garry tan spends...)

So I'd like to take a more balanced approach with: 1. usual LLM specs and prototyping to get the bases of the feature and boilerplate done 2. Write myself the code, with the help of an ai auto complete (this is Where I look for recommendations) 3. Use a setup as OP mentioned to review code

Re: Using AI to write better code more slowly

#335

Earlier quoted context omitted.

I really like this pattern and use it often, this 'not showing my cards'. The second I hint towards the LLM what I prefer it will become sycophantic and invent nonsense why my preferred solution is better. I'm sure there's an interesting study on how users 'leak' their preference unintentionally to the LLM; perhaps when users list their options, they often put their prefered option first; but not showing the cards on…

LLMs flip positions when users push back ~70% of the time even when they were right. RLHF optimizes for approval, not correctness

I almost always end with something like: “, but I am not sure, evaluate.” Or other things and avoid ever stating a preference.

Re: Using AI to write better code more slowly

#336

Earlier quoted context omitted.

I really like this pattern and use it often, this 'not showing my cards'. The second I hint towards the LLM what I prefer it will become sycophantic and invent nonsense why my preferred solution is better. I'm sure there's an interesting study on how users 'leak' their preference unintentionally to the LLM; perhaps when users list their options, they often put their prefered option first; but not showing the cards on…

LLMs flip positions when users push back ~70% of the time even when they were right. RLHF optimizes for approval, not correctness

> LLMs flip positions when users push back

Same experience. Claude rarely pushes back once you give a plausible/logical reason for your initial decision, even if it flagged concerns at first.

Re: Using AI to write better code more slowly

#339
Another way I'm "going slower" is to have the AI implement individual sub-steps of the current task, and review each one. It's slower than having it yolo out the whole thing, but it's much smaller incremental bits to review, so my brain doesn't glaze over in a huge review, like I had if I had it do the whole task.

I'm following an Ideas -> PRD -> Issues -> Tasks methodology, where each task has a bunch of sub-tasks. I have it just do one (or a few, I'm having it do Red/Green/Refactor as separate sub-steps, so I review the Red case, and then once that's good, do the Green and Refactor steps, and review those).

Post reply on HN