A Googler analyzed a billion files to settle the programming dispute made famous by HBO's 'Silicon Valley'
If you watch HBO's "Silicon Valley," you may remember this now-classic scene from the most recent season, where our hero Richard Hendricks ends his relationship with a Facebook engineer over her programming style:
The debate over tabs and spaces, as presented in HBO's Silicon Valley, is real: Developers have been arguing over using tabs versus spaces for formatting their code for almost as long as the concept of programming has existed. At stake is the aesthetics of the code itself - does putting a tab after each new line make it more readable? Or do you just push the space bar a few times?
(A more detailed explanation of the tabs vs. spaces debate can be found here.)
And so Google Developer Advocate Felipe Hoffa stepped in. By analyzing a billion files, taken from the 400,000 top programming projects on the GitHub social network for software developers, representing 14 terabytes of data all told, he was able to see who was using tabs, and who was using spaces, in most major programming languages.
You can read his full results and methodology here, but the end result is bad news for the tabs-loving Hendricks. Check it out:
Felipe Hoffa/Google
As you can see, spaces far outpace tabs in every major programming language with the exceptions of C, one of the very oldest programming languages still widely used, and Google's Go, an upstart of a programming language that's finding fans among people writing software for the server.
This doesn't exactly prove which one is better - but it certainly shows the way that programmers are working in real life. And in most ways that matter, it seems the debate is already over.
- I spent 2 weeks in India. A highlight was visiting a small mountain town so beautiful it didn't seem real.
- I quit McKinsey after 1.5 years. I was making over $200k but my mental health was shattered.
- Some Tesla factory workers realized they were laid off when security scanned their badges and sent them back on shuttles, sources say
- 8 Lesser-known places to visit near Nainital
- World Liver Day 2024: 10 Foods that are necessary for a healthy liver
- Essential tips for effortlessly renewing your bike insurance policy in 2024
- Indian Railways to break record with 9,111 trips to meet travel demand this summer, nearly 3,000 more than in 2023
- India's exports to China, UAE, Russia, Singapore rose in 2023-24