CMPS 111: Introduction to Operating Systems

Coding Style

Operating Systems are extremely complex software systems. By their very nature they are confusing and difficult 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 significant points on your assignments even if they are otherwise perfect. As the quarter progresses I may add to this as necessary.

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.


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.