Skip to Content
The Practice of Programming
book

The Practice of Programming

by Brian W. Kernighan, Rob Pike
February 1999
Intermediate to advanced content levelIntermediate to advanced
288 pages
9h 18m
English
Addison-Wesley Professional
Content preview from The Practice of Programming

Chapter 1: Style

It is an old observation that the best writers sometimes disregard the rules of rhetoric. When they do so, however, the reader will usually find in the sentence some compensating merit, attained at the cost of the violation. Unless he is certain of doing as well, he will probably do best to follow the rules.

William Strunk and E. B. White, The Elements of Style

This fragment of code comes from a large program written many years ago:

     if ( (country == SING) || (country == BRNI) ||          (country == POL) || (country == ITALY) )     {            /*             * If the country is Singapore, Brunei or Poland             * then the current time is the answer time             * rather than the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Programmer's Brain

The Programmer's Brain

Felienne Hermans
Programming Interviews Exposed, 4th Edition

Programming Interviews Exposed, 4th Edition

John Mongan, Noah Suojanen Kindler, Eric Giguere

Publisher Resources

ISBN: 9780133133448Purchase book