Design for total costPosted: March 29, 2011
Approximated cost in hours to find a software defect:
Requirement Review 10 Minutes
Code Review 20 Minutes
Unit Level Testing 1 Hour
Automated Tests 10 Hours
Manual Tests 15 Hours
User Testing 20 Hours
Customer Finds 30+ Hours
(from “Quality through Change-Based Test Management” — IBM)
Most software projects think they are doing well with a process for user testing in place. That is on the hour cost of 20 hours per defect. Sounds good to you?
Spending money in the maintenance ball is spending it wrong. Spending it right would be to focus on the little requirements ball. There is where you find real leverage (10 minutes to find a defect vs. 30+ hours if an end user finds it).
Cost to user
The cost to user is difficult to estimate, but very important. Sometimes the cost is visible, for example a software defect that prevents 1000 users from working would be quite noticeable.
Sometimes the cost is hidden and more insidious. A design flaw that makes something difficult to accomplish carries a cost to user as well, but it in the form of stress. Imagine a bad design flaw staying with the application for five years, stressing out thousands of users that has to deal with it on a daily basis.
- Aim for user friendliness
- Thorough testing before release
- Easy way to report bugs
- Knowledgeable help-desk
Avoid maintenance cost through increased reliability
Software should be designed with maintenance goals in mind. Most of the time we design for unneeded complexity. Use a simple infrastructure, and make it complex only if you need to. Every item you add to the chain of items needed for operation increases the risk of failure of said chain.
- 24h service, or office hours?
- Automated surveillance reduces downtime
- Avoid complexity in server infrastructure!
- Surveillance tools for server admins
Minimize developer hours spent on data repair
Sometimes we need to alter the data (or metadata) of the database. The need can come from a requirements change, from a database crash, from badly designed user input validation, or from external data-load. If you are using very complex data structures in the database, these changes will be very costly to carry out.
- Easier to salvage database designed for enough normalization
- Easier to repair non-dynamic data structures
- Establish data contracts for integration early
- Use strict database validation. Never allow input or import of erroneous data
The developer team will experience turnover sooner or later. These costs can be reduced by relevant documentation and use of standards and standard technology. If the technology is special-special, and no one knows how to do anything except for the guy who is leaving, replacing him will obviously be very costly.
- Good specifications makes team turnover and knowledge transfer less costly
- Standard technology makes it easier replace team members.
- Standard guidelines makes it easier to replace team members.
Software design can increase maintainability
It is no surprise that a good design increases maintainability. What does that really mean? It means making changes to the application will be cheaper. Changes can be both developing something new, and repairing something that is broken. The challenge here is to keep the design working while adding complexity. Shortcuts introduce software rot and must be avoided.
- Domain driven design will reduce complexity
- If two things can be separate they should be separate. DRY (don’t repeat yourself) is a double edged sword.
- Good design is not an awesome ball of yarn that can do anything
- Good design is as simple as possible, not simpler.
Be aware of software entropy
The development team is in a constant fight against software entropy. Every change to the codebase carries with it the chance to mess something up. It can be by introducing new bugs, or simply by destroying the design. Alot of team turnover coupled with feature creep will guarantee software rot.
The team must be made aware of this entropy, because the application is constantly moving towards it. If it sets in too far, you will have an unmaintainable application where changes will be so costly and risky that its not worth doing them.
When you get the feeling that developers are very hesitant to add any new features, that they prefer to poke at the application from afar (with a tall rod), you are probably looking at the putrid pile of an unmaintainable application.
That is why every new feature must not only be weighed against the direct cost to code it, but also against the hidden cost of adding complexity to the application as a whole, making it more expensive to maintain.
- Allocate time for redesign and the fight of software rot
- Be extremely wary of feature creep
- Keep conceptual integrity in mind when adding new features