Hacker News new | ask | show | jobs
by solid_fuel 20 days ago
> i think the point is that, code quality as we used to define it doesn't matter any more, that from here on code will be written, reviewed, tested and maintained by machines.

Code quality was never a one dimensional metric that just meant "easy for humans to read". Perhaps this distinction has been lost over time, or was never internalized by some parts of the industry, but high quality code is narrow in its function and design. It is well specified, with limited dimensions of variability - this is part of what metrics like cyclomatic complexity measure.

The reason for that is that the input space - the sheer combinations of possible input - of a piece of code grows far faster than the intended functionality of the code. Good code operates on a narrow space and that is important because it is both easier for humans to comprehend, and easier to test. Code that is easier to reason about is easier to validate - by humans, by automatic testing, and by LLMs.

Poorly written code is both harder to understand and harder to validate. An LLM is not an escape hatch that negates that.

1 comments

Isn't an escape hatch yet...

I think there is a huge amount of resistance to a near-term future where it's more about the ability to describe and specify a thing than it currently is to code up a thing in order to build it. And I suspect that LLMs or whatever succeeds them will continue improving from here without any of the claptrap about a near-term malevolent superintelligence that's out to kill us all.

The future IMO will be relatively efficient code with independent models reviewing for quality and security afterwards. Life continues to come at us fast.

Programming languages are a terse way to describe the logic we want, so if you understand what needs to be built well enough it's possible to write it out faster in code.

Natural language is more ambiguous so you often need more of it to describe something. Specifications if consistent often end up as a kind of programming language in themselves, but usually ambiguous on matters that affect performance.

I'm with you on the review side though. Even the best models of today give some nonsense in reviews, but if you understand the code it's usually easy to skim the review and skip over nonsense.

I've been programming for many decades and I go all the way back to FORTRAN IV to C/C++ through CUDA. That said, there are tasks I can more easily describe than implement. I no longer bother resolving config issues on my machines, I let the coding agents do that as one example and then explain their fix to me.

But you are right about the efficiency of description given you have the 10,000+ hours into writing efficient code in the chosen language. Most do not. And they hide that by leaning on Python and its insane library toolchain which itself becomes its own skill set, but one more amenable to LLMs to master.

To be brutally efficient, one would write everything in machine code, no?

One more thing: any low-level coding legend will tell you to focus on the 2% of the code that eats 98% of time. That leaves the other 98% of the codebase as fair game for increasingly trustworthy coding models as AI becomes the new compiler.

If you micro-optimize an entire codebase yourself, not only will you never get the job done, the hardware and architecture underneath will shift faster than you can specify your precise intent. CUDA itself proved this 20 years ago with 100x to 1000x accelerations over legacy single-threaded and or badly distributed CPU code, but I guess the lesson didn't sick in.