Live data from Hacker News

Why Does Software Rot?

overcomingbias.com

41–50 of 81 posts

Re: Why Does Software Rot?

#41

I find that integrated tests in software projects go a long way to reducing rot. When something eventually invariably breaks due to some external factor, the test suite greatly reduces the time to identify and fix the problem.

If you can build a piece of software and run unit and integration tests on it, it is more or less rot proof. That's because all those tests lets one delete or replace components of the system without having to worry too much that the whole thing is going to break in some unknown way that won't be caught until it's in production.

Without a good suite, the larger the system gets, the more people get scared of doing radical things to it because they are worried about breaking some critical functionality. As far as the not being able to build aspect goes, the main threat here is relying to much on closed source software and/or libraries that go out of support that no one can find the license, or critical documentation for, or worse manifests some critical unfixable bug.

Re: Why Does Software Rot?

#42
I think rot is not quite the correct metaphor. In my experience it's more likely to ossify, become sclerotic, build up scar tissue. As features are added or performance is tweaked, individual pieces become more complex and the connections between them multiply. If specific action (refactoring) isn't taken to fight this tendency, later developers will react to one piece being maintainable by making even more spurious connections and workarounds in adjacent pieces. That fixes the immediate problem, but makes things worse overall in the long term. Ultimately everything turns into the kind of tangled mess that everyone who has worked on an old multi-person project can recognize.

Unfortunately, a good refactoring requires understanding greater than the original author's[1], and therein lies another whole essay. ;)

[1] Related to http://www.linusakesson.net/programming/kernighans-lever/

Re: Why Does Software Rot?

#44
post #30
post #18

Earlier quoted context omitted.

Some smart dude, don't remember who, said that every single line of code becomes technical debt the moment it is written.

Legacy software is the code you wrote before lunch.[0] 0: http://www.russmiles.com/essais/dont-think-legacy-software-t...

But strstr() doesn't seem rotten or "legacy" in a bad way.

Re: Why Does Software Rot?

#45

I find that integrated tests in software projects go a long way to reducing rot. When something eventually invariably breaks due to some external factor, the test suite greatly reduces the time to identify and fix the problem.

Id love to agree with this but my experience differs on modern stacks. We so often mock or stub APIs, use a web driver that's pinned to a certain version of WebKit, test against virtual dom, etc that it's hard to get real reliable test results that don't break all the time.

But I suppose that's the problem; we don't have the time to fix bugs related to the environment that crop up when no code changes so we insulate our tests from the environment by design.

Re: Why Does Software Rot?

#46

What does rot even mean, in terms of software? As far as I can tell, he means "Why is complex software hard to change " which is a reasonable, though fairly easy to answer, question. Software doesn't rot. New features or refactors screw it up. New needs or technologies may make it obsolete. But it doesn't rot, and people who talk that way are often busy-body rewriters who want to pitch the existing implementations, w…

> Software doesn't rot. On the face it, that's true. But the reality is that the environment that software runs in is constantly evolving and software that doesn't also change slowly starts working worse until it stops working entirely. We have plenty of software at my work that hasn't changed fundamentally in 10 years and can no longer be used. Lots of really old software requires equally unchanged old environments…

... add to this that user expectations change. Applications not matching that feel rotted. Just look at websites from 10 years back to get an idea only on very surface levels.

Re: Why Does Software Rot?

#47

Software rots if you can no longer set up the exact tool chain and environment (compiler, build tool, OS version, external database, etc) required to build and run it. Even interpreted languages suffer from this problem as features are subtlely changed - by design or accident. It doesn't matter if your project is using an ancient version of VC++ or a two year old version of NodeJS. If it doesn't keep up with the late…

Through the miracle of virtual machines, this is much less so. VMs are the NAT of computer systems.

While for current software, which depends to at least some degree on remote services (cloud?) This won't help at all.

Re: Why Does Software Rot?

#48
post #25

Earlier quoted context omitted.

In a way, isn't this a form of make-work for software engineers? Plus, I'm not sure what is worse - having to remake things every 5 years or so slightly differently, or not having jobs.

In a way. It's hard to stay focused; they used to say the ultimate for a CS grad was to write the Great American Compiler ( as for an English major it may have been the Great American Novel ). As per Orwell, the hardest thing anyone does is to see what's right under their nose - to stay focused and commit to the most relevant work.

The idea of committing to the "most relevant work" presupposes that the relevance of different kinds of work can be identified and compared.

Maybe this is possible in some domains and in some cases. But in my experience, relevance is usually a matter of taste and perspective.

Re: Why Does Software Rot?

#49
> Apache, the most important web server software today, is an old piece of technology whose name is a play on words (“a patched server”) indicating that it has been massively patched.

Is this true? I have never heard that Apache was a play on of words.

Re: Why Does Software Rot?

#50

> Apache, the most important web server software today, is an old piece of technology whose name is a play on words (“a patched server”) indicating that it has been massively patched. Is this true? I have never heard that Apache was a play on of words.

Apparently its a myth, and the original intention was based on the name of the tribe. http://www.linux-mag.com/id/472/
Post reply on HN