Coding Style Guidelines for CS481 Team 53 Author: Curt Stein References: http://msdn2.microsoft.com/en-us/library/ms229002.aspx http://blogs.msdn.com/brada/articles/361363.aspx Subroutines: Capitalize first letter of each word. SomeSubroutine() Use a subroutine name that describes what it does, not how it does it. Variables: First letter lowercase, then capitalize first letter of each word. someVariable Prefer longer more descriptive variable names. Identation: All indentations should be 4 spaces. No tab characters (\0x09) in the code! Bracing: Put open and close braces at the beginning of their own lines. if (condition) { DoSomething(); } Braces are never optional. Spacing: Do use a single space after a comma between function arguments. Right: Read(myChar, 0, 1); Wrong: Read(myChar,0,1);  Do not use a space after the parenthesis and function arguments Right: CreateFoo(myChar, 0, 1) Wrong: CreateFoo( myChar, 0, 1 ) Do not use spaces between a function name and parenthesis. Right: CreateFoo() Wrong: CreateFoo () Do not use spaces inside brackets. Right: x = dataArray[index]; Wrong: x = dataArray[ index ]; Do use a single space before flow control statements Right: while (x == y) Wrong: while(x==y) Do use a single space before and after comparison operators Right: if (x == y) Wrong: if (x==y) Comments: Each file should begin with a header that includes a copyright notice. Each subroutine should have a header that includes a description of what it does. ############################################################################# # Subroutine Name: Help # Description: Displays arguments/options that the user can set as well as an # example usage statement. ############################################################################# The code itself should be mostly self documenting. No unnecessary comments like this one. # If statement that parses through all of the options and flags entered at the # command line. Each if statement below handles one of the input cases.