Abstract
Computer programs can be written many different ways and still achieve the same effect Until recently, programmers have had little reason to favor one method of expressing code over another. We have come to learn, however, that functionally equivalent programs can have extremely important stylistic differences. Good programming style cuts across application areas, technique alad language. Programs written with good style are easier to read and understand, and often smaller and more efficient, than thOse written badly. Yet few programmers have ever been taught what style is, as we can see from even cursory inspection of their code. Even the techniques of structured programming do not ensure that code will be good; “structured” programs can be just as bad as their unstructured counterparts. This paper is a survey of some aspects of programming style, primarily expression and structure, showing by example what happens when principles of style I are violated, and what can be done to improve programs. To add the ring of truth to our discussion, the examples are all taken verbatim from programming textbooks.
Original language | English (US) |
---|---|
Pages (from-to) | 303-319 |
Number of pages | 17 |
Journal | ACM Computing Surveys (CSUR) |
Volume | 6 |
Issue number | 4 |
DOIs | |
State | Published - Dec 1 1974 |
Externally published | Yes |
All Science Journal Classification (ASJC) codes
- Theoretical Computer Science
- General Computer Science
Keywords
- control-flow structures
- programming style
- structured programming