The way I naturally tend to use spaces is that if they are part of the plumbing of the language construct (if, when, try/catch, function calls) they have spaces. If they're used for grouping they don't. That makes it a little easier to distinguish the two uses.