Tuesday, 18 July 2017 18:13

Tabs or Spaces?

Written by 
Rate this item
(0 votes)

All developers are not created equal…which kind are you?

In the world of programming, there are two kinds of developers: Those who prefer tabs, and those who prefer spaces (for some ungodly reason). You might ask why this even matters; “It’s the same thing,” some might say…but no. No. No. No, it isn’t the same thing at all.

For obvious reasons, tabs aren’t always the way to go. The company you might work for could have coding standards that say to use spaces to indent the next line of code, if necessary. I don’t blame you for being forced to use them; however, in this case, your company is wrong. But I do blame you for not telling the designer of your coding standards that tabs are better than spaces, and should be used. If you have insisted on tabs instead of spaces…well, kudos to you!

Below are two images with the same code. One uses spaces, the other tabs.



Human readability is the leading reason a developer should use tabs. When coding standards specify tabs amongst other styles of coding, it is there to keep the company’s code uniform. This helps when someone else is assisting in writing code, re-writing code, or finding bugs in code. Code that is non-uniform and not correctly formatted makes the reading of code much harder, increasing the scope of work, as well as time needed to fix and/or repair any code that contains errors, which ultimately increases the amount of money needed to get the job done.

If everyone in the workplace is using the same tools (Eclipse, DW, Notepad++, etc.), then it is possible to align their programs to the same coding styles and/or standards. An auto-formatter generally exists in each program, and should be set up as such. With respect to tabs and spaces, you can set up tabs to equal 4 spaces: 1T = 4S.

Use tabs. Avoid spaces. Have a good set of coding standards within the company. This will not only help with the code’s readability, but also increased efficiency, as a whole.

Read 1394 times Last modified on Tuesday, 18 July 2017 18:40
Jeremy Lewis

Jeremy has an B.S. Degree IT: Software Development and over 5 years’ experience with system devlopment.

Slide background

Goza Tequila

Branded Website - June 2016

When I met Gabe and the rest of the team at Ringer I really felt like they could bring my site to the next level. They brought plenty of ideas to the table in our first consultation. That never stopped throughout the process of building the site out. That’s why we ended up with such a great website, custom to us. I’M HAPPY I HIRED A RINGER.


Slide background

Custom Suit Shop

Custom Responsive Website - June 2013

It was nice because there’s the professional photographer, there’s the models, everything’s coming together and I look up and there is Gabe, Gabe actually comes to the meeting to supervise for the whole day, it was something I didn’t expect, A very nice touch, a personal touch!


Slide background

Hidden Gems 411

Custom Social Network Platform - December 2016

"While working with Ringer, they always kept me abreast of what was going on with the project. I never had to ask what was happening. They always kept me informed. The website is way better then I ever dreamed of. I would highly recommend Ringer to work on your project."