O'Reilly logo

The Practice of Programming by Rob Pike, Brian W. Kernighan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required