Live data from Hacker News

I'm going back to writing code by hand

blog.k10s.dev

451–460 of 656 posts

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

#451
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…

My own code is contortious. I refactor it regularly to reduce that, but it still can be better.

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

#452
I understand, and I saw this problem. It's actually quite hilarious that he got this far before noticing it.

But again, if you just guide the AI on architecture and review the code, you should be fine. The code that you write and the code that an AI writes are two different things; they will never be the same.

The AI is very helpful for generating code, and that is exactly how you should use it: as a code generator.

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

#453
post #291
post #264

Earlier quoted context omitted.

That doesn't quite work, and precisely for the reason I mentioned: You can definitely tell the AI to follow some strategy, but at some point the strategy will need to change, and the AI won't tell you that (even if you tell it to). Unless you read the code every time you won't know if the AI is following the strategy and producing good results or following it and producing bad results because the strategy has to chan…

How do you define "bad code"? If I instruct the AI to make small modules where I can verify they work, have tests and no side effects - then it is good enough code for me. It works, is readable and can be extended - and will turn into bad code if this is not done with care.

> How do you define "bad code"?

The harder the code is to understand, the badder it is (and the more likely it is infested with bugs).

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

#454
post #398

Earlier quoted context omitted.

I guess I don't understand how this logic doesn't apply to human developers.

Human developers don't produce code at such a rate, and their judgment is, on average, better. So one, the review doesn't make you feel like you're slowing things down much, and two, the problems are less hidden.

More code != better. Don't believe me? Which is more valuable, MS Word or all the code written as part of class projects?

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

#455

Earlier quoted context omitted.

> I wonder why? Because I like to save time?

Avoiding abstractions "because I like to save time" doesn't sound like something a professional software engineer should ever say

Isn't that the whole concept of "technical debt" though? This has been how software has been developed for quite a while, even pre-LLM. Sometimes your boss puts a thousand things on your plate and you take shortcuts on less important things to save time, and sometimes it works out well and sometimes it doesn't.

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

#456

Earlier quoted context omitted.

I let agents break things 30 changes down the line. If something breaks, I add a check to my project validator and start over, with the validator providing instructions on what was wrong and how to fix it. It's all automatic, and now I have a guard against the exact same error in the future. Some of these checks have caught thousands of the same error, even with the latest Opus 4.7 writing the original code.

You proved that testing is a good idea, not that vibe coding is a good idea.

To be honest, I am past the point of wanting to convince people that AI is useful, if you want to refuse new tools other people find helpful, your loss.

(Also I stick to the original definition of "vibe coding = not looking at generated code", "LLM assisted coding = verify generated code", I do both, depending on the task)

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

#457

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.

At least with current languages, I think the primary problem is they are globally complex, and it's not scalable for them (and certainly for you to review a codebase they've mainly or completely generated) that the invariants you want are being withheld.

No matter how many times you tell them - there is ZERO blocking allowed on the critical path, they will add blocking on the critical path.

No matter how many times you tell them any time they do X, they need Y type of test, they will do X without Y type of test.

They cannot follow directions 100%. Neither can people.

But they are more random. The mistakes people make are less likely to do the exact polar opposite of what you wanted to do.

People are less likely to see a critical invariant in the code, build themselves a loophole to get through it, write a test that the code fails successfully, and then tell you they did exactly what you asked for, and burry it in a 5k line commit, where 1000 lines are them changing comments that shouldn't be there in the first place.

LLMs are great. I'm convinced they're the future. I'm building a language specifically for them: https://GitHub.com/Cuzzo/clear - and to make it easier for YOU to work with them.

I think once we get around this language problem, that they need global context for things where they shouldn't, it will be a challenge to work with them.

I've had success with them, but it's been so frustrating, that I question how much it's been worth my sanity.

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

#458
post #235

Earlier quoted context omitted.

And the solution is the same, as when it was outsourced- and the "patch" was fix it by writing spec. Thus i conclude my TED talk with the statement: LLMs are the new outsourcing and run into the same problems.

Not quite, because the architecture often needs to evolve when you learn more as the project evolves. People will complain when they feel the constraints drive them to unnatural workarounds, the agents don't. You can try telling the agent to stop and ask when a constraint proves problematic, except it doesn't have as good a judgment as humans to know when that's the case. I often find myself saying, "why did you writ…

It has no judgement at all.

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

#459
post #329

Earlier quoted context omitted.

how do you know it matches? You did read it then?

Indeed, I'm not using LLM output without thorough review. After reading a bunch of other comments, it sounds like people are referring to letting agents go wild and code whatever off a limited prompt. I'm not using LLMs like that; I'm generally interacting only via conversations with pretty detailed initial prompts. My interactions with the chat after that are corrections/guiding prompts to keep it on point and edit…

Which defeats the purpose of using a LLM in the first place. Same as writing by hand but with a bill for tokens.

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

#460

Earlier quoted context omitted.

The "people" in your hypothetical story have been wrong the whole time. The correct attitude is: When AI can complete lines, you still have to read and understand the code. When AI can complete whole functions, you still have to read and understand the code. When AI can complete features and tickets, you still have to read and understand the code.

I'm no longer sure you have to, actually. I mean, we do trust the assembly that compilers produce without having to read it, don't we? We're rapidly getting to that stage with LLMs, IMO.

We don’t. That’s why tools like godbolt are popular, debuggers can jump into assembly, and compilers can output assembly files.
Post reply on HN