Tuesday, September 06, 2011
Why would a stakeholder want to care about refactoring. It only makes development take longer, which means they get fewer features delivered. In some places it's a hard-sell. These are the situations where we find a lot of "Red, Green, Done" code written. Sometimes it's just Green, Done and even Done, Green. Let's examine why and how refactoring could be of interest to a stakeholder.

  • Stakeholders shouldn't know or care if a developer is writing unit tests, main-line code, or refactoring something.
    • It's not their job, it's the developer's job. There needs to be trust, and it goes both ways.
    • The stakeholders should be focused more on business strategy and how features and information can help the company make more money.
    • If they are that involved with development tasks they are either micromanaging or just nosey.
    • Not that there shouldn't be transparency - there should. But people should focus on their area of expertise and let everyone else do their jobs too.
  • Refactoring improves the code. Here are but a few reasons to do it.
    • More robust - fewer issues
    • Faster - more performant
    • Easier to change, requiring less training
    • Easier to understand the logic
    • Less easy to write bugs
    • Code operation is more stable
    • Cheaper/faster to maintain
    • Cleaner and simpler
    • Refactoring the design clarifies intent and makes testing easier
    • Clear code tracks more closely and obviously with business requirements
    • Refactoring sometimes makes bugs obvious and they can be eliminated in development rather than after test phases.
  • We can map these advantages to direct dollar savings in development
    • Most bugs can be tracked to code that is obtuse, complex, or convoluted.
    • Many studies have been done that show bugs are much less costly to eliminate in the earliest phases, design and development.
    • Not writing bugs is far less expensive than finding them and fixing them.
Truly informed stakeholders will not only accept refactoring, they will encourage it, because the practice actually saves time and money in the long AND short-run.

Tuesday, September 06, 2011 8:40:46 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  |  Trackback
Comments are closed.
© Copyright 2012, John E. Boal