Why I prefer spaces to tabs in code (indentation & alignment)

Indentation is one of the key aspects of coding style, and the issue of using hard tabs or spaces (also referred to as soft tabs) is an ever-ongoing debate in the programming community. Some say it's just a matter of preference and consistency, while others go to great lengths to argue why theirs is the right choice.

My understanding is that there are some basic things that you should know about tabs and spaces before deciding which one's better for indenting your code.

Continue reading