Term of the Moment

assistive technology


Look Up Another Term


Definition: self-documenting code


Programming statements that can be easily understood by another programmer or even by the original author. Some languages are inherently more self-documenting than others. For example, to the novice, COBOL provides more self-documenting code than C.

It's Very Subjective
However, what one programmer thinks is self-documenting may truly be indecipherable to another. For example, today's operating systems offer hundreds of routines that the application may call (see API). If programmers are familiar with those routines, they may feel that English commentary is unnecessary, because the API uses a logical name (hopefully), but its purpose is documented somewhere by the OS vendor. However, in order to understand the code, a third party not familiar with all the calls has to keep flipping back and forth from the application to the documentation. A well-written line of English for each of these calls would be far more helpful.

Programmers tend to dislike documentation, and that is an understatement. Many simply do the barest minimum unless carefully supervised. Some do none at all if they can get away with it. See program documentation.