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 1 or 2 function name(s) does/do not follow the function naming convention, expect a 1-point deduction. If three or more 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 line items. Infractions of the same seriousness but of different classifications will be deducted individually. For example: if you do not guard any of your .h files (-5 pts) AND you do not follow proper naming conventions for your classes (-5 pts), you will lose 10 pts.

Graders will continue to deduct points for infractions up to 15 pts. It is left to the grader's discretion whether to continue noting infractions (without deducting additional points). It is your responsibility to review your code and correct any infractions.

Tip for success: Use this list as a "self-checklist" to ensure that your code adheres to the standard.

    Minor Infractions (1 or 5 points)

  1. use of file extensions other than .cpp and .h
  2. primary file ( the one with main() ) not named projN.cpp (e.g. Proj1.cpp)
  3. executable not named ProjN (e.g. Proj3)
  4. .h files not guarded
  5. failure to follow naming conventions for
  6. use of poorly named variables, constants or functions
  7. function prototypes with unnamed parameters
  8. insufficient or improper use of const for parameters or return types
  9. insufficient or improper use of reference parameters or return types
  10. insufficient or improper use of const in defining class methods

    Major Infractions (5 or 10 points)

  11. multiple classes defined in one header file
  12. multiple classes implemented in one .cpp file
  13. multiple private and/or public sections in class definition
  14. default values for parameters not specified in the prototype
  15. use of magic numbers and magic strings
  16. improper use of single-letter variable names
  17. code that is unreadable
    This would include such items as
  18. incomplete or missing file header comments
  19. incomplete or missing function header comments, in particular missing or meaningless pre- and post-conditions
  20. unhandled function pre-conditions
  21. class methods performing input or output

    Serious Infractions (10 or 15 points)

  22. class method(s) implemented in header file (inline methods)
  23. class data members that are not private
  24. use of global variables


Last Modified: Tuesday, 30-Aug-2005 20:10:51 EDT