CMPS 105: Systems Programming

Coding Style


System programs are often difficult enough to understand. Poor coding style only makes the situation worse. Therefore, I expect exemplary coding practices from everyone in this class. If you fail to follow these guidelines, you will lose points on your assignments even if they are otherwise perfect.

Coding Style

Good coding style enhances program readability, clarity, meaning, simplicity, etc. Good coding style is an art as well as a science, but there are a few simple rules you can (and in this class, must) follow that will greatly enhance the readability and clarity of your code.

Comments:

Indentation: Spacing: Braces: Identifiers:

And, of course, you may not use global variables unless no other solution will work. Any global variables must be justified and explained in your design document.

Links to Other C Style Guides - the first one is especially good.


sbrandt@cse.ucsc.edu