Log in / create account | Login with OpenID
DocForge
An Open Wiki For Software Developers

Self-documenting code

From DocForge

Self-documenting code is the concept that code in many programming languages can be written in such a way that a human can easily understand exactly what it's doing without added code documentation or code comments.

Ideally all code should be self-documenting, but this is an ideal rarely achieved. As projects grow, coded logic becomes dispersed and harder to follow. Occasionally shorthand coding techniques are used for simplicity or performance, but their overuse can cause confusion when unfamiliar with the code.