3 ms·
There's a big difference to styling your code "when in Rome" like the code around it, and fighting for each team you visit to change their style to match your p
by JackMorgan 12y ago
There's a big difference to styling your code "when in Rome" like the code around it, and fighting for each team you visit to change their style to match your preferences.
- sophacles 12y agoI like to phrase this as "style doesn't matter, consistent style does". It's important to have consistent style, because once a programmer internalizes the local style - some types of bugs become transparent: the upon understanding what something is supposed to be doing, the style provides visual cues to the flows and a certain predictability in the code. When something is wrong it looks wrong.
- goblin89 12y agoYes, indeed. I think consistency within one file is a good rule of thumb. As an aside, are there any editors that could automagically infer formatting rules (to use for indenting, folding, etc.) upon opening a file? I'm using vim but I think I'd be willing to switch for such a feature.
- goblin89 12y agoNo arguing with that. Just wanted to water down your statement a bit—one can care about formatting style and respect others' choices at the same time. :)