Live data from Hacker News

I'm going back to writing code by hand

blog.k10s.dev

201–210 of 656 posts

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

#201

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

And when you got familiar with the other parts, you realize that writing code is the most enjoyable one. More often than not, you’re either balancing trade offs or researching what factors yoy have missed with the previous balancing. When you get to writing code, it’s with a sigh of relief, as that means you understand the problem enough to try a possible solution. You can skip that and go directly to writing code. B…

Very well said. When I'm working on a hard problem I'll often spend a few weeks sweating details like algorithms, API shapes, wire formats, database schemas, etc. These things are all really easy to change while they're just in a design document. Once you start implementing, big sweeping edits get a lot more difficult. So better to frontload as much of that as possible in the design phase. AI coding agents don't change this dynamic. However all that frontloaded work pays off big when it does come time to implement, because the search space has been narrowed considerably.

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

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

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.

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

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

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.

Don't outsource either then

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

#204

Earlier quoted context omitted.

This is great until the "gun to your head" is your skip-level manager demanding that a feature be implemented by the end of the week, and they know you can just "generate it with AI" so that timeline is actually realistic now whereas two years ago it would have required careful planning, testing, and execution.

Well, that's nice. Your manager is unknowingly helping you create a form of job security for yourself, with all the technical debt and bugs being accumulated. He might not understand it, and it might not be the type of work you want to do, but someone is going to have to fix those issues. And the longer they wait, the bigger the task gets.

The question is, is it a job you actually still want once the poo pile reaches critical mass you are the only one with a shovel and the deadline is "yesterday"

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

#205

Earlier quoted context omitted.

That’s why I love gemini - none of this bullshit ever happen.

I do not think Gemini can relieve a developer from knowing what he is doing.

There's some really weird and unusual posts glazing Google in here today. Bot accounts out in force!

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

#206

Earlier quoted context omitted.

I think this is true, but i imagine there's a workflow solution to this which isnt to drop AI. Eg., treating AI code generated as immediately legacy, with tight encapsulation boundaries, well-defined interfaces etc. And integrating in a more manual workflow. There's a range from single-shot prompts to inline code generation, that will make more sense depending on the problem and where in the code base it is. Single-s…

That workflow just sounds exhausting to me. Would I always need to consider how much of a blast radius my AI-generated code might have? Sounds like there’s so much extra management going into these micro decisions that it ultimately defeats the purpose of generating code altogether. I could see value in using it during the prototyping phase, but wouldn’t like to work like you described for a serious project for end u…

I just don't like to type code anymore. If I can accomplish the same by describing the code, and get the same results as if I typed it myself, I'll opt for not typing so damn much. I've done so much typing in my career, that typing ~80% less to get the same results, makes a pretty big difference in how likely I am to set out to accomplish something.

I care more about code quality now, because typing no longer limits if I feel like it's worth to refactor something or not.

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

#207
I'm moving very slowly into AI coding. I'm not comfortable enough to let Claude do anything big. What I do is this: I set out general architecture, create function stubs and add comments on how to implement things. Then I let Claude do 10 minutes of work and I check everything and refactor some of it. It saves me on boring implantation stuff (like, is this an array, move an index here or there, check for whatever exists or not, put it in the db)

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

#208

Earlier quoted context omitted.

I think this is true, but i imagine there's a workflow solution to this which isnt to drop AI. Eg., treating AI code generated as immediately legacy, with tight encapsulation boundaries, well-defined interfaces etc. And integrating in a more manual workflow. There's a range from single-shot prompts to inline code generation, that will make more sense depending on the problem and where in the code base it is. Single-s…

That workflow just sounds exhausting to me. Would I always need to consider how much of a blast radius my AI-generated code might have? Sounds like there’s so much extra management going into these micro decisions that it ultimately defeats the purpose of generating code altogether. I could see value in using it during the prototyping phase, but wouldn’t like to work like you described for a serious project for end u…

And you have discovered the job of managers! There has always been a lot of hate for managers. Wonder if the robots hate us just as much? (I often feel a weird guilt when I tell an agent to do something I know I am going to throw away but will serve as an interesting exploration...I know if I did that to a human they would be pissed...)

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

#210
I ran quite early into the same issues with my rust pet projects. Single structs with tons of Option and validation methods etc. enums for type fields combined with says optional fields in the same layer so accessor methods all return Option.

I add now a long list of instructions how to work with the type system and some do’s and don’ts. I don’t see myself as a vibe coder. I actually read the damn code and instruct the ai to get to my level of taste.

Post reply on HN