Chapter 9
Documenting Your Program
IN THIS CHAPTER
Adding comments to your source code
Constructing software documentation
There are two big problems with writing programs. First, you have to worry about getting the program to work. Second, you’ll probably need to fix and modify it later. To solve both types of problems, you have to understand how the program works in the first place. To understand how a program works, programmers have to explain
- What problem the program is trying to solve
- How the program is designed
- How each part of the program works
In the early days when programs were small, programmers could figure out all the preceding questions by studying the source code of the program. When programs got bigger and tackled more complicated problems, programmers could no longer understand how a program worked by examining the source code. That’s when programmers were forced to start writing additional explanations, or documentation. By studying this documentation, other people could understand how a program works without trying to decipher the actual source code of a program.
Adding Comments to Source Code
One of the first attempts at explaining how a program worked was by making the source code more understandable by using high-level languages, like BASIC or Pascal, ...
Get Beginning Programming All-in-One For Dummies, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.