Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
If this question can be reworded to fit the rules in the help center, please edit the question.

4

Food for thought from the Sun FORTRAN Reference Manual: "Consistently separating words by spaces became a general custom about the tenth century A.D., and lasted until about 1957, when FORTRAN abandoned the practice."
–
BlrflJan 26 '12 at 22:00

Also, COBOL considers spaces a must, but I guess this is a parsing requirement.
–
Emmad KareemJan 27 '12 at 1:17

And I said, I don't care if they lay me off either, because I told, I told Bill that if they change coding style one more time, then, then I'm, I'm quitting. And, and I told Don too, because they've changed coding style four times already this year, and I used to indent my code with 4 spaces, and I could read the code, it was readable, but then, they switched from 4 spaces to 2 spaces, but I kept my 4 spaces because it looks better, and I kept the spaces between operands and it's not okay, but if they take away my spaces between operands, then, then I'll set the building on fire...
–
gablinJan 10 '11 at 19:53

I can remember when the programmers world included stuff like greyfade's spacebar troll. We used to carry around trays of hollerith cards. And there was a per card read charge just to read your deck in. And diskstorage was also outrageously expensive. So not using unneccesary spaces (or comments), and grouping as many statements per line of source were important for optimizing your overall project cost. That said, there is just the right amount of white space that provides optimum readability (same with name length)
–
Omega CentauriJan 10 '11 at 22:45

But understand: The clearness of your codes structure is not proportional to the amount of whitespace you use. So don't overdo it. Personally, I often code on my laptop and I can tell you, putting two new lines after each block doesn't increase readability, because it prevents me from seeing a whole unit of code at once. But then again, these are my personal constraints.

Adding whitespaces between operators is not cannonically better. Any mathematician will tell you that 4ab is more readable than 4 * a * b. It's a matter of culture and habit.

What you really should do is sit down with your team and try to get a feeling for how much whitespace is too little and how much is too much and then stick to that. Because ultimately, you don't do this to please some higher power (or some style committee that acts as if it were one), but for the people who have to maintain that code.

All coding standards I've ever used (in Java, C and C++) required spaces around most/all binary operators. For me, if the coding standard says so, that is good enough reason.

Some people would argue that coding standards are fascist, cramp their style, make them less efficient programmers, etc. But these arguments miss the point. Coding standards are about making your code readable and maintainable by other people.

Proper syntax highlighting, which is a must-have for every IDE, makes spaces less useful. Highlighting makes names of variables visually distinguishable from math operations and assignment operators. This just means that how to set spaces is not a very important question.

I usually select a pattern depending on a language. If a language is abundant in spaces (such as OCaml or Haskell, where Space is a delimiter of function arguments), I use more of them:

@Bill, apparently, we have different notions of whether a piece of code is complex. To me, syntactical complexity doesn't immediately render the code "complex."
–
Pavel ShvedNov 10 '11 at 9:40

2

@Pavel If you can't read through code as though it was a book on your first pass-through, it will slow someone down some day. Slowing the next person down should be your biggest concern when programming (even over functionality). Note: The next person is most likely to be you in a week, and the time you spent making your code readable will be repaid immediately, generally before the first release. Also small final methods used for calculations are free--it doesn't take ANY cpu time to make your code readable--generally.
–
Bill KNov 10 '11 at 17:00

My personal preference used to be to not go with the spaces: when writing C / C++ code I never used them around operators.

But since moving into the C# space, with Visual Studio automatically formatting my code with spaces around the operators, I realized that I actually didn't care. I'm perfectly happy with the spaces just as I used to be perfectly happy without them.

We have a couple of hundred years of prior art typesetting mathematics. I can't think of any reason not to follow that practice. Put spaces around operators, but not around '(' and ')'. I would also not put spaces around an exponentiation operator, especially if it is the circumflex (^). I am in some agreement with posters who suggested using spacing to match operator precedence.

I always do the spaces more because I like the way it makes my code look as a whole, instead of any readability when figuring out what expressions do. I don't see a difference either way as far as that goes, but something about having those spaces between everything makes the code feel much less cramped and more pleasing to me.

Depends on if you are writing or reading the code. Being a solo coder I have found that my coding (ahem) standards have layers to them. When I am writing the function, or it is in progress, I just use basics, but when the function or module has jelled I will often put in the most OCD of coding style -- so I can tell when I am in a 'pristine' or finished function (or various stages thereof).