Abstract
Programs written with good style are easier to read and understand, and typically smaller and more efficient than those written badly, regardless of the language used. Yet most programmers have never been taught programming style—as proof we need only look at their programs.
In this paper we will discuss several principles of programming style, illustrating our points by criticizing and rewriting some real programs. The examples are all taken verbatim from programming textbooks, and the revisions have all been tested.
- 1 Kernighan, Brian W., Plauger, P. J. The Elements of Programming Style. McGraw-Hill, 1974. Google Scholar
Digital Library
Index Terms
Programming style
Recommendations
Programming style: examples and counterexamples
Classics in software engineeringThe following paper by Kernighan and Plauger is one of three chosen from the December 1974 issue of ACM Computing Surveys. It's considerably shorter and less theoretical than the companion papers by Knuth [Paper 20] and Wirth [Paper 13]; indeed, it's ...
APL tools and techniques and their effect on good programming style
ACM '82: Proceedings of the ACM '82 conferenceWhat is style? We know that it certianly is not confined to any specific field. Instead, it applies to all creative endeavors, programming being one of those endeavors. However, before I describe style relative to writing programs, I want to discuss ...
What can we learn by testing a program?
It is conventional to start research papers on software engineering, particularly on testing and software quality, with a statement of how important software has become in the world, and the potential dangers of using it when those who construct it ...






Comments