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:
- Repeated logic that can be broken out and moved to functions of their own
- Functions that should be private aren’t private
- Behaviour that does not correspond to its description in comments
- Code that could segfault under certain circumstances
- Tests miss important corner cases (compare with your own!)
- 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
Severity | Example |
---|---|
1 | Improving description in a comment |
1 | Fixing spelling errors in a comment |
1 | Improving names of variables in a function (or name of a function) |
2 | Finding a DRY violation and solving it (e.g., through extracting functions) |
2 | Hardening correct code by e.g., adding initialisation, braces, etc. in a function |
2 | Moving a structs, adding static annotations in a file, etc. |
3 | Improving tests by additional cases for an important test |
3 | Finding 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.