next up previous contents
Next: Design Issues Up: Programming Style Previous: Programming Style   Contents

On the Process of Writing Software

At first, we feel appropriate to touch upon the issue of programming style as referred to the approach to writing software. Often, ``programming'' is used to mean ``the process of writing software''. In general one has to distinguish ``writing software'' from ``programming'' meaning ``implementation'', because the latter is only a part of the former and does not include documentation, etc. In general, ``writing software'' should consist of five parts:
  1. Get a clear and detailed understanding of what the code has to do (idea);
  2. Identify key concepts and layout code and data organization (design);
  3. Write source code (implementation);
  4. Test the program and eliminate errors and/or design flaws (testing);
  5. Write documentation (documentation).
Thus, writing software is significantly more complex than just coding. Each stage of writing software is as important as others and should not be considered a waste of time. The code written without a detailed understanding of what it has to do may not work properly. Poorly designed code may not be flexible enough to accomodate some new feature and will be rewritten. Poorly implemented code may be too slow to be useful. A paper full of incorrect values produced by your code may get you fired and will destroy your reputation. A documentation-free code will most likely be useless for others.

Of course, for very simple programs design and implementation may be combined and documentation may consist of one line. However, for more complex programs it is recommended that the five stages are followed. This means that you should spend only about 20-40% of your time writing source code! Our experience shows that following this scheme results in the most efficient approach to programming in the long run.

To learn more on each stage of the software writing process, you may want to refer to Stroustrup's ``C++ Programming Language'' book (3rd Ed.) as the most common reference source not dedicated solely to one narrow subject. Besides being an excellent description of C++, it is also an introduction to writing software as well. Particular attention is paid to the issue of program design.


next up previous contents
Next: Design Issues Up: Programming Style Previous: Programming Style   Contents
psi 2003-01-07