Live data from Hacker News

How to effectively write quality code with AI

heidenstedt.org

251–260 of 321 posts

Re: How to effectively write quality code with AI

#251

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 wonder over the long term how programmers are going to maintain the proficiency to read and edit the code that the LLM produces.

It’s going to be extremely difficult if PR and code reviews do not prune unnecessary functions. From what I’m experiencing now, there’s a lot of additional code that gets generated.

Re: How to effectively write quality code with AI

#252
post #30

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.

Maybe. But it's also likely that these tools will produce mountains of unmaintainable code and people will get buried by the technical debt. It kind of strikes me as similar to the hubris of calling the Titanic "unsinkable." It's an untested claim with potentially disastrous consequences.

I can provide evidence for your claim. The technical debt can easily snowball if the review process is not stringent enough to keep out unnecessary functions.

Re: How to effectively write quality code with AI

#253
post #116

The best thing about this is that AI bots will read, train on and digest the million "how to write with AI" posts that are being written right now by some of the smartest coders in the world and the next gen AI will incorporate all of this, making them ironically unnecessary.

Each extra generation of AI produced crap AI consumes as training, the worse it gets. This has been mathematically proven.

Strange since, in practice, coding models have steadily improved without any backward movement every 3-4 months for 2 years now. It's as if there are rigorous methods of filtering and curation applied when building your training data.

Re: How to effectively write quality code with AI

#254

The post touches very briefly on linting in 7. For me, setting up a large number of static code analysis checks has had the highest impact on code quality. My hierarchy of static analysis looks like this (hierarchy below is Typescript focused but in principle translatable to other languages): 1. Typesafe compiler (tsc) 2. Basic lint rules (eslint) 3. Cyclomatic complexity rules (eslint, sonarjs) 4. Max line length en…

Not a catch all to fix issues agree with linting. Being very strict with linters has become very cheap with coding agents and it keeps you up to date with code standards and keeps code style homogenous which is very nice when you are reviewing professional code, regardless of who wrote it.

It’s also tricky otherwise if you have to occasionally review lazily written manual code mixed with syntactically formal/clean but functionally incorrect AI code.

Re: How to effectively write quality code with AI

#255
post #235

Earlier quoted context omitted.

A/B happen at different abstractions levels. My abstraction level will be automated. My manager’s level will probably last another year or so.

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.

Re: How to effectively write quality code with AI

#256

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…

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.

> the cost-benefit analysis clearly favors letting these tools rip

Does it? I have yet to see any evidence that they are a net win in terms of productivity. It seems to just be a feeling that it's more efficient.

Re: How to effectively write quality code with AI

#257

Earlier quoted context omitted.

Yep, its a rather depressing realization isnt it. Oh well, life moves on i suppose. I think we realistically have a few years of runway left though. Adoption is always slow outside of the far right of the bell curve.

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 Claude and there’s no question I am now a high velocity “builder” and my broad experience has some value here. I am sad that I won’t be able to deeply look at all the code I am producing, but I am making sure the LLM and I structure things so that I could eventually dig in to modules if needed (unlikely to happen I suppose).

Anyway, my hope/question: if I embrace my new role as fast system builder and I am creative in producing systems that solve real problems “first”, is there a path to making that a career (I.e. 4 friends and I cranking out real production software that’s filling a real niche)? There must be some way for this to succeed —- I am not yet buying the “everything will be instantly copyable and so any solution is instantly commodity” argument. If that’s true, then there is no hope. I am still in shape, though, so going pro in pickleball is always an option, ha ha.

Re: How to effectively write quality code with AI

#258

Why shallow and likely generated posts of a “Knowledge Management Advocate” get so many stars on hn? Just because of a hype?

Yes this is strange. There's nothing of substance here that hasn't been repeated many times before. BUT...I did click it out of interest. So maybe it just came at an opportune lull in these types of posts and during the inflection point of 4.6 and 5.3 release. Complete guess

Re: How to effectively write quality code with AI

#259
post #226

Earlier quoted context omitted.

Do you mean, from your perspective, within 2 years humans won’t be able to bring anything of value to the equation in management and control ?

No, I mean that my job in its current form – as an ML researcher with a phd and 15 years of experience - will be completely automated within two years.

What are you going to do for work in 2 years?

Re: How to effectively write quality code with AI

#260

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

In my circles see some overlap with the people who are like: "Done! Let's move on" and don't worry about production bugs, etc. "We'll fix it later".

I've always stressed out about introducing bugs and want to avoid firefighting (even in orgs where that's the way to get noticed).

Too much leaning on coding tools and agents feels to sketchy to someone like me right now (maybe always tbh)

Post reply on HN