skip to main content
column
Free Access

Comments are More Important than Code: The thorough use of internal documentation is one of the most-overlooked ways of improving software quality and speeding implementation.

Published:01 March 2005Publication History
Skip Abstract Section

Abstract

In this essay I take what might seem a paradoxical position. I endorse the techniques that some programmers claim make code self-documenting and encourage the development of programs that do “automatic documentation.” Yet I also contend that these methods cannot provide the documentation necessary for reliable and maintainable code. They are only a rough aid, and even then help with only one or two aspects of documentation—not including the most important ones.

Index Terms

  1. Comments are More Important than Code: The thorough use of internal documentation is one of the most-overlooked ways of improving software quality and speeding implementation.

              Recommendations

              Reviews

              Alexis Leon

              This well-written paper highlights the importance of thoroughly documenting code, and exposes the limitations and drawbacks of current practices like self-documenting code, automatic documentation generators, in-line comments, and so on. Self-documenting code encourages the use of meaningful variable names, thereby marginally improving the readability of code. Documentation generators do not posses the insight of the programmer who wrote the code, and fail in capturing the finer details and nuances. In-line comments fail to achieve the desired results because of their "forced brevity," as programmers must limit the documentation to a few lines because of constraints of the programming environment. None of the existing practices give enough importance to proper code documentation, which, in the author's opinion, should be very detailed, thorough, and address topics like why the program is written in a particular way, and why a specific approach is chosen when several others are available. Good documentation should be readable on its own, with bits of code showing how the design is implemented. The author teams up with Donald Knuth, who founded literate programming (LP), to buttress his views. LP is a methodology that combines a programming language with a documentation language, thus making them more robust, portable, and maintainable. The author and Knuth advocate that programs be addressed more to humans than to computers. Raskin further explains the need for the thorough use of internal code documentation (comments), not only for improving understandability of the code, but also for improving software quality, maintainability, and development productivity. This article is a must-read for all software professionals. Online Computing Reviews Service

              Access critical reviews of Computing literature here

              Become a reviewer for Computing Reviews.

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image Queue
                Queue  Volume 3, Issue 2
                Patching and Deployment
                March 2005
                45 pages
                ISSN:1542-7730
                EISSN:1542-7749
                DOI:10.1145/1053331
                Issue’s Table of Contents

                Copyright © 2005 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 1 March 2005

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • column
                • Opinion
                • Editor picked

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader

              HTML Format

              View this article in HTML Format .

              View HTML Format