Introduction to Self-Documenting Code

Good documentation is one sign of the professional pride that a programmer takes in producing high quality programs.

There are two types of documentation, External in the form of design documents which describe what is to be implemented and internal where the code itself acts as it's own documentation. This discussion will focus exclusively on the latter type.

The main goal of self-documenting code isn't writing good comments but instead the use of good programming style. Which makes the code easy to read and understand. Style includes the use of good program structure, straight forward approaches, good variable names, good routine names, use of named constansts instead of literals, clear layout and formatting, and minimizing complexity (both in control-flow and in data structures).

-- ShawnDB - 16 Jun 2008

Revision: r1.1 - 16 Jun 2008 - 03:03 - Main.guest
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback