3 ms·
The most productive team I worked on just ignores this shit in code reviews. Like we will suggest stuff if the obvious formatting is wrong in a way the author
by sqeaky 2y ago
The most productive team I worked on just ignores this shit in code reviews.
Like we will suggest stuff if the obvious formatting is wrong in a way the author probably didn't intend, but we're not going to hold up a code review on a nit. If there's one variable that's Pascal case instead of camel case or something that's not going to stop the code from going in if it's good code from algorithmic and documentation perspective. We just vaguely try to be consistent in each file and act like adults.
We really agreed on value. We would insist that code that could be tested had tests. It was a C++ code base so we insisted that things be as fast as reasonable suggesting proper algorithms and data access patterns. And in general actually cared about bugs and making then shallow.
Another point of agreement was that an automatic code formatter almost always made it look worse than having a few nits here and there. Anyone who mandates the things that really don't matter is just getting in the way.
- kolme 2y agoI think it's kind of important to be consistent about case because if not, people will trip when typing, it's annoying and might even cause bugs. One thing I agree though, it's a waste of time to discuss about it. That problem is best solved with automatic tooling / linting. In the editor, git hooks and CI. But if you and your colleagues don't have a problem with it, then I guess it's fine.
- xnorswap 2y agoIf you don't have an automatic formatter, then you'll find you get messy diffs when it's worked on by someone who does have an automatic formatter. Worse still, you'll find you get messy diffs in constant ping-pong because different people have their formatters configured in different ways. This is a solved problem, many editors, and tools, respect .editorconfig. Learn to configure it, and never have to think about formatting again.
- sqeaky 2y agoIf someone's running an automatic formatter on someone else's project that doesn't match that will always cause a problem.