Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Legacy Code: "Dominoes = Bad"

by lyklev (Pilgrim)
on Apr 27, 2011 at 20:49 UTC ( [id://901653]=note: print w/replies, xml ) Need Help??


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

I will not work for anyone who thinks maintainability is not in the top 3 criteria code should be measured on.

I would like to spend my time creating new and interesting things, not cleaning up my predecessor's mess where fixing one thing creates two problems elsewhere.

Replies are listed 'Best First'.
Re^3: Legacy Code: "Dominoes = Bad"
by JavaFan (Canon) on Apr 27, 2011 at 22:34 UTC
    I will not work for anyone who thinks maintainability is not in the top 3 criteria code should be measured on.
    Which one do you sacrifice:
    1. Does the job.
    2. Is finished when needed.
    3. Runs fast enough/doesn't consume too many resources.
    Or let me ask it this way. Do you prefer to get your salary at the end of the month, or do you want to wait for the perfectly maintainable code that processes the payroll?

      All of this seems to assume that any of these things are mutually exclusive with maintainability. I'll argue that only maintainability makes any of these even possible.

      1. "Does the job". Requirements always change. Seriously, when don't they? Maybe at uninteresting places... Maintainability lends agility to code, so it can do the job that's required by the end of the project, not just what is thought is needed up front.

      2. "Is finished when needed" Only maintainable, flexible code has any chance at all of being delivered on time while requirements keep changing.

      3. "Runs fast enough/doesn't consume too many resources" Only maintainable code can be easily tuned and adjusted to suit performance or resource constraints. Non-maintainable code locks in specific algorithms and inflexible use-cases.

      When you start developing software of any interesting scale, maintainability and good design go hand-in-hand. Only strong separation of concerns, loose coupling, and high cohesion allow the developers to work more independently with less overhead/communication required along the way. It also allows for cheaper junior developers to contribute to the project, implementing pieces of the design/spec without compromising the quality of the entire project. In the world of non-maintainable code, only the engineers who know everything about everything can even touch the code. Now that's expensive.

      Poorly written code is just poorly written code. There's nothing special or rewarding about it.

      -Dave

        "Does the job". Requirements always change.
        Yeah, but you either know what's going to change (and then do it right the first time), or you don't (and then, how do you anticipate?)
        Maintainability lends agility to code
        Eh, no. That's quite the opposite. Doing stuff now that isn't required is not agile. It's overhead. From The Agile Manifesto: Simplicity--the art of maximizing the amount of work not done--is essential. Anticipating to unknown future requirements does not lead to simpler code. Nor to less amount of work now.
        Only maintainable, flexible code has any chance at all of being delivered on time while requirements keep changing.
        Wait. By doing more work now, it's going to be finished sooner? How does that work? In the same way that paying more taxes increases my spending power?
        Only maintainable code can be easily tuned and adjusted to suit performance or resource constraints. Non-maintainable code locks in specific algorithms and inflexible use-cases.
        You got any data to back that up? Basically, you are saying it's impossible to write code that's fast enough, while it's not maintainable. So, code that's running fast enough, but of which the sources get lost (a real downer on its maintainability) suddenly slows down?
        Poorly written code is just poorly written code.
        Sure. "X == X" statements (even if one does rephrase the second X -- which you don't even bother to) are known as tautologies. They are a rhetoric device, and actually contribute nothing to the discussion.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://901653]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found