7
Xamenyap
12d

What do you guys think of code review? It was supposed to find potential mistakes in your code base, and share your knowledge with your co-workers, right?
In fact I have very bad experiences with code review, not just with 1 company, but quite a few. Code review process always comes to something like this:

Reviewer: Hey, I don't like your solution A because of disadvantages A1. You should implement solution B, because of advantage B1 blah blah...
Me: Yes, it's true that solution B provides advantage B1, but at the same time introduces much more complexity to the code base than necessary, and has disadvantage B2. I am aware that solution A has disadvantage A1 but it is justifiable and easier to overcome than B2 imo. In fact, solution A also provides advantage A2 that you might not know...
Reviewer: No, you HAVE TO implement B because of advantage B1 blah blah *repeating why B1 is awesome again*

I feel like it's just people trying to shove their preferences down my throat. Either code review is useless, or the companies I work for do something very very wrong in code review. Anyway, it's really discouraging me fron participating in team discussions.

Comments
  • 5
    Code review shouldn't be based on preferences at all tho. Choosing A or B implementation is a team choice based on how well it fits the product you're making together.
  • 7
    Code review isn't for selecting a path and making decisions. It's for getting a second or third set of eyes over the chosen solution (this should have already been done as @Lyniven said) and making sure there's no bugs, stand out performance issues, or missed requirements, or just recommendations.
  • 0
    > or the companies I work for do something

    > very very wrong in code review.

    This !

    Probably a good question to ask in any job interview, eg. interview them about their code review with an simple example you prepared and have with you, and see if they pass the test !

    Tell them if they don't. :-)

    Or tell them you will, and don't !
  • 1
    I like code reviews, it's useful. Someone explains to me why they prefer a particular solution == I learn something. Either about them as a person or about my job.

    "People" is your problem here. Or "person".
  • 0
    Nowadays I notice a lot of folk like to exercise power because they can.

    A previous place I worked, every time a new manager got in, they would change things, if they needed to be changed or not..

    I only changed the things that needed to be improved and left the things that had been working fine for hundreds of years alone. :-)

    I remember moving a desk that was in the wrong place, doing so saved 18,000 working hours a year.

    When a new manager got in charge, they moved it back to its old place, and everyone's workload went up again, even though they knew why I moved it in the first place !
  • 1
    Such an aggressive code review is only warranted if the code actually would run into problems. Like, choice of an n^2 algo because it's fast enough for the small test data sets, but may be faced with large sets now or in the future.
  • 0
    “I don’t like your solution “ WTAF!

    PRs are welcome-> RESOLVE
Add Comment