Original post

I recently got a young 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 “
  • “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 stupid. When bringing up that idiomatic is not a value, maintainability is, I see this young person getting red in his cheeks, with anger. Also code reviews no longer find bugs but new (every day new stuff that was not pointed out last week) ways of making code more idiomatic.

My assumption is that many young developers read blog articles on the weekend, they get a feeling that they’ve just learned something new, and that their skill as a programmer has increased. But in reality it just gives an unearned feeling of superiority, it allows them to believe “I am good because I write idiomatic code”, instead of focusing on the outcome (quality + quantity) and actually putting in the effort to become better programmers.

This is very damaging because such a deluded person no longer finds much bugs during code reviews, and when showed a bug in their own code it challenges his self image (based on idiomatic code grandor) thus is not met with gratitute.

How should I talk with such a 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.