Idiomatic code - how to deal with over passionate people?

I recently got a new colleague reviewing my code, and instead of finding bugs he finds this:

  • “always use the range for, never the C like one - to make it more idiomatic”
  • “each (every single) line of code should have a comment above it explaining what it does - to give people the options of only reading comments never code”
  • “always use named return values, never non named - to make it more idiomatic”
  • “always use deepEqual in unit tests, never compare the string values - when asked why I only get another always use deepEqual”
  • “never use a base function + wrapper, duplicate code because - it is more idiomatic”
  • “never split a string into 2 shorter lines - is is easier to read”
  • “never return interfaces or pointers - to make it more idiomatic”
  • “never return 3 values, only result and error - to make it more idiomatic”
  • “always create your own error implementations (structs) for every returned error - to make it more idiomatic”
  • “the merge request is too large, do not push half a day of work at once”

This is getting out of hand, the word “idiomatic” is now used to justify anything, no matter how useful or not. When bringing up that idiomatic is not a value, maintainability is, I see this person getting annoyed. Also code reviews no longer find bugs but new (every day new stuff that was not pointed out the day before) ways of making code more idiomatic.

How should I talk with this person ? Also, it feels to me like this is hindering my own progress and would love to hear if anyone else can relate to this. Also for him, the time and energy placed on idiomatic code is no longer spent elsewhere, it idiomatic code actually a good investment ?

1 Like

Discuss the value your team places on idiomatic code compared to other aspects of your work as a team in the next retrospective.

I’d advise removing the focus on his age and / or experience, first, as it’s entirely irrelevant to the matter at hand (nor are yours). Then I’d focus on the most problematic issues; a laundry list of disagreements isn’t going to build any kind of productive dialog.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.