The GNU Coding Standards were written by Richard Stallman and other GNU Project volunteers. Their purpose is to make the GNU system clean,consistent, and easy to install. These GNU Coding Standards can also be read as a guide to writing portable, robust and reliable programs.
It focuses on programs written in C, but many of the rules and principles are useful even if you write in another programming language. The rules often state reasons for writing in a certain way.