Hacker News new | past | comments | ask | show | jobs | submit login

That "legacy code must be brought up to current standards whenever it's touched" policy doesn't seem very wise. I'm all for practical refactoring, but it's a major decision to be treated with care when it comes to legacy code. You don't always want to invite it. I certainly wouldn't want to enforce it.

I mean, it's one thing when your oldest legacy code is two years old, and it's all one program. It's something else entirely when it's, for example, written in Fortran and running on hardware you can't buy anymore. Sometimes you don't want to rock the boat any more than you absolutely have to.




Yes, for an emergency change (change or there will be layoffs), this is a rather dangerous policy. The goal of any emergency fix should be "do as little as possible to solve problem".

I get the feeling that too many people in the chain did not treat this as an emergency. It seems very business as usual. When a company is talking layoffs, it is an emergency.


Yeah, I agree. The first time he told someone "Philip wants this done quickly" and they said, "Sorry, it's policy," the next move -- at least my next move -- would have been to walk to Philip's office and say, "Will you come tell this lady that this change is more important than that policy?"

I mean, they don't have a way to know it's really an emergency. Every engineer thinks everything's an emergency. There's nothing like the guy in charge standing there while they work to communicate THIS IS ACTUALLY AN EMERGENCY.


This is similar to laws that require buildings be brought entirely up to code any time any renovations are done. The intent is to keep buildings up to code, but one of the nasty side effects is that buildings which are already substandard continue to deteriorate because of the massive expense (in time and effort as well as money) that is required. I've seen half a dozen instances with churches and other nonprofits deciding against simple renovations (like adding a wheelchair ramp) because they didn't want to have to redo the entire building's wiring, widen every doorway, and put in an elevator.

If you require a massive overhaul to be tied to a minor fix, one likely outcome is that the minor fix simply doesn't get done.


If you require a massive overhaul to be tied to a minor fix, then you have let the thing rot for too long.

In your example, those buildings that deteriorate will at some point stop being liveable, and lose in value, which will finally mean that the proprietor's failed business approach will become weeded out. I, personally, welcome this sort of development.


"Being out of code" isn't always a result of deterioration or neglect; sometimes it's just a matter of the code changing. Structures built in the 1950s may not have, for example, ADA-compliant accessible restrooms, though the restrooms may be perfectly usable. But putting in something as simple as a wheelchair ramp at the front door might require also remodeling every single restroom in the building to be ADA-compliant.

I've seen half a dozen small religious groups go through this sort of problem -- because they can't afford to make the church/synagogue/etc completely accessible, they aren't able to make incremental improvements. The buildings remain perfectly functional and well maintained and retain all of their value, except in the eyes of the one guy in a wheelchair who can't get a ramp put in because his church can't afford to drop 15 grand on all the other not-very-useful-but-required stuff.

Relating this back to code: if you have a policy that requires any old code must be brought up to new standards any time it's touched, then there are at least some occasions in which someone could have made a useful incremental improvement, but is stopped by a stupid policy decision that would saddle them with burdensome work. The net result is that small, high-value fixes get put off because of large, low-value busy work.


I agree in theory, but it's a slippery slope...

If you make one exception, then a month later, you discover that nobody is ever bringing old code up-to-date ever.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: