Tabs or spaces?

Tabs or spaces?

Join me at the watercooler to answer today's question.

Jenna Pederson
Amazon Employee
Published Mar 21, 2024
Using tabs vs spaces in our code has been a hotly debated topic for years. I once worked on a development team with a couple hundred developers and every so often I'd try to check in code that was mysteriously formatted differently than the previous version because someone decided to change the coding standard from tabs to spaces or back to tabs. These days IDEs often handle this for us with shared configuration or turning tabs into spaces, but there is still debate over which one is better (and it's obviously spaces).
So I'm curious what your thoughts are:

Do you prefer tabs or spaces?

Your choice can impact how others view your code, accessibility, efficiency, and may even affect your salary. Share your opinions on whether tabs or spaces are better in code and why in the comments below!

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.