Hacker News new | ask | show | jobs
by phendrenad2 1741 days ago
That is exactly why many harshly critique code. But I've never found their versions to be any less full of tech-debt. Usually it comes down to personal style. "Oh Brenda hates if/else, better convert it to ternary before I submit it. But Oh No! Bob is reviewing it instead! He hates ternary and always wants if/else! I'm doomed..."
3 comments

Sounds like that team should define a style guide and stick to it. Either Brenda or Bob is going to be disappointed for a bit, but the code will be more consistent in the end.
This is why automatic code formatters such as Prettier -- are absolutely genius for teams. (It doesn't work for your particular example of ternary vs. if/else but the point still holds.)
If code reviews are centered around style the entire org is fucked.