Live data from Hacker News

How to effectively write quality code with AI

heidenstedt.org

261–270 of 321 posts

Re: How to effectively write quality code with AI

#261
post #81

Earlier quoted context omitted.

I second this. This* is the matter against which we form understanding. This here is the work at hand, our own notes, discussions we have with people, the silent walk where our brain kinda process errors and ideas .. it's always been like this since i was a kid, playing with construction toys. I never ever wanted somebody to play while I wait to evaluate if it fits my desires. Desires that often come from playing. Ou…

> I see people at work who are drooling about being able to have code made for them .. but I'm not in that group. people seem to have a inability to predict second and third order effects the first order effect is "I can sip a latte while the bot does my job for me"... well, great I suppose, while it lasts but the second order effect is: unless you're in the top 10%, you will now lose your job, permanently and the th…

Exactly this. Even if right now you, bottom level wage earning grunt, get to lighten your workload for a fleeting second, sit back and enjoy the latte it's only but a fleeting second until the capital class tighten the screws.

Most people will get laid off and made redundant and those who remain are going to have to run faster than ever to produce wealth for the capital owners.

Re: How to effectively write quality code with AI

#262
post #255

Earlier quoted context omitted.

So your assumption is that it will ultimately be the users of software themselves who will throw some every day language at an AI and it will reliably generate something that meets those users' intuitive expectations?

Yes, it will be at least as reliable as an average software engineer at an average company (probably more reliable than that), or at least as reliable as a self-driving car where a user says get me to this address, and the car does it better (statistically) than an average human driver.

I think this could work for some tasks but not for others.

We didn't invent formal languages to give commands to computers. We invented them as a tool for thinking and communicating things that are hard to express in natural language.

I doubt that we will stop thinking and I doubt that it will ever be efficient to specify tasks purely in terms of natural language.

One of my first jobs as a software engineer was for a bank (~30 years ago). This bank manager wasn't a man of many words. He just handed us an Excel sheet as a specification for what he wanted us to implement.

Re: How to effectively write quality code with AI

#263

Earlier quoted context omitted.

Everything you have said here is completely true, except for "not in that group": the cost-benefit analysis clearly favors letting these tools rip, even despite the drawbacks.

Oh I'm well aware of this. I admitted defeat in a way.. I can't compete. I'm just at loss, and unless LLM stall and break for some reason (ai bubble, enshittification..) I don't see a future for me in "software" in a few years.

I feel the same. And I expect even a lot of the early adopters and AI enthusiasts are going to find themselves as the short end of the stick sooner than later.

"Oops I automated myself out a job".

Re: How to effectively write quality code with AI

#264

Earlier quoted context omitted.

Where is all the amazing software and/or improvements in software quality that is supposed to be coming from this revolution? So far the only output is the "How I use AI blogs", AI marketing blogs, more CVEs, more outages, degraded software quality, and not much of shipping anything. Is there any examples of real products and not just anecdotes of "I'm 10x more productive!"?

I was in the same mindset until I actually took the Claude code course they offer. I was doing so much wrong. The two main takeaways. Create a CLAUDE.md file that defines everything about the project. Have Claude feed back into the file when it makes mistakes and how to fix them. Now it creates well structured code and production level applications. I still double check everything of course, but the level of errors i…

[deleted]

Re: How to effectively write quality code with AI

#265
[using an lmm as stack overflow]

even if you check and redo after paste, you need to check for gotchas. I wish I had a nickel for every time the llm gave me a solution with a hidden limitation. assume that it violates all your unspoken assumptions, and adheres only to what you nailed down in your prompt

Re: How to effectively write quality code with AI

#266
post #176

Earlier quoted context omitted.

>but the code to me is a forcing mechanism into ironing out the details, and I don't get that when I'm writing a specification. This is so on point. The spec as code people try again and again. But reality always punches holes in their spec. A spec that wasn't exercised in code, is like a drawing of a car, no matter how detailed that drawing is, you can't drive it, and it hides 90% of the complexity. To me the value…

