A coding assignment is assessed on more than working code — documentation, algorithm explanation, testing, and the written report can account for 30–50% of the mark. This guide covers everything from inline comments and README files to full technical report write-ups for CS and software engineering modules.
Most students assume a coding assignment is judged solely on whether the code runs correctly. In reality, a typical CS assignment rubric looks like this:
| Component | Typical Weight |
|---|---|
| Correctness (code produces expected outputs) | 30–40% |
| Code quality (structure, readability, style) | 15–20% |
| Documentation (comments, README, docstrings) | 10–15% |
| Testing (test cases, coverage, edge cases) | 10–15% |
| Written report (algorithm explanation, analysis, reflection) | 15–25% |
This means code that works but is undocumented and unaccompanied by a report can score 40–50% — a pass, but not a distinction. Strong documentation and a clear report push a good solution into the top grade band.
Comments explain why, not what. The code itself shows what is happening; comments tell the reader why a particular choice was made, especially when it is non-obvious.
Every function and class should have a docstring that describes its purpose, parameters, return value, and any exceptions raised. Follow the convention used in your language:
Follow a consistent docstring format. Python: Google style, NumPy style, or Sphinx/reStructuredText. Java: Javadoc. C/C++: Doxygen. Your module may specify a particular format — use it consistently throughout the submission.
Every coding submission should include a README file. It is the first thing a marker reads. A good README covers:
Our CS and software engineering specialists help with implementation, documentation, testing, and the written report component.
Tests demonstrate that your code works correctly — not just for the given examples, but for edge cases and boundary conditions. Most CS markers read the test suite as part of the assessment. Include:
Many coding assignments require a separate written report. Even where not explicitly required, a short accompanying document explaining your approach significantly improves the mark. Structure:
Markers of algorithms and data structures courses expect Big-O analysis. Always state and justify the time and space complexity of your solution:
| Complexity | Name | Typical scenarios |
|---|---|---|
| O(1) | Constant | Array index access, hash map lookup (average) |
| O(log n) | Logarithmic | Binary search, balanced BST operations |
| O(n) | Linear | Linear search, single-pass array traversal |
| O(n log n) | Linearithmic | Merge sort, heap sort, efficient sorting |
| O(n²) | Quadratic | Bubble sort, nested loops over input |
| O(2ⁿ) | Exponential | Brute-force subsets, recursive Fibonacci |
calculate_mean(values) over calc(x); user_count over ucMAX_SIZE = 1000) not bare literals scattered through the code# add 1 to i is useless; # offset by 1 for 1-indexed input is usefulopen("C:\\Users\\Don\\data.csv") will break on every other machine — use relative paths or command-line argumentsComment density should match code complexity. A trivial getter function needs no comment beyond a one-line docstring. A complex dynamic programming recurrence or bit-manipulation trick deserves several lines of explanation. Aim for comments that would help a competent programmer who doesn't know your codebase — not someone who has never programmed.
Check your institution's academic integrity policy. Many universities now allow AI assistance for coding but require disclosure. Using AI to generate code you cannot explain in a viva or oral exam is high-risk — if the marker asks you to walk through your code and you cannot, that is a serious academic integrity issue. Use AI tools to understand concepts and debug, not to replace understanding.
Yes. Always submit the report even if the code is incomplete. A report that honestly describes your approach, the algorithm you intended to implement, the tests you designed, and what you did achieve can earn marks for design, testing, and reflection — even if the implementation is partial. Never submit nothing; always submit what you have with a clear account of its status.