Live data from Hacker News

There's No Limit to How Bad Code Can Get

zachkehs.com

31–40 of 87 posts

Re: There's No Limit to How Bad Code Can Get

#31

Earlier quoted context omitted.

Trivially debunked with the prompt "find technical debt to fix". https://github.com/danneu/danterm/blob/749942ffa1198f520c8b7... Here's the result of a prompt that specifically looks for correctness and simplifications to make "by construction" before I added "Design bar: ensure correctness by construction rather than by convention" to AGENTS.md: https://github.com/danneu/danterm/blob/749942ffa1198f520c8b7...

Linking to an 8800 line claude written wall of text reinforces the parent's point.

How? Because it found too many opportunities to improve the code beyond what we'd want to review as a human?

Each file is a list of findings that includes the justification/verification of each finding in the same file.

This is just what work looks like, especially tech debt repayment. It's analysis, reasoning, and justification. Those produce words.

Re: There's No Limit to How Bad Code Can Get

#32

One of my first jobs, was as a maintenance engineer, on a 100KLoC+ codebase of 1979s-era FORTRAN IV. No comments. No subroutines (what we now call “functions”). No variable name longer than 4 characters. Fun. The most effective debug tool, was a Ouija board. It made me an expert WAGger. It was the main reason that I am so anal about code Quality, these days. I never want to subject anyone else to that. BTW: with toda…

> LLMs, there’s really no excuse I'd phrase it differently; we're now able to accumulate technical debt faster than ever, without even building the institutional knowable needed to keep it sane. While the models writes novels about what it's doing that no human or LLM will find any use for. But at the same time; if the LLM makes coding 5-10x faster, there's plenty of left-over time we can now spend doing things prope…

And yet technical debt is still much, much worse than it used to be thanks to LLMs.

As a technological innovation theyre a bit like amphetamines for code. Sure, maybe some people are using the "tankers chocolate" their employer handed them responsibly...I guess.

There are certainly a lot of people online who have gone all in who swear blind theyre not abusing them.

Re: There's No Limit to How Bad Code Can Get

#33

One of my first jobs, was as a maintenance engineer, on a 100KLoC+ codebase of 1979s-era FORTRAN IV. No comments. No subroutines (what we now call “functions”). No variable name longer than 4 characters. Fun. The most effective debug tool, was a Ouija board. It made me an expert WAGger. It was the main reason that I am so anal about code Quality, these days. I never want to subject anyone else to that. BTW: with toda…

> LLMs, there’s really no excuse I'd phrase it differently; we're now able to accumulate technical debt faster than ever, without even building the institutional knowable needed to keep it sane. While the models writes novels about what it's doing that no human or LLM will find any use for. But at the same time; if the LLM makes coding 5-10x faster, there's plenty of left-over time we can now spend doing things prope…

> we're now able to accumulate technical debt faster than ever

LLM's just enable you to speed run your way into a legacy code base.

> without even building the institutional knowable needed to keep it sane

Does feature XXX move the needle? Did you gain more business or retain existing business because a feature exits? Has AI tooling helped your product team move the needle? No? Why not?

How easy is it to remove the feature that NO ONE uses is a question no one is asking. How many people got promoted for "removing the most garbage" from the system?

We, as an industry, might need to have a candid conversation about what we're doing and how we do it.

Re: There's No Limit to How Bad Code Can Get

#34

  Yet, our organization was hundreds of people, and the system had grown so large and complex that it had become impossible to learn how it all worked.
Which is what makes Bezos' service mandate [0] a classic exposition of Conway's Law [1].

  All teams will henceforth expose their data and functionality through service interfaces.
  Teams must communicate with each other through these interfaces.
0. https://gist.github.com/kislayverma/d48b84db1ac5d737715e8319...

1. https://en.wikipedia.org/wiki/Conway%27s_law

Re: There's No Limit to How Bad Code Can Get

#35
post #3

The worst I have experienced: A 30,000-line .cs file. A giant monolithic program tangled together by Singleton abuse, 6-deep nested if/else blocks, and the list goes on. There are too many to count. And this is a sight I see every single day. This is the exact landscape I encounter at many companies when I go in for maintenance work. Encapsulation completely shattered as a direct reflection of the subcontracting powe…

I can believe that... We've had logging macros break because line numbers no longer fit in an u16

I would love a TV show like "Hell's kitchen" except it's code bases and development processes.

Re: There's No Limit to How Bad Code Can Get

#36

2 things 1. LLM can fix this in my experience. an LLM, especially the more modern ones, have way more short term memory than most humans (or at least way more than me). They can dig through this kind of code and figure out all the edge cases, write test, suggest various paths to make things better and then execute on those paths. On request they will happily setup dev systems, staging systems, whatever it takes to ma…

> an LLM, especially the more modern ones, have way more short term memory than most humans

But it's not unlimited. So they can write code that they "understand" within the limits of their working context. When it grows beyond that, they can't cope with it in its entirety. And a human, at that point, has no prayer.

Re: There's No Limit to How Bad Code Can Get

#37

Earlier quoted context omitted.

Linking to an 8800 line claude written wall of text reinforces the parent's point.

How? Because it found too many opportunities to improve the code beyond what we'd want to review as a human? Each file is a list of findings that includes the justification/verification of each finding in the same file. This is just what work looks like, especially tech debt repayment. It's analysis, reasoning, and justification. Those produce words.

Sounds good, have fun with that.

Re: There's No Limit to How Bad Code Can Get

#38

This is a good example of what LLMs save us from. Everyone likes to pretend that LLMs are only capable of writing mudballs, but it's trivially debunked by using LLMs yourself to refactor code, pay back debt, and fan out agents to look for debt to repay. We're already at the point with sota models where I'm not even sure you can get the sort of mudballs OP is talking about; the LLM's inherent "taste" forbids it, and i…

While I agree and I have done more than one rewrite / cleanup of messy codebases quite successfully with LLMs in the past few months, I can assure you plenty of people are still using the latest models to accrue technical debt faster than I thought was ever possible. The model "taste", assuming it has one, does not survive bad instructions

Re: There's No Limit to How Bad Code Can Get

#39
post #19

2 things 1. LLM can fix this in my experience. an LLM, especially the more modern ones, have way more short term memory than most humans (or at least way more than me). They can dig through this kind of code and figure out all the edge cases, write test, suggest various paths to make things better and then execute on those paths. On request they will happily setup dev systems, staging systems, whatever it takes to ma…

You are the very first person I encountered who claim LLM can fix technical debt. Usually I seem comments and articles saying LLM can only produce it. And I can agree with those articles and comments

There is a lot of noise out there from anti-AI types who never seriously tried to clean up messes with AI. If you just ask for new features and never look at the code, coding agents will make a mess. If you often ask questions about how to clean up messy code, coding agents are great help for that, too. But you have to ask.

Re: There's No Limit to How Bad Code Can Get

#40

Earlier quoted context omitted.

How? Because it found too many opportunities to improve the code beyond what we'd want to review as a human? Each file is a list of findings that includes the justification/verification of each finding in the same file. This is just what work looks like, especially tech debt repayment. It's analysis, reasoning, and justification. Those produce words.

Sounds good, have fun with that.

I did. Just about all of the findings were re-verified to be good and then implemented by a rigorous pipeline of clankers, and the project was improved.

If it weren't for me insisting that I manually sign off on the solution of every finding, then it would have been fully automated too.

Post reply on HN