next up previous
Next: Documentation Up: Coding Style for CS2005 Previous: Coding Style for CS2005

Source Code Formatting and Names

In professional software development, rigid style guides are normally provided that programmers must adhere to. However, there is no generally accepted good style--readability is the most important requirement, and several different styles are used. The textbook's guide on page 744 will do. For variable and function names, I personally prefer capitalization of each word except the first one (printEmployeeSalary()) rather than the style used in the textbook (print_employee_salary()). As long as your are consistent, either is fine. One rule is important: variable names must be meaningful words, single letter variable names are (almost) never acceptable!

Andreas Koeller
2000-06-04