Book contents
- Frontmatter
- Contents
- 1 Introduction
- 2 What Are Good Programs?
- 3 How to Get Started
- 4 How to Understand Your Language
- 5 How to Use the Best Tools
- 6 How to Make Sure You Don’t Lose Your Program
- 7 How to Test Your Program
- 8 How to Make Your Program Clear
- 9 How to Debug Your Program
- 10 How to Improve Your Program
- 11 How to Get Help (without Cheating)
- 12 How to Score Well in Coursework
- 13 How to Score Well in a Programming Exam
- 14 How to Choose a Programming Language
- 15 How to Go Beyond This Book
- Bibliography
- Index
8 - How to Make Your Program Clear
Published online by Cambridge University Press: 10 July 2020
- Frontmatter
- Contents
- 1 Introduction
- 2 What Are Good Programs?
- 3 How to Get Started
- 4 How to Understand Your Language
- 5 How to Use the Best Tools
- 6 How to Make Sure You Don’t Lose Your Program
- 7 How to Test Your Program
- 8 How to Make Your Program Clear
- 9 How to Debug Your Program
- 10 How to Improve Your Program
- 11 How to Get Help (without Cheating)
- 12 How to Score Well in Coursework
- 13 How to Score Well in a Programming Exam
- 14 How to Choose a Programming Language
- 15 How to Go Beyond This Book
- Bibliography
- Index
Summary
This chapter discusses how, and why, to write your program in a way which is as easy as possible for another human to understand. For example, we discuss how to use comments, choose informative names, lay out your code clearly, and structure it so that it does not resemble spaghetti.
- Type
- Chapter
- Information
- How to Write Good ProgramsA Guide for Students, pp. 83 - 100Publisher: Cambridge University PressPrint publication year: 2020