3 ms·
Usually it’s one of three things: >Your style isn’t up to spec If you always smell crap, check the bottom of your shoes. I’ve found team style guides to be us
by fardo 8y ago
Usually it’s one of three things:
>Your style isn’t up to spec
If you always smell crap, check the bottom of your shoes. I’ve found team style guides to be useless generally, but attempting to emulate team style by looking at existing code is a winning move. Coding is a team effort, and even if it’s a little extra work, a little beautification can go a long way towards readability.
>Code reviewers want or are incentivized to help
Many code reviewers make a point not to leave a nontrivial review without commenting. Whether this is because they want to help, or because in many workplaces, the code review metric optimized for is “comments closed”, some people will feel obligated. When there’s no substance to dissect, style is often substituted
>Someone’s giving you a hard time for irrational reasons
This is an interpersonal issue. You don’t, in my opinion, need to worry how others will view you if this happens since most people can tell when somebody is just being a dick in a CR. If you’re concerned about this, try to figure out why you two have beef by asking them and either resolve it, ignore/forgive it and move on (some hills aren’t worth dying on), involve management or HR, or change roles
- navalsaini 8y agoYes very valid points. I am thinking of making flashcards with all the styling comments and really internalise them. Its like failing a driving license test everytime I create a pull request. haha... Anyways, I was keen on knowing if this is a common problem (say like 10% of the population faces or its even scarcer). I personally have never seen a project fail because the styling was a little off. I have seen projects succeed because they hit the customer early, and fail because they didn't do it a lot better than existing solutions. But then, to be honest, every project has its own flavours to success.
- bzalasky 8y agoForget notecards, what you need is a well configured linter. There's no reason to save style issues for code review when they can be caught with static analysis. Having encountered this team issue previously, linting made it a non-issue. Pre-commit hooks and CI are two options for enforcing code style.