“It turns out that style matters in programming for the same reason that it matters in writing. It makes for better reading.”
Coding guidelines govern how we write code.1
Sometimes called standards, sometimes conventions, they can govern many code-related things. Wikipedia, for example, tells us that
Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices, and methods for each aspect of a piece program written in this language. These conventions usually cover file organization, indentation, comments, declarations, statements, whitespace, naming conventions, programming practices, programming principles, programming rules of thumb, architectural best practices, etc.
Most of the time, we find coding guidelines in big organizations and large projects. As individual developers, perhaps even hobbyist developers, we don’t need and perhaps appreciate them that much. But in those big organizations and large projects, coding guidelines are critical. Software and web development leave a lot of room for preference, and preference makes for a lot of inconsistency and confusion, if not kept at bay.
As Wikipedia suggests, coding guidelines go beyond formatting; they can also cover development principles, and with that direct development with an even firmer grip.
In this Little Book, I share my experience with HTML and CSS coding guidelines. ...