News for hackers. Stuff that matters.
Re:Software Rot (2017) by notacoward on Monday February 25, 2019 @09:32AM (#19245841)
The examples don't seem to illustrate software rot at all. Rather, I'd say they illustrate software ossification. Over time, each example became more rigid and hard to change because things that should have been modularized and isolated in one place instead became idioms pervading the entire codebase. (The "should have" is arguable, I know. There's a broader point about idioms vs. modules that deserves its own blog post.) Rot would be when a program works less and less over time because its external dependencies vanish or change and the program itself stops adapting.

Software that is merely rotten can often be saved, with varying levels of effort and skill. Software that is ossified often needs to be replaced.

Re:Software Rot (2017) by stcredzero on Monday February 25, 2019 @01:40PM (#19248124)
The examples don't seem to illustrate software rot at all. Rather, I'd say they illustrate software ossification.

I was about to come here to say that there's really no such thing as software rot. If all of the environmental variables remain the same, software doesn't really rot. It's actually the environmental variables which change.

Over time, each example became more rigid and hard to change because things that should have been modularized and isolated in one place instead became idioms pervading the entire codebase.

I can deal with idioms. If 1) the idioms are very consistent and 2) you have a reliable syntax driven code rewrite tool, you can drive idioms into a library and/or otherwise translate them. I've been paid to do both.

Rot would be when a program works less and less over time because its external dependencies vanish or change and the program itself stops adapting.

But what stops a program from adapting? It becomes "ossified." Because the code organization isn't up to the challenge, it becomes too hard to add and change features without introducing bugs.

There is no software "rot." It's all different kinds of ossification.

Re:Software Rot (2017) by notacoward on Monday February 25, 2019 @04:04PM (#19249451)
> what stops a program from adapting? It becomes "ossified." Because the code organization isn't up to the challenge

Usually it has nothing whatsoever to do with the code organization. The most common cause is lack of active developers to make the adaptation - company dies, developers die or change jobs or lose interest. That's why "rot" is an apt metaphor, like a house slowly falling apart due to lack of maintenance.

> If all of the environmental variables remain the same > I can deal with idioms. If 1) the idioms are very consistent and 2) you have a reliable syntax driven code rewrite tool,

Would you like a pony too? The environmental variables don't remain the same. The tools aren't smart enough to catch every subtle variation of an idiom repeated hundreds of times across a large codebase. Yes, you can automate away the easy cases, but that's not even half the battle. That's why people hire maintenance programmers like you.

Re:Software Rot (2017) by stcredzero on Monday February 25, 2019 @04:39PM (#19249704)
Usually it has nothing whatsoever to do with the code organization. The most common cause is lack of active developers to make the adaptation

It varies from shop to shop, but what I've seen is that code organization has a lot to do with it. Basically, if your code organization/factoring is really bad, then it's more likely that porting becomes untenable. Ironically, these are the projects that can have the longest lifespans, sometimes developing a history of multiple failed attempts to "port" them. (Really, re-implement while incurring huge opportunity costs.)

> If all of the environmental variables remain the same

Would you like a pony too?

You're seriously missing the point. My point is that the environmental variables never remain the same. (I was making two points, and I think you missed where I switched.)

> 2) you have a reliable syntax driven code rewrite tool

Would you like a pony too?

I repeat. I've been paid good money to use such a tool. I've used such a tool to enable the 1-step-removed porting of a project to a different language variant. Instead of doing the port myself, I was refining a tool which automated the port and enabled the maintainers to easily port all the changed code they were checking in. This lets you do a port without incurring the opportunity cost. I know of a consulting company that once made most of their income with this.

Yes, you can automate away the easy cases, but that's not even half the battle.

You can't simply hit a switch with this, of course. Someone has to put real thought into how the translations are made, especially if you want idiomatic, readable code going out the other end. The good thing about consistent idioms, is that they can be leveraged to multiply that work. The manual part can be re-leveraged through automation.

That's why people hire maintenance programmers like you.

That could be read in a way that sounds less than friendly and maybe a bit elitist.

