UMBC CMSC 202
UMBC CMSC 202 CSEE | 202 | current 202

CMSC Coding Standards Summary

The following summary of CMSC 202 coding standards is provided as a checklist for your project submittals. Please read the fully detailed coding standards.

Coding standards make up 15% of each programming project. Although every attempt is made to summarize each coding standard, some may have been inadvertently left off this list. It is your repsonsibility to read and understand the complete coding standards document.

Minor deviations from the standard carry a 1 or 5 point deduction depending on how many infractions are found.
Major deviations from the standard carry a 5 or 10 point deduction depending on how many infractions are found.
Serious deviations from the standard carry a 10 or 15 point deduction depending on how many infractions are found.

For example, if only one function name does not follow the function naming convention, expect a 1-point deduction. If several function names fail to follow the function naming convention, expect a 5-point deduction.

You should expect to have points deducted from your project score for each of the following.

    Minor Infractions (1 or 5 points)

  1. use of file extensions other than .C and .H
  2. primary file ( the one with main() ) not named projN.C (e.g. Proj1.C)
  3. executable not named ProjN (e.g. Proj3)
  4. .H files not guarded
  5. unnecessary inclusion of header files
  6. failure to follow naming conventions for
  7. use of poorly named variables, constants or functions
  8. function prototypes with unnamed parameters
  9. functions with empty parameter list that is not explicity "void"
  10. constant names, values and comments not columnar in declaration
  11. multiple variable declarations per line

    Major Infractions (5 or 10 points)

  12. multiple classes defined in one .H file
  13. multiple classes implemented in one .C file
  14. multiple private and/or public sections in class definition
  15. insufficient or improper use of const for parameters and methods
  16. insufficient or improper use of reference parameters
  17. default values for parameters not specified in the prototype
  18. use of magic numbers and magic strings
  19. improper use of single-letter variable names
  20. code that is unreadable
    This would include such items as
  21. Appropriate comment style
    This would include items such as
  22. invalid style for braces
  23. incomplete or missing file header comments
  24. incomplete or missing function header comments

    Serious Infractions (10 or 15 points)

  25. class method(s) implemented in .H file
  26. class data members that are not private
  27. use of global variables
  28. untested pre-conditions


Last Modified: Thursday, 06-Mar-2003 15:43:07 EST