Comment Re:Kinda Subjective but... (Score 1) 479
If you don't understand the difference between coding and writing a text document, you are beyond help.
If you don't understand the difference between coding and writing a text document, you are beyond help.
You may be using a computer, but you're not understanding what you're doing with it.
Because the former is less of a burden than the latter?
Sounds like somebody lost his job to a better coder, but doesn't want to admit it.
If it's so easy, what's stopping you from refactoring your code to fit the common style? I'm amazed you still have to make this an issue.
Seriously? You are reading the code, fixing bugs, and you find formatting problems. So you back out your half-complete changes, fix the formatting, commit that change, then re-apply your fix-in-progress? You actually do that? Of course you don't.
The better policy is that code must be formatted correctly when it is committed the first time. Which is why we have style guidelines in the first place.
Coders should spend their time looking at the code, not getting distracted by style variations.
What, your editor is too dumb to insert the right number of spaces when you hit enter? Ouch.
So nobody at your shop puts comments on the same line as code? Why? Was it forbidden by the style?
By that reasoning, you shouldn't be concerned with getting dressed before going to work. Clothing does not produce cool code, does it?
Seemingly you are the one who can't click a button. And that is your fault.
Whatever style you choose, make sure that it can be generated with whatever automatic formatting tools you have available. This allows you to cut-n-paste code from other sources, and not waste precious time hand-formatting it (or leaving it in the wrong style). It also avoids the problem of lazy programmers feeling butt-hurt when somebody points out that their code does not follow the style. They can simply run their sloppy code through the pretty-printer before committing it.
If your code style calls for spaces, do not insert a tab instead. It's annoying, and you break the indentation that everyone has agreed on.
It's a standard, whether you like it, or know about it, or not.
If you think the only way anybody will ever view your code is in a "sane IDE", you are mistaken. Just because your current IDE can compensate for your bad formatting, that doesn't make your bad formatting a good practice.
I wonder how long you have been writing code, if you don't yet realize that sometimes aligning things vertically across several lines can increase clarity. If everybody gets to set their own indentation amounts (by changing tab width), then this benefit is lost. Tables were invented for a reason, and sometimes code is tabular. And if you think a tab character is how you get a table, you are sadly mistaken.
For example, having same-line comments start at column 60 (when possible) makes code easier to read. If you go changing the tab character to 4 spaces, that alignment is ruined.
Also a reason for not using proportional fonts.
Anyone can make an omelet with eggs. The trick is to make one with none.