Does Coding Style Matter?
theodp writes "Over at Smashing Magazine, Nicholas C. Zakas makes the case for Why Coding Style Matters. 'Coding style guides are an important part of writing code as a professional,' Zakas concludes. 'Whether you're writing JavaScript or CSS or any other language, deciding how your code should look is an important part of overall code quality. If you don't already have a style guide for your team or project, it's worth the time to start one.' So, how are coding style guidelines working (or not) in your world?"
At my workplace, we just all plug the same code style settings into our IDEs, and everyone's code gets formatted the same way automatically. And yes, it matters: having everyone's code formatted the same way makes it much easier to read.
I use tabs because anyone can set the width to whatever they like (2, 4 or 8 spaces usually).
a tab is a tab. It is not 8 spaces. It might be the same width as 8 spaces, but that is because your editor displays a tab as that width. Most editors allow you to change it.
If your code style calls for tabs, do not insert 8 spaces instead of a tab. it's annoying, and you break the tab settings everyone chose for themselves.
No, this just means you (and/or the people you work with) are using tabs in the wrong way.
Tabs for indenting, spaces for alignment. Makes sense logically too, because those two functions are fundamentally different.
I.e. it should be:
<TAB>int_a;________//_Hello
<TAB>int_whatever;_//_Yeah
Where <TAB> is a tab and _ is a space.
Works beautifully. Think, people!
man expand
read it.
And your post is exactly why people standardize on spaces. Because some people think they can insert a bunch of spaces instead of a tab, breaking everyones formatting, making diffs a huge mess and putting your whitespace changes in the commit log. Tab is not space.
A space is ascii # 32
A tab is ascii # 9
stop mixing them.
one of these guys is using Comic Sans as his coding font, as he's dyslexic and it helps him
Has he looked into fonts designed to help dyslexics, like Gill Dyslexic and Open-Dyslexic?
Dilbert RSS feed