![[Dept of Engineering]](http://www.eng.cam.ac.uk/images/house_style/engban-s.gif)
Next: Style
Up: More C++
Previous: Common Difficulties and Mistakes
Stroustrup writes that the last section of his book aims
to bridge the gap between would-be language-independent design and programming
that is myopically focussed on details. Both ends of this spectrum have
their place in a large project, but to avoid disaster and excessive
cost, they must be part of a continuum of concerns and techniques.
Programs vary considerably in their composition. I've seen these
figures quoted
- Coding takes 10% of the total time. Debugging takes 50%.
- The Graphical User Interface is 80% of the code
- Error handling can be 50% of the code
Complexity is the enemy, so
- Divide and conquer.
- Use modules - namespaces or files (helps the optimiser too).
Don't re-invent the wheel
- Copy models
- Adapt existing parts
- When making new parts design them for re-use
Tim Love
2001-07-05