niedziela, 27 kwietnia 2014

An opinion on code review

Code review is often seen as a way to enhance code quality. My personal views on code review are quite different. I will try to summarize them in a short list. You are welcome to disagree.

  • code review frees the author from the responsibility for the code; "I don't have to care so much, since others are looking at it as well"
  • code review fits very very poorly into Scrum framework; it delays the completion of tasks and backlog items and produces an inclination in teams to aggregate the reviews into a several-days-long "phase" placed at the end of an iteration (making it effectively a wateration)
  • code reviews are much easier as a process to learn than TDD or SOLID, so developers do them gladly and receive in exchange a feeling of accomplishment (unfortunately):
    • "I give my code to others to review, because I care for code quality"
    • "I review the code of others, because they value me as a knowledgeable person"
  • code reviews drag the feedback to the very last moment, instead of asking for feedback early and continuously
Your code can be better without code reviews.