Live data from Hacker News

I'm going back to writing code by hand

blog.k10s.dev

611–620 of 656 posts

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

#611
post #238

Earlier quoted context omitted.

Sure. I'm talking about production software that needs to survive and evolve for a long while.

Can you not review it?

I'm really amused at how quickly things changed from "yes, the AI is writing it all, but I'm carefully reviewing every line" to "it would take too long and be too confusing to review any of it"

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

#612
post #235

Earlier quoted context omitted.

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…

So I run a solo saas that supports my family, and so the stakes feel very high for me. I use AI heavily, and I’ve seen the exact problem you’re describing. I feel like I’m often really riding the edge in terms of trying to use AI to accelerate product development while not letting tech debt accumulate too fast, or let my mental model of the codebase slip too much. Here’s what’s working for me right now: 1. The basics…

Legit so funny that this is downvoted. The anti-AI people are such snowflakes lol

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

#614

I also code by hand. But in my main work, reverse engineering, LLMs are godsend, for years now. You can basically bruteforce binary obfuscation thanks to them. And thanks to eager chinese LLM providers, basically for free. But I always use LLM only for boring work and rest is for me to do manually, or with scripts of course, but made by me. Because I want to learn. Yes, there are a lot people using LLMs for full RE a…

>Second agent implements new Photoshop based on that.

>They will be mad and I like this.

I suspect through some convoluted legal mechanism this kind of thing is going to end up applying only to copyleft laundering and not against players like Adobe.

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

#615

> The other change is simpler: I'm doing the design work myself, by hand, before any code gets written. Not a vague doc. Concrete interfaces, message types, ownership rules. That’s the hard part of coding. If you have an architecture then writing the code is dead simple. If you aren’t writing the code you aren’t going to notice when you architected an API that allows nulls but then your database doesn’t. Or that it d…

Yes, I think there's 2 kinds of developer. Those who think the code is the hard part, and those that don't. The developers that thing coding is hard are the ones that absolutely love AI coding. It's changed their world because things they used to find hard are now easy. Those that think coding is easy don't have such an easy time because coding to them is all about the abstractions, the maintainability and extensibil…

I'd fall somewhere in the middle.

I like coding, I just don't particularly enjoy figuring out the framework du jour. The task at hand is interesting, but the part where I need to figure out what are the incantations to have a Qt list with images in it is not. I need a working UI to get the thing done, but the framework stands in my way, requiring me to step away from my task intended task and spend a few hours on understanding QTreeView.

That's where I really enjoy AI currently, because I can get the GUI stuff out of the way much faster and get back to the thing the GUI is for.

Now within the specific problem I'm trying to solve, sure, I enjoy thinking about the abstractions, maintainability and extensibility. That's the part that actually matters. But the Qt UI on top, that's just a visual layer with a structure that was already set in stone, there's no big decisions of interest to make there. Just to figure out how to make it do the thing.

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

#617

Earlier quoted context omitted.

The assembly is a deterministic transform of the input logic, and if it doesn't match then it's a bug in the compiler. If an LLM-based code generator doesn't match what you asked for, that's OK, just pull the slot-machine handle again. that's the difference.

The "pull the slot-machine handle again" is the dangerous thing here. I can feel it sometimes, as my brain shuts down and I gamble instead of thinking. It's a reversion to what I call "monkey mind" where you just keep pressing buttons to "make it work". I took a decade training my mind away from this, and too much AI is bringing it back.

The issue here is not just the gambling aspect, but verification that you got what you asked for. Code problems can be extremely subtle, and the cost of verification is deceptively high, ruining the advantages of using AI in the first place.

I truly believe that people claiming huge productivity gains from AI are either terribly slow programmers or are skipping their due diligence. Many "vibe coders" are incapable of checking the output of the code.

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

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

If you know how to write good code you can force AI to write good code with various techniques. It's 100% doable. You just need to figure out the problems AI has and find solutions to make it easier for it. Ex: extremely small contexts Modularize to modules with clear boundaries and only allow the AI to work within those boundaries. Make modules pure from IO so they are easily testable. Hide modules behind interfaces…

"Force" is often an unrealistic expectation, though. Taking Claude Code as an example: you can add as many rules / guidelines as you want in instruction files, but they will not be followed 100% of the time, and more is not better [1].

You can of course use PreToolUse hooks to block particularly damaging actions of the "rm -rf" variety, but this is also not 100% guaranteed unless you're able to block _all_ ways of performing that damaging action (and you would be surprised: agents will happily write custom python / bash / etc. scripts to do actions you tried to block them from doing!)

Tools help instruct the agent to redo work e.g. to pass linter / formatter checks or relevant tests. But I've also seen them ignore those, often enough to be noticeable: e.g. "17 of 18 tests pass, the other 1 wasn't introduced by this feature" - regardless of whether that's actually true or not, regardless of whether I put "ALWAYS make sure ALL affected tests pass" in an instruction file somewhere.

This isn't to refute your main point: yes, you can improve your chances that AI will write good code. But there is no magic bullet that will force it, 100% of the time, to write good code; this is where vibe coders without requisite coding + engineering skills hit a wall. A multi-layered approach of guidelines + progressive disclosure + tools + hooks indeed reduces the probability of bad code enough to be useful for many engineering tasks.

[1] https://straion.com/blog/1m-tokens-wont-save-your-engineerin...

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

#619
post #76

I've set a few rules for working with coding agents: 1. If I use a coding agent to generate code, it should be something I am absolutely confident I can code correctly myself given the time (gun to my head test). 2. If it isn't, I can't move on until I completely understand what it is that has been generated, such that I would be able to recreate it myself. 3. I can create debt (I believe this is being called Cogniti…

It's not worth fighting it at work. If the idiots you work for want everything vibe coded and delivered at 5 * 2025 speed then just vibe code and try to leave the company ASAP. That's where I am right now. Of course I might end up somewhere just as ridiculous or maybe not be able to even find another job. Shitty times we live in right now.

I'm hoping I'll manage to skate by long enough that by the time something like that comes to pass I can just retire

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

#620
post #76

I've set a few rules for working with coding agents: 1. If I use a coding agent to generate code, it should be something I am absolutely confident I can code correctly myself given the time (gun to my head test). 2. If it isn't, I can't move on until I completely understand what it is that has been generated, such that I would be able to recreate it myself. 3. I can create debt (I believe this is being called Cogniti…

While this is all good practice in theory, I wonder how much discipline plays a role here?

I am not very disciplined, and find it too convenient to reach for an agent these days.

This may sound ridiculous, but I am addicted to nicotine. I used to have some sort of rule around how I am allowed to use nicotine pouches to manage my addiction. For example after I finish writing a feature, I could have one pouch. It was obviously a dumb idea that didn't last very long.. But in that specific aspect, coding agents feel similar. I tried setting up rules on how I should use them, but it's not easy to follow them.

Maybe the biggest problem is just guilt?

Post reply on HN