Code Submission Checklist
-
Repo is correct
and has no stray files or directories.
-
A proper .gitignore file is present in the repo.
-
A proper README file is present in the repo.
-
Commits were made smart, small, and often.
-
All code files have a proper file comment header at the top of the file (see examples).
-
Function comment headers are present in all functions (including main) and
contain all required information in the style specified by the examples.
-
All file names are lowercase, no spaces (use underscores for spaces if needed).
-
Name and references to names do not mix case.
-
All variable, constant, ADT, and object names use the correct case are meaningful names.
-
One and only one return statement is present in all functions.
-
None of
exit() or abort() or quit() in present in code.
-
Literals are appropriately referenced and not use directly in code.
-
Loops:
- used properly between indeterminate and determinant
- do not call functions in the loop header
- do not declare variables inside loops (C/C++ only)
- do not use unnecessary if statements inside loops
- do not use
break or continue
-
Code is not repeated and properly modularized (use functions appropriately).
-
Functions:
- do one and only one thing
- do not print (unless that is the function's only purpose)
- vot too long (under 20 lines is a good rule of thumb)
- not too short; do not make 1 or 2 line functions, although there
are exceptions, such as getters
-
The driver file (main) has one and only one function
main().
-
Class files have one and only one class definition and implementation.
-
No class attributes are public.
-
All code compiles/interprets and runs without errors or warnings.
-
(C++ only) Class header file is
commented properly and contains all required information
in the style specified by the examples.
-
(C/C++, PHP, Javascript) Code is properly indented and formatted including
proper bracketing and spacing for all code (even if it's a 1-line block).
-
(C/C++ only) No directives in .cpp files except that file's header file #include directive.
-
(C/C++ only) Did not use global namespaces like
using namespace std;.
-
(C/C++ only) Class header files are structured correctly, maintaining proper separation of
interface and implementation. See the notes and lectures on this topic.
This checklist is not exhaustive, so be sure to review all relevant
guidelines, instructions, and specifications to ensure your code meets all requirements.