Jonathan Crossland
Posts: 630
Nickname: jonathanc
Registered: Feb, 2004
|
Jonathan Crossland is a software architect for Lucid Ocean Ltd
|
|
|
|
What is Production Code and how do
|
Posted: Sep 11, 2009 10:10 AM
|
|
... you know when you have it, or not?
You see it written in code samples: No warranty, please take care if you use in production environment. This is not production code, but what does production code really mean?
Firstly production code can be any code that is in use. But that does not refer anything about quality. Just because software is on the shelf, does not mean its good quality.
Production code must have some sort of quality level.
Amusingly the DSDM pocket book, (Atern) says that "it must be good enough" - which makes me laugh, then cry.
Quality is subjective yes, and quality costs money. So what should production code be?
The following is a list of heuristics for referring to code as production code.
- More than 40% of your application has Unit Tests
- At least 3 or more people have spent time actively seeking bugs, for longer than 30% of the time it took to originally write.
- At least 3 or more people have been actively seeking bugs, in at least 5 different configurations/environments.You have mixed the environment (different server, different database name, altered culture/region, etc).
- Bugs have been solved with SolvingDesign (A lasting solve)
- Code Regression is reduced, practically to a stand-still. A ratio of 50 bugs solved per 1 reintroduced is a good ratio. 5 bugs solved for 1 reintroduced is a terrible ratio.
- Users have used the code for at least 40% of the development time taken, reporting bugs, and the system recompiled and redeployed at 5 times during this period. (preferably at intervals, so input can be recalculated)
Influence that will present itself, and cause you into thinking its production code, before its not.
- Deadline and other pressures
- Reactionary mindset, rather than pre-emptive
- Bad company software creation intelligence (what else can you call it?)
- Human traits, inexperience, carelessness etc
Read: What is Production Code and how do
|
|