Re:Software Rot (2017) by notacoward on Monday February 25, 2019 @05:58PM (#19250318)
> what I've seen is that code organization has a lot to do with it

I suggest that your sample is non-representative. Companies don't hire specialists to refactor code that they're abandoning. Dead companies don't hire anyone at all. You don't work on rotten code because nobody does, but that doesn't mean it's not out there.

> That could be read in a way that sounds less than friendly and maybe a bit elitist.

It could, but that would be on the reader. I didn't say anything to denigrate maintenance programmers.

Re:Software Rot (2017) by stcredzero on Monday February 25, 2019 @06:58PM (#19250697)
Companies don't hire specialists to refactor code that they're abandoning.

Companies do hire specialists to port code that they're not abandoning.

Dead companies don't hire anyone at all.

"Zombie" companies can still have big revenues and they can and do pay consultants to do things like port old applications. Again, there have been entire companies based on such activity. I've made money from such companies.

You don't work on rotten code because nobody does

I was a consultant for a language vendor for 5 years, then continued working in that niche for another 5. My sample size in this context is in the many dozens at least. There's a lot of code I'd call "rotten" out there that people still work on.

I didn't say anything to denigrate maintenance programmers.

Good. I'm sure I've met a number of them who are probably better coders then either of us when they're half asleep.

Re:Software Rot (2017) by stcredzero on Thursday February 28, 2019 @12:10PM (#19272898)
Arrgh. Than!
Re:Software Rot (2017) by mixedCase on Monday February 25, 2019 @03:44PM (#19249281)
> If all of the environmental variables remain the same, software doesn't really rot. It's actually the environmental variables which change.

Then it sounds like "rot" is a very aptly used word. I'll put on the jerk hat and quote the Oxford dictionary:

rot (verb)

1 (chiefly of animal or vegetable matter) decay or cause to decay by the action of bacteria and fungi; decompose.

Re:Software Rot (2017) by TeMPOraL on Monday February 25, 2019 @04:39PM (#19249706)
Is it? My reading of that definition leads to exactly opposite conclusion.

Rot is when something breaks down while environment remains the same. What happens with software is the opposite: it forever remains in pristine condition; it's the environment that changes.

(Compare also with description of evolution. A species does not "rot". It dies off when its niche changes so much its no longer adapted to survive in it.)

Re:Software Rot (2017) by stcredzero on Monday February 25, 2019 @06:59PM (#19250702)
What happens with software is the opposite: it forever remains in pristine condition; it's the environment that changes.

Exactly. If you replicate the old environment in an emulator, the old code runs just fine.

Re:Software Rot (2017) by tobiasSoftware on Monday February 25, 2019 @12:43PM (#19247546)
While I agree this article isn't about rot, the definition of rot I'm used to is more about how knowledge of a product becomes lost over time without any active developers, so it becomes harder and harder to switch back to active development.
Re:Software Rot (2017) by Izkata on Monday February 25, 2019 @01:54PM (#19248268)
The one I'm used to is related to that one, but only barely: the software becoming less and less stable and/or harder to change as features are added. The cause can be loss of knowledge or ever-increasing technical debt.
Re:Software Rot (2017) by meschi on Monday February 25, 2019 @10:36AM (#19246338)
Can you provide an example of rotten software?
Re:Software Rot (2017) by notacoward on Monday February 25, 2019 @11:15AM (#19246625)
The extreme case is programs for which the entire platform has been abandoned - e.g. DOS (including TSRs), old Windows, old MacOS (including desk accessories). There's a whole "abandonware" community devoted to preserving games that have rotted this way, usually relying on emulation to keep them from being forgotten entirely. There are various file compression/encryption/annotation utilities that have become unusable because they relied on deprecated Windows APIs. Various sound/video hacks on Linux have died as those subsystems remain in constant flux. In my own work as a Gluster maintainer, several pieces such as Java/Python or monitoring APIs have rotted away as those APIs changed. It usually takes a long time for a large program to rot away completely, but individual pieces can become non-functional long before then.
Re:Software Rot (2017) by Raidion on Monday February 25, 2019 @11:23AM (#19246702)
I think the point OP is making is that there is plenty of bad software out there that (as a result of a combination of incompetence, scope creep, bad decisions, and short timelines) just isn't resilient, testable, and single use anymore. As long as the code is isolated enough, it's fairly easy from a technical standpoint to replace/refactor.

Ossified code is code that isn't isolated, but tightly bound to several other components. This means that you can't swap it out without making the exact same architectural mistakes. This means you basically need to start over from scratch, which is a much harder and broader problem.

Re:Software Rot (2017) by convolvatron on Monday February 25, 2019 @12:38PM (#19247500)
there is an alternate path for your ossified code, but its really costly. idk if it has a cute name.

if there aren't system/integration tests - write system tests. you have to be pretty thorough.

have a long and involved discussion about what the new thing is going to be. go through all the frustrations with the current code base. convince yourself at the end that its going to be worth it, because the cost is going to be high. ideally the new version will open up new capabilities that just weren't possible before.

find a cut in the dependency graph. you're going to rewrite the code on one side and leave the other side untouched. ideally that cut will be small-ish and contain some particularly broken stuff that you'd like to get rid of as soon as possible. unfortunately there may not be a small cut that makes sense :-(

build a shim between the old model and the new model across the cut. this shim is only going to last as long as the old code on the other side. this shim might be involved and a total waste of effort. suck it up or look for a different cut.

replace the code on the new side and test against your suite. if its not really that exhaustive, expect a rash of bug reports. run through some kind of soft deployment. if its a request/response kind of thing consider forking your production traffic and comparing the results against the old code base.

repeat until golden brown.

this overall process also can fail. often because of poor test coverage, and more likely because you haven't adequately communicated the scope of the undertaking and its absolute necessity to the rest of the engineering organization and the business as a whole.

however, if you make it through, you've avoided the giant speed bump that comes at the end of the rewrite, and you've been able to fold in new feature and bugfix work along the way.

Re:Software Rot (2017) by rzzzt on Monday February 25, 2019 @01:01PM (#19247743)
Re:Software Rot (2017) by norfolk2 on Monday February 25, 2019 @01:30PM (#19248048)
Everything written in python2 after 2020 is going to start to rot - within a few years, various library dependencies are going to fail, etc.
Re:Software Rot (2017) by cm2187 on Monday February 25, 2019 @12:36PM (#19247479)
Skype