[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

1. Introduction

This document describes my personal coding standards. Most of my published code is part of the GNU Project, so the standards here are an extension to the GNU Coding Standards. If you are not familiar with those standards, then you should consider reading them before reading further, because points made there are not repeated here (see section `Top' in GNU Coding Standards).

Two different kinds of conventions are expressed here:

descriptive
These are what I use in programming and have used for some time.

prescriptive
These are what I have, recently or some time ago, decided would be a good idea. These conventions are not necessarily used in most or all of my code, but will probably start to appear in my future code. (If they don't, then I'll amend this document as necessary.)

Little distinction is made in this documentation between these two types of convention.

Imperative sentences are used throughout this document for ease of expression. In standard English, the subject of an imperative sentence is "you", but in this document it should be taken to be "I". This document is not meant to suggest that others adhere to this style, although they are welcome to it. Rather, it is a codification of my own practice.

On the other hand, if you plan to contribute code to one of my own projects, the closer your code comes to these conventions, the easier it will be for me to integrate it and the happier I'll be to accept it.

Some of the conventions expressed here are particularly arbitrary; for example, the preference for octal over hexadecimal and for for (;;) over while (1). Don't read more into it than necessary: it's just what I prefer. You probably have different preferences.

Comments, positive and negative, are welcome. Send them to me at [email protected].


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Ben Pfaff on September, 11 2001 using texi2html