Chapter 2. THE BEST LAID PLANS

The Layout and Presentation of Source Code

Stop judging by mere appearances, and make a right judgment.

John 7:24

Coding style has been, is, and will continue to be the subject of holy wars among programmers—professional, amateur, and student—where, unfortunately, intense disagreements degrade into mere name-calling. I’ll show you where to stick your stupid brackets.

The first company I ever worked for kick-started a process to define its internal coding standard. The guidelines were supposed to encompass several languages, defining common conventions and best practices. Months later, the group compiling the guidelines was still arguing about where to put brackets in C. I’m not sure if anyone ever followed the standard ...

Get Code Craft now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.