We all know I’m a fan of kicking the hornet’s nest so see what flies out. One topic that comes up over and over and over again. Tabs vs Spaces.
I fall into the tabs camp. Why?
Let’s take a step back and look at the definition of heresy from Merriam-Webster. I am specifically focused on 2a. “dissent or deviation from a dominant theory, opinion, or practice”
To be honest, there is no dominant theory, opinion, or practice on this topic. Sure. You have your idea. I have mine. Neither is inherently better than the other. I choose to lean towards an open model instead of the more restrictive one. Am I willing to die over it? No, but I do subvert it every time I can.
Certain languages (Python) require spaces over tabs. That is a code smell to me. To quote Paul Nathan, “… I consider the idea of whitespace-meaningful languages to be a design flaw. Things you can’t see should never break your code.” (Link)
It’s the 21st Century. Why should I tell someone, anyone, what display settings to use? Any developer can configure their IDE to display a tab at any width. A simple extension can enable automatic conversion to tabs from spaces in Visual Studio (and many other IDEs). If you like 8 spaces or 3, you can configure the tab to display your preferred spacing. The key word is preferred.
I have seen an argument around the IDE being too “simple” to support the add-ons to make the developer experience seamless. Well… Are you a professional or do you use substandard tooling just to up your billable hours? (If you’re a student, then you’re not billing.) If you’re a corporate drone (like I used to be), you’re still billing. Our job as IT Professionals is to deliver business value. It makes no difference who you work for be it a mega-corp, a non-profit, or yourself. If you are not delivering business value, you need to reconsider things.
I think draconian yet arbitrary dictates serve only the ego of the claimant. There is no orthodoxy on this topic. It’s all user preference so why do some people chose to force everyone else to fit their ideal?
I know this is one of those topic where people love to yell and scream their way is the only way. To a degree, I’m doing the same because I am choosing a side. But… I don’t see how being open to allowing each developer to choose their own settings is such a drastic notion.
It really isn’t worth fighting about. It’s just a few characters. It rarely makes a difference. When it does, fine. Otherwise, in 99% of the time, it makes no difference. Right?
So why not pick a standard that enables choice?