Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 2.81 KB

P47.org

File metadata and controls

50 lines (39 loc) · 2.81 KB

P47: Åtgärda defekter efter en kodgranskning

In addition to the previous goal, make a pull request with changes and cooperate with the owners of the receiving code base until the pull request has been successfully merged. Note that it is the code of the other team that should be improved.

If the code you were reviewing in the previous goal was next to perfect, maybe the improvements here will be restricted to catching spelling errors in comments. In most cases, however, there are some real issues. For example:

  1. Repeated logic that can be broken out and moved to functions of their own
  2. Functions that should be private aren’t private
  3. Behaviour that does not correspond to its description in comments
  4. Code that could segfault under certain circumstances
  5. Tests miss important corner cases (compare with your own!)
  6. Code that miscalculates or otherwise misbehaves under certain circumstances

How much work to do is an interesting question. Sadly, the answer isn’t so easy to give. The goal of this exercise is to practise proposing fixes to errors and communicating them through the proper channels which in this case is GitHub.

If you feel that you need support in knowing when enough is enough, then here are guidelines:

For each thing that you find, rate its severity on a scale $1–3$. There is no objective scale, so here are some examples.

SeverityExample
1Improving description in a comment
1Fixing spelling errors in a comment
1Improving names of variables in a function (or name of a function)
2Finding a DRY violation and solving it (e.g., through extracting functions)
2Hardening correct code by e.g., adding initialisation, braces, etc. in a function
2Moving a structs, adding static annotations in a file, etc.
3Improving tests by additional cases for an important test
3Finding and fixing bugs in a function

Ideally, the sum of the severity of your fixes should total at least 10. State the severity for each issue you file and prepare to motivate it to a TA if questioned.


Report a bug on this achievement? Please place an issue on GitHub.