Live data from Hacker News

How to effectively write quality code with AI

heidenstedt.org

121–130 of 321 posts

Re: How to effectively write quality code with AI

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

Alternatively, another second order effect is can't sip latte anymore because you're orchestrating 8 bots do the work and you're back to 80%-100% time saturation.

Re: How to effectively write quality code with AI

#122

Earlier quoted context omitted.

Man, you are really missing out of the biggest revolution of my life. This is the opinion of someone who has not tried to use Claude Code, in a brand new project with full permissions enabled, and with a model from the last 3 months.

This is a fading but common sentiment on hacker news. There’s a lot of engineers who will refuse to wake up to the revolution happening in front of them. I get it. The denialism is a deeply human response.

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!"?

Re: How to effectively write quality code with AI

#123

I wonder at the end of this if it's the still worth the risk? A lot of how I form my thoughts is driven by writing code, and seeing it on screen, running into its limitations. Maybe it's the kind of work I'm doing, or maybe I just suck, 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.

I also second this. I find that I write better by hand, although I work on niche applications it’s not really standard crud or react apps. I use LLMs in the same way i used to used stack overflow, if I go much farther to automate my work than that I spend more time on cleanup compared to if I just write code myself. Sometimes the AI does weird stuff too. I wrote a texture projection for a nonstandard geometric primit…

  > I use LLMs in the same way i used to used stack overflow, if I go much farther to automate my work than that I spend more time on cleanup compared to if I just write code myself.
yea, same here.

i've asked an ai to plan and setup some larger non straight forwards changes/features/refactorings but it usually devolves into burning tokens and me clicking the 'allow' button and re-clarifying over and over when it keeps trying to confirm the build works etc...

when i'm stuck though, or when im curious of some solution it usually opens the way to finish the work similar to stack overflow

Re: How to effectively write quality code with AI

#124

I wonder at the end of this if it's the still worth the risk? A lot of how I form my thoughts is driven by writing code, and seeing it on screen, running into its limitations. Maybe it's the kind of work I'm doing, or maybe I just suck, 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.

> A lot of how I form my thoughts is driven by writing code, and seeing it on screen, running into its limitations. If you need that, don't use AI for it. What is it that you don't enjoy coding or think it's tangential to your thinking process? Maybe while you focus on the code have an agent build a testing pipeline, or deal with other parts of the system that is not very ergonomic or need some cleanup.

  > If you need that, don't use AI for it.
this is the right answer, but many companies mandate to use ai (burn x tokens and y percent of code) now, so people are bound to use it where it might not fit

Re: How to effectively write quality code with AI

#125

That sounds like the advice of someone who doesn't actually write high-quality code. Perhaps a better title would be "how to get something better than pure slop when letting a chatbot code for you" - and then it's not bad advice I suppose. I would still avoid such code if I can help it at all.

Look up luddites on Wikipedia, might be too deep to see the similarities though.

I heard that about NFTs not long ago.

Re: How to effectively write quality code with AI

#126
post #90

The first rule is an antipattern. I think describing your architecture or ANY kind of documentation for your AI is an anti-pattern and blows the context window leading to worse results, and actual more deviation. The controlling systems are not give it more words at the start. Agentic coding needs to work in loop with dedicated context. You need to think about how can i give as much intent as possible with as little…

  > repo will always win over documentation
it really does seem like this... also new devs are like that too: "i just copied this pattern use over here and there whats wrong?" is something i've heard over and over lol

i think languages that allow expression of "this is deprecated, use x instead" will be usefull for that too

Re: How to effectively write quality code with AI

#127

I wonder at the end of this if it's the still worth the risk? A lot of how I form my thoughts is driven by writing code, and seeing it on screen, running into its limitations. Maybe it's the kind of work I'm doing, or maybe I just suck, 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.

Historically software engineering has been seen as "assembly line" work by a lot of people (see all the efforts to outsource it through spec handoffs and waterfall through the years) but been implemented in practice as design-as-you-build (nobody anticipates all the questions or edge cases in advance, software specs are often an order of magnitude simpler than the actual number of branches in the code). For mission-c…

> software specs are often an order of magnitude simpler than the actual number of branches in the code

Love this! Be it design specs or a mock from the designer. So many unaccounted for decisions. Good devs will solve many on their own, uplevel when needed, and provide options.

And absolutely it means more design up front. And without human in the direct loop, maybe people won’t skimp on this!

Re: How to effectively write quality code with AI

#128

Earlier quoted context omitted.

Somehow I appreciate this type of attitude more than the one which reflects total denial of the current trajectory. Fervent denial and AI trash-talking being maybe the single most dominant sentiment on HN over the last year, by all means interspersed with a fair amount of amazement at our new toys. But it is sad if good programmers should loose sight of the opportunities the future will bring (future as in the next f…

I get crazy over the 'engineer are not paid to write loc', nobody is sad because they don't have to type anymore. My two issues are it levels the delivery game, for the average web app, anybody can now output something acceptable, and then it doesn't help me conceptualize solution better, so I revert to letting it produce stuff that is not maleable enough.

I wonder about who "anybody can now output something acceptable" will hit most - engineers or software entrepreneurs.

Any implementation moat around rapid prototyping, and any fundraising moat around hiring a team of 10 to knock out your first few versions, seems gone now. Trying to sell MVP-tier software is real hard when a bunch of your potential customers will just think "thanks for the idea, I'll just make my own."

The crunch for engineers, on the other hand, seems like that even if engineers are needed to "orchestrate the agents" and manage everything, there could be a feature-velocity barrier for the software that you can still sell (either internally or externally). Changing stuff more rapidly can quickly hit a point of limited ROI if users can't adjust, or are slowed by constant tooling/workflow churn. So at some point (for the first time in many engineers' career, probably) you'll probably see product say "ok even though we built everything we want to test, we can't roll it all out at once!". But maybe what is learned from starting to roll those things out will necessitate more changes continually that will need some level of staffing still. Or maybe cheaper code just means ever-more-specialized workflows instead of pushing users to one-size-fits-all tooling.

In both of those cases the biggest challenge seems to be "how do you keep it from toppling down over time" which has been the biggest unsolved problem in consumer software development for decades. There's a prominent crowd right now saying "the agents will just manage it by continuing to hack on everything new until all the old stuff is stable too" but I'm not sure that's entirely realistic. Maybe the valuable engineering skills will be putting in the right guardrails to make sure that behavioral verification of the code is a tractable problem. Or maybe the agents will do that too. But right now, like you say, I haven't found particularly good results in conceptualizing better solutions from the current tools.

Re: How to effectively write quality code with AI

#129
post #9

Too bad that software developers are carrying water for those who hate them and mock them for being obsolete in 6-12 months, while they are eating caviar (probably evading sanctions) and clink the champagne glasses in Davos: https://xcancel.com/hamptonism/status/2019434933178306971 And all that after stealing everyone's output.

I’ll believe it when those same engineers fix CC’s awful performance (mostly kidding, though I do wonder why they can’t. Feels like it’s doable).

In reality that man is hoping to IPO in 6-12 months, if anyone is wondering why the “use claude or you’re left behind” is so heavy right now.

Re: How to effectively write quality code with AI

#130

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.

Imagine everyone who is in less technical or skilled domains.

I can't help but resist this line of thinking as a result. If the end is nigh for us, it's nigh for everyone else too. Imagine the droves of less technical workers in the workforce who will be unseated before software engineers. I don't think it is tenable for every worker in the first world to become replaced by a computer. If an attempt at this were to occur, those smart unemployed people would be a real pain in the ass for the oligarchs.

Post reply on HN