|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
|
***** Brian Kernighan's Programming Style Tips a summary of a classic book
Chapter 1 Philosophy Matters -- good rehash of programming style issues with usual for Eric Raymond doze of moralizing (could be skipped -- go directly to the second part ;-). Some point are questionable but this is an early version and it's too early to criticize it for that. for critique of Eric Raymond views on opensource see my OSS page
**** Indian Hill C Style and Coding Standards -- (see C faq for the explanation of the term "Indian Hill C style guide"). Mostly reasonable, but authors sometimes demonstrate a little bit too much zeal... For example indentation should be enforced by pretty-printer, not manually ;-)
**** Notes on Programming in C by Rob Pike; mirror Notes on Programming in C see also: Notes on Programming in C [.ps]
***+ SDM C Style Guide -- if you delete a half-dozen "fundamentalist" recommendation like avoiding global variables, continue and other "structured programming fundamentalism" nonsense, this document can be a pretty reasonable style guide...
**** C Programmer's Notebook -- slightly outdated but insightful
***+ Henry Spencer's The Ten Commandments for C Programmers see also mirror site The Ten Commandments for C Programmers
*** Best Practices for Programming in C -- a typical style-related recipes for C without any new insights, but still the paper has a reasonably balanced approach to the topic. As always some tips are questionable. I doubt that declaration of the counter in the loop (for(int i=0; i<100; i++) array[i]=0;) is a portable construct. A lot of C-compilers will reject this. As one of Linux Today readers noted "...if you copy things verbatim from others, *including comments* etc, it would be nicer to name the original authors, Henry Spencer ('Ten commandments for C programmers') and Robert Pike ('Notes on programming in C'). But this certainly doesn't ever happen in code written by IBM-employees, does it?"
programming at ftp.cs.toronto -- an interesting collection of style-related documents including Indian Hill C style guide
Programming Style (book review)
Program Identifier Naming Convention -- the idea of enhancing name with type information (probably the author is going to far, but some ideas can be reused)
Programming assignments style -- an example of academic style recommendation most of which are plain wrong ;-)
General
Broken links:
NASA Development Coding Standards and Style Guide [broken link]
www.scs.ryerson.ca -- Programming with style
Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: November 08, 2008