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:
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.
- Mumbai breathes its cleanest air ever for the second time this monsoon
- Reliance Jio, Voda step up hiring as 5G related job postings up 65%
- Rupee gains 22 paise against the dollar as crude prices ease, FPIs come back
- Cabinet clears proposal to raise ECLGS corpus to Rs 5 lakh cr for tourism and hospitality sector
- Flipkart to pay Rs 1L fine for selling sub-standard pressure cookers