scorecard
  1. Home
  2. Enterprise
  3. Mobile
  4. A Googler analyzed a billion files to settle the programming dispute made famous by HBO's 'Silicon Valley'

A Googler analyzed a billion files to settle the programming dispute made famous by HBO's 'Silicon Valley'

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:

tabs spaces

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. 

READ MORE ARTICLES ON



Popular Right Now



Advertisement