Dictionary Home » Computer Desktop Encyclopedia » self-documenting code

self-documenting code

self-documenting code definition - computer

Programming statements that can be easily understood by the author or another programmer. 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 programming interfaces (APIs) that the application may call. If programmers are familiar with those calls, they may feel that English commentary is unnecessary, because the API uses a logical name and is well documented by the OS vendor. However, in order to understand the code, a third party not familiar with the calls has to keep flipping back and forth from the application source code to the OS documentation, presuming it is readily available in the first place. 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 documentation.



Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments
Improve this definition.
Do you have more to add? Share your linguistic knowledge or observation.
/Register to save your comments.