News for hackers. Stuff that matters.
Re:Ask HN: How do you review code? by eoin_murphy on Monday April 04, 2016 @04:49AM (#11420301)
Even worse, working on technical debt may be viewed as a negative thing ("if it's working why did you change it?" said the phb).

I've yet to find a code review process beyond a trivial implementation that scaled. The best results I've had were with a rotating buddy system. (Every week/month) you review someone else's code and they yours.

Re:Ask HN: How do you review code? by partycoder on Monday April 04, 2016 @05:11AM (#11420380)
There are some static analyzer metrics as well as metrics you can obtain yourself. These metrics relate to the cost of maintaining code:

- cyclomatic complexity

- statement length, function length

- number of singletons / global instances

- dead code

- duplicated code (intelliJ has a good duplicate detector that anonymizes variables and ignores whitespace and comments).

- number of known functions/types per file (coupling)

- number of commits per file (git-effort from git-extras)

Some of them are tricky to obtain. Making a simple script that parses import statements and outputs a DOT file with a digraph is useful to map dependencies, which is good to explain coupling.