Live data from Hacker News

I'm going back to writing code by hand

blog.k10s.dev

481–490 of 656 posts

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

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

>Yep. The only people I've heard saying that generated code is fine are those who don't read it.

If you already have a mature code base, then it's very easy to get AI to write excellent code. It has a ton of documentation on what you already do, how you do things, functions to use etc.

I read all the changes AI does. I work in small chunks.

>Even if you have an architecture in mind, and even if the agent follows it, sooner or later it will need to be reconsidered

The agent can modify the structure you want to change to 100x faster than you can. That's the beauty of it. We all know how hard it is manually to make architectural changes once you've started to lock into something.

These comments just show me you must not be using AI in the right way, or haven't used it enough to learn "how" to use it. I've been using claude code months now at full speed. You are simply wrong that it doesn't generate good code.

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

#482
I'm generally in agreement with everyone here. - Some code is ephemeral - it's generated to do the thing, thrown away end of session and the csv was imported successfully (or whatever). Make sure you have at least some testing of the output or you may find the email is in the last name field for some rows. If possible, have an API your agent uses with rich domain types and validations that force it to do things right or do them again (and that it' can't rewrite to relax the constraints!) - You can one or few shot a real app - for a few users, for a small set of use cases. Scope of this will improve with models, but at least today it's spelling bee app for my kids" not "salesforce replacement for millions of workers". - You can add rich validation steps for all types of quality that you care about which (assuming they converge) can deliver high performance, well designed and functionally correct code mostly autonomously.

I'm building an orchestrator (who isn't). Haven't looked at the code yet, but it appears to work. But man have I spent hours in loops between Claude, Codex and myself all on the highest thinking levels to figure out what interface portability means for the employee, how best to handle "remote" sessions and the appropriate semantics for pipelines/recipes.

I've also been very opinionated about who does what. I'll let the agent write a script to sync with github and reload workers, but I decided to "waste" the 5 minutes to manually do all of the config steps on render for my server when claude told me that I couldn't just give it read only scope to pull the logs. Bad news, I'm cutting and pasting for my computer overlord. Good news? Claude can't blow away the prod db if it happens to get in the way of whatever interpretation is makes of the instructions I give it.

A chainsaw requires very different skills that an axe. It has different failure modes. Some experience as a lumberjack probably helps using either/both.

No difference (at least now) with agents.

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

#483

Earlier quoted context omitted.

The concept of a small module is an architecture invariant. You’re making that decision, not the LLM. And you’ve made that decision because the machine is not good at certain things. You’re doing that because you can’t trust the LLM to make that decision on its own.

I’m doing it because as a DDD adherent, I’ve been building software that way for 15 years without GenAI and now with GenAI I can do it faster. You can’t play whack-a-mole with GenAI. You have to start from well-known principles and watch everything it produces. Every module or bounded context has to have its own invariants. You can’t fully automate software engineering with GenAI. It seems the vast majority of GenAI…

Love the DDD callout. I have explicit steps to review and rate delta's to the ubiquitous language and one of my architectural reviewers will often engage with me about where the bounded contexts should be and will probably the translation layers.

I find the more good practices I add to my envision/scope/spec/build/test/deploy loops the happier I am with the outcomes.

I will say that I am finding the actual code to be somewhat ephemeral for me - the more precise the specifications are and generally the tighter and more elegant the design is, the less the code matters as a long term artifact.

I'm not at the "code is assembler" point yet - but I could see that with more, richer specs I could end up there. Of course the specs are then substantial, but declarative specs can be robust and unambigous (with sufficient read teaming review) and - like domain specific languages - reduce the accidental complexity of the syntax when compared to an implementation in a given language.

There are exceptions to all of this, but it's fascinating to see how it's evolving!

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

#484
post #375

Earlier quoted context omitted.

And humans produce 100% reasonable code or what? The kind of mess me and everyone I've worked with produces by hand is the inverse of that. Constant shortcuts and lazy slop through and through. Never worked anywhere where the code wasn't an entangled disarray. As soon as requirements change the abstractions fall apart and everything gets shoehorned.

> And humans produce 100% reasonable code or what? Humans can be held accountable for their own slop > The kind of mess me and everyone I've worked with produces by hand is the inverse of that Yes, it's frustrating to work with isn't it? So why are you so excited to make higher volumes of this low quality slop using AI?

I hear you. You're frustrated. Some people are having success with it. What have you tried to do with it?

> Humans can be held accountable for their own slop

If you're a human and AI writes code for you you are ultimately responsible.

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

#485

Earlier quoted context omitted.

So, basically you need to micro-manage it. Where are your 10x gains now? And is it fun to work like that?

This is actually what I do. I'm extremely picky about the code and force the LLM to rewrite it 1000x times until it is basically exactly what I want. You might be wondering what is the point when it would be faster for me to just write the code myself? I have ADHD and for whatever reason telling the LLM what to do instead of doing it myself bypasses the task avoidance patterns and/or focus problems I tend to suffer f…

This is me in the evening working on a side project.

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

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

You’re going to be the least productive developer in any work setting from this point on. There are people checking in 50k lines of solid TDD verified, non bloat, instrument performance checked feature code per day. Your 200 lines isn’t going to cut it for very long.

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

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

>Yep. The only people I've heard saying that generated code is fine are those who don't read it. If you already have a mature code base, then it's very easy to get AI to write excellent code. It has a ton of documentation on what you already do, how you do things, functions to use etc. I read all the changes AI does. I work in small chunks. >Even if you have an architecture in mind, and even if the agent follows it,…

> I work in small chunks

I'm surprised this still needs to be said. I'm convinced that posts like these are from people that let the LLM run wild. Small chunk PRs is the key whether its a human or an LLM

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

#488
post #409

Earlier quoted context omitted.

Juniors learn. Some juniors are potential good seniors. Over time they will internalise good architecture and be able to make good judgments on their own. Micromanaging LLMs is like having Dory from Finding Nemo as your colleague. You find ways to communicate, but there is no learning going on.

Juniors don't always learn.

That's still better than LLMs, which are by their very nature incapable of learning. I'll take "sometimes learns" over "never learns".

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

#489

Earlier quoted context omitted.

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…

So, basically you need to micro-manage it. Where are your 10x gains now? And is it fun to work like that?

The 10x gains don't exist. Anyone with a modicum of programming skill and hype resistance has been saying this for a while.

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

#490

Earlier quoted context omitted.

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...

Compilers are deterministic, LLMs are not. Big difference...
Post reply on HN