CS 051G Lab Style Guide

The way you present your program is just as important as having a correct program. While having good comments or good variable names will not affect the correctness of your program, it will make it easier to read your program. It is important that others be able to understand your code so that they can modify your code if they have to, and understand it to make sure it is correct. Half of your lab grade will be determined by your programming style. Back in the 1950's when computers were expensive, only Ph.D.'s were allowed to program computers and efficiency was more important than readability. Today the situation is reversed. A program is nearly worthless if other programmers cannot read and understand it.

This is a guide to help you better understand what we are looking for when we look at your labs. As the semester progresses there will be steeper penalties for styling mistakes. So, get into the habit of writing good labs from the beginning. After writing your lab be sure to look over your code and your style. Also keep in mind that programs are much harder to read when printed in black and white as opposed to when they are displayed in different colors on the computer screen.