in reply to Re: Legacy Code: "Dominoes = Bad"
in thread Legacy Code: "Dominoes = Bad"

Heh.

I suppose that, at the time, the code I’m dealing with today “solved whatever problem needed to be solved, and did it on time,” but ... now it’s ten years later, and the code in question is still in service (and in front of the faces of literally thousands of people, and f*cking-up in front of every one of them) ... and, miracle of miracles, “maintainability” is suddenly a huge issue, indeed.

“Software has a life-span.”   Imagine that...   :-/

Replies are listed 'Best First'.
Re^3: Legacy Code: "Dominoes = Bad"
by JavaFan (Canon) on Apr 27, 2011 at 09:39 UTC
    Sure. But how much of the code you have written needs to be modified after 10 years? There's a lot of code that's being written that either won't survive 10 years, or, after having survived 10 years, will do another 10 years without modifications.

    It's often not wise to pay an extra cost *now* just so you *may* save some costs in the future. The time you spend now to make code more maintainable cannot be spend on writing code that generates revenue. That's 10 years of revenue you'd have to compare against the savings of having to deal with harder to maintain code 10 years from now. Now, in some businesses coding for maintainability makes sense; I'm not arguing that. But I take issue with blanket statements - just because it sometimes makes sense, doesn't mean it always make sense.

      Around here, and I expect in most (if not all) cases of non-trivial code, "maintenance" starts during development. You don't have to wait 10 years before you suffer from poor maintainability, you don't even have to wait 10 days.

      If it is not maintainable, debugging is harder. Adding features (aka development) after a mere weekend is harder. And as such, meeting the deadline is harder.

        But what I have... and what I make it my business to deal with... is “ten year old code.”

        When a piece of software is “finished,” it doesn’t disappear.   The business requirements that led up to it do not become frozen in stone.   Why, “the web page” has already become “like, so 2009...”

        In its day, the code might have been brilliant.   It probably did reflect the technical requirements of its day, the technologies of its day, the best-practices choices of its day.   But even though that was “ancient history” by present standards, the code is still in service.

      But I take issue with blanket statements - just because it sometimes makes sense, doesn't mean it always make sense.

      Right, but how does your version of maintainable differ from your version of non-maintainable code?

      For me it doesn't differ much