Comment by cedws
8 hours ago
I have plenty of experience with LLMs and use them daily but definitely wouldn't call generated code "quality code." Often looks like complete vomit.
8 hours ago
I have plenty of experience with LLMs and use them daily but definitely wouldn't call generated code "quality code." Often looks like complete vomit.
That’s kinda what I mean. Maybe it only works well in some languages, but with the harness I built for C and C++ does a fantastic job of adhering to very strict architecture and style guides. Way cleaner, more readable, better factored, and more interpretable than human generated code, except maybe one or two devs I have worked with. YMMV I guess?
TBF I do burn 200k tokens just preloading the context with onboarding, not including any code, just document trees of development policy documents, style and architectural standards, code and documentation review processes, company ethos and culture, etc. it’s a token fire, but it really works for us.
Also, documentation driven development all the way down.
If you're an enterprise (including startups), you worry about customers, not code quality. There are famously many startups that gained traction despite shit code and then eventually got around to fixing it, to whatever extent was possible, like Facebook HHVM, Stripe's Sorbet, etc.
Startups failed because they cound not untangle own code after 4 months. Literally true stories (plural).
> Startups failed because they cound not untangle own code after 4 months.
That's rare, though. If they could not untangle their own code after 4 months, it's because they were not making enough money to pay a team to untangle it - that's not a code problem, it's a revenue problem.
IOW, the startup failed because their revenue was too low.
There are orders of magnitude that failed because they did not solve the right customer problem. Code quality is merely incidental the vast majority of the time.
[dead]
Ok, and? You can live with that if there are more important things to deal with.
I've stared at ugly LLM code, that I had just had generated, and worked well enough for my purposes. (generally, some quick recursion into a nested python dictionary in order to dig out some property -- especially for linting or quick data analysis).
And I wanted something better, sure, something a bit more readable ...but I just needed it to work well enough to recurse through a yaml file for config file linting, not be battle-hardened against every test case.
So to deal with the mess, I shoved it in a pure function, threw a few basic sanity unit tests around it, put a comment with a disclaimer of "#this is LLM generated code, it is lightly tested, do not use it for anything truly load-bearing without a lot more tests" and I moved on to something else.
Not everything has to be bulletproof.
You're on Hacker News. This is a site full of developers who are convinced that "proper software engineering" is 100% of what makes a business successful, and everything and everyone else is useless. You can't just waltz in here and point out that code in business is a means to an end and expect not to get downvoted.
As a technical product manager, this 1000%. It's just irrelevant how bad code is unless it impacts the business.
7 replies →
Every bit of code written in the last 50 years is going to be meaningless.
People need to get to grips with that fast.
Distribution, relationships, processes, mindshare, marketing, and politics matter. Code is just ephemeral glue and implementation detail.
4 replies →