Live data from Hacker News

I'm going back to writing code by hand

blog.k10s.dev

351–360 of 656 posts

Re: I'm going back to writing code by hand

#351

Earlier quoted context omitted.

[flagged]

Mate, that's literally what you implied, innit? You probably "can" do it yourself, but you choose not to - I wonder why? Also the point of sarcasm is to communicate it in such way that it is obvious, without using the "/s" signifier. You know like, telling a joke at a party that you don't have to explain.

> I wonder why?

Because I like to save time?

Re: I'm going back to writing code by hand

#352

When it was Copilot tab-completing lines, people would say, "yea, but you still have to make sure you're the one writing the whole functions". Then when it was completing functions, people would say, "yeah, but you still have to make sure you're the one writing the logic around the functions" Then when it was completing the logic around the functions, people would say, "yeah, but you still have to make sure you're th…

Nice Fiction story.

Re: I'm going back to writing code by hand

#353
post #192

Yep. The only people I've heard saying that generated code is fine are those who don't read it. The problem is that the mitigations offered in the article also don't work for long. When designing a system or a component we have ideas that form invariants. Sometimes the invariant is big, like a certain grand architecture, and sometimes it’s small, like the selection of a data structure. You can tell the agent what the…

What's the difference between asking an AI to write you a module you never read and installing a 3rd-party module without auditing all its source code?

Trust and reputation.

I would use Stripe, curl, and ffmpeg without audits, because I trust them to provide good code and to respect their API. I wouldn’t trust AI to write a Fibonacci series implementation.

The AI has no reputation to wager for my trust.

Re: I'm going back to writing code by hand

#354
post #192

Yep. The only people I've heard saying that generated code is fine are those who don't read it. The problem is that the mitigations offered in the article also don't work for long. When designing a system or a component we have ideas that form invariants. Sometimes the invariant is big, like a certain grand architecture, and sometimes it’s small, like the selection of a data structure. You can tell the agent what the…

What's the difference between asking an AI to write you a module you never read and installing a 3rd-party module without auditing all its source code?

stars on github? I've wondered the same thing.

Re: I'm going back to writing code by hand

#355

When it was Copilot tab-completing lines, people would say, "yea, but you still have to make sure you're the one writing the whole functions". Then when it was completing functions, people would say, "yeah, but you still have to make sure you're the one writing the logic around the functions" Then when it was completing the logic around the functions, people would say, "yeah, but you still have to make sure you're th…

> I don't know if architecture is a solvable problem for these models, but it is interesting watching the expectations moving over time.

I think the solution is between the lines of this article. The author states the steps leading to this, but doesn't arrive at it explicitly. It has been obvious (With 50/50 hindsight) to me since LLMs started getting popular, and holds:

LLMs are fantastic for software dev. If you don't let it write architecture. Create the modules, structs, and enums yourself. Add as many of the struct fields and enum variants as possible. Add doc comments to each struct, enum, field, and module. Point the LLM to the modules and data structures, and have it complete the function bodies etc as required.

Re: I'm going back to writing code by hand

#356
So much of the problem here is that the author blindly trusted the agent. They're enthusiastic juniors, not jaded seniors.

Prompt for what you want. Get your feature working, then cut: reduce SLOC, refactor to remove duplication, update things to match existing patterns. You might do these instinctively, or maybe as-you-go, but that's just style. Having a dedicated pass works just as well.

The same thing goes for my code now that did when I wrote every line by hand: make it work, then make it good, then make it manageable. Manually that meant breaking things down into small blocks of individual diffs inside a PR (or splitting PRs), checking for repetitive code and refactoring, or even stashing what I got to and doing it again with the knowledge of how things went wrong.

Agents can do the same. It's WAY easier mentally and works out better if you treat them the same way and go working -> better -> done.

Re: I'm going back to writing code by hand

#357
post #335

Earlier quoted context omitted.

Thank you for this, people often miss the point, comparing apples with oranges.

If they were equivalent, people would be committing the prompts and not the code

And then getting bugs when they use a new version of the AI, just like people occasionally got bugs when they upgraded to new versions of the compiler...

Re: I'm going back to writing code by hand

#358
post #192

Yep. The only people I've heard saying that generated code is fine are those who don't read it. The problem is that the mitigations offered in the article also don't work for long. When designing a system or a component we have ideas that form invariants. Sometimes the invariant is big, like a certain grand architecture, and sometimes it’s small, like the selection of a data structure. You can tell the agent what the…

What's the difference between asking an AI to write you a module you never read and installing a 3rd-party module without auditing all its source code?

If the 3rd party module is popular, its badness will affect other people too and either the module will get improved or well known workarounds/"best practices" will develop. With AI-generated code, more often than not you're the sole user.

Re: I'm going back to writing code by hand

#359

Earlier quoted context omitted.

I know it’s tiring to talk about “hallucination”, but truly, models still do hallucinate They constantly say they did a thing they didn’t, say they know how to solve something when they don’t, etc. Regardless of guard rails or tests - AI forces a constant vigilance of a new kind. Not just “what might have gone wrong” but also “what do I think is working but isn’t actually”. And we’re not even talking about how it cho…

"still" isn ghecorrect word. They always be having hallucinations

"Still" means "it always had hallucinations, and it still does, despite people thinking that it doesn't anymore". People think we've moved past that. We haven't.

Re: I'm going back to writing code by hand

#360
Genuinely curious if you've used "plan mode" (with perhaps a plan feedback tool) to get clarity from your coding agent before unleashing it on a feature like "add a pods view with live updates"?

Getting a plan isn't a panacea but is a better way to limit downstream slop than just vibing without one.

Post reply on HN