DEV Community

Discussion on: Don't let programmers alone

Collapse
 
giuunit profile image
Giu

I do understand the idea of this article - code reviews are the best to avoid bad code. The idea behind the article is 100% right.

However I feel like there could be a better example than this code. This one doesn't have an error in it, it's just incredibly long for what it is doing.

Collapse
 
donut87 profile image
Christian Baer

Thanks for your comment. I totally understand your objection, but I have my reasons for choosing exactly this example.
My first point was, that I had to triple check if this code really does only one thing. It is not just incredibly long, it is redundant. Most of our developer time goes to reading code. So it should be easy to understand.
My second point was, that I knew exactly, that the author of these lines is no rookie. So for me, this was not redundant code at first, it was treacherous.