One of the things I have learnt is code review should never start with looking at what the code does or even how it does it. Take this snippet for example:
There are many things you could comment on:
- The insane mixture of camelCase and underscores
- A curious use of the package-private visibility
- Rather disturbing presence of the Singleton annotation
Whilst all these questions are very valid, without proper context they may prove to be completely redundant! Building up this context is where a code review should start, establish:
- Why is the code needed?
- What is the underlying problem being solved?