Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

AWS Logo
Menu

Tabs or spaces?

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

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!
 

3 Comments

Log in to comment