I love using LLMs as well as rubber ducks - what does this piece of code do? How would you do X with Y? etc. The problem is that this spec-driven philosophy (or hype, or mirage...) would lead to code being entirely deprecated, at least according to its proponents. They say that using LLMs as advisors is already outdated, we should be doing fully agentic coding and just nudge the LLM etc. since we're losing out on 'pr…

>They say that using LLMs as advisors is already outdated, we should be doing fully agentic coding and just nudge the LLM etc. since we're losing out on 'productivity'.

As long as "they" are people that either profit from FOMO or bad developers that still don't produce better software than before, I'm ok ignoring the noise.

Re: How to effectively write quality code with AI

#267
post #81

Earlier quoted context omitted.

I second this. This* is the matter against which we form understanding. This here is the work at hand, our own notes, discussions we have with people, the silent walk where our brain kinda process errors and ideas .. it's always been like this since i was a kid, playing with construction toys. I never ever wanted somebody to play while I wait to evaluate if it fits my desires. Desires that often come from playing. Ou…

> I see people at work who are drooling about being able to have code made for them .. but I'm not in that group. people seem to have a inability to predict second and third order effects the first order effect is "I can sip a latte while the bot does my job for me"... well, great I suppose, while it lasts but the second order effect is: unless you're in the top 10%, you will now lose your job, permanently and the th…

Yea, I don’t think that will be the case. Spreadsheets simplified the work of junior finance people who did all the work by hand before. But more people work in finance now than before.

Re: How to effectively write quality code with AI

#268

Earlier quoted context omitted.

i'm sorry if I pulled everybody down .. but it's been many months since gemini and claude became solid tools, and regularly i have this strong gut feeling. i tried reevaluating my perception of my work, goals, value .. but i keep going back to nope.

After a multi-decade career that spanned what is rapidly seeming like the golden age of software development, I have two emotions: first gratefulness; second a mixture of resignation, maudlin reflection, and bitterness that I am fighting hard to resist. As someone who’s always wanted to “get home and code something on my own”, I do have a glimmer of hope that I wonder if others share. I’ve worked extensively with Cla…

Unfortunately you aren't a high velocity builder. The velocity curve has now shifted and everyone having Claude blast out loc after loc is now a high velocity builder. And when everyone is a high velocity builder...nobody is.

Re: How to effectively write quality code with AI

#269
post #255

Earlier quoted context omitted.

Yes, it will be at least as reliable as an average software engineer at an average company (probably more reliable than that), or at least as reliable as a self-driving car where a user says get me to this address, and the car does it better (statistically) than an average human driver.

I think this could work for some tasks but not for others. We didn't invent formal languages to give commands to computers. We invented them as a tool for thinking and communicating things that are hard to express in natural language. I doubt that we will stop thinking and I doubt that it will ever be efficient to specify tasks purely in terms of natural language. One of my first jobs as a software engineer was for a…

My job right now is to translate natural English statements from my bosses/colleagues into natural English instructions for Claude. Yes, it takes skill and experience to do this effectively. But I don't see any reasons Gemini 4, Opus 5 or GPT-6 won't be able to do this just as well as I do.

Re: How to effectively write quality code with AI

#270
post #234

I'd add: Religiously, routinely refactor. After almost every feature I do a feature level code analysis and refactoring, and every few features - codebase wide code analysis and refactoring. I am quite happy with the resulting code - much less shameful than most things I've created in 40 years of being passionate about coding.

This. Historically there's been a lot of resistance to the idea of refactoring or refining features. The classic "It works, just ship it" mentality that leaves mountains of tech debt in its wake.

And there _was_ a good reason to resist refactoring. It takes time and effort! After "finishing" something, the timeline, the mental and physical energy, the institutional support, is all dried up. Just ship it and move on.

But LLMs change the equation. There's no reason to leave sloppy sub-optimal code around. If you see something, say something. Wholesale refactoring your PR is likely faster than running your test suite. Literally no excuses for bad code anymore.

You'd think it didn't need to be said but, given we have a tool to make coding vastly more efficient, some people use that tool to improve quality rather than just pump out more quantity.

Post reply on HN