The Silicon Valley episode takes look at one of the geekiest coder nerd fights in history — spaces vs. tabs — with comic relief. To the uninitiated, especially those who have never taken a programming course, this is a very real debate and, as “Jared” (Zach Woods) says, “Once the code goes through the compiler, there is effectively no difference.” And he is correct. But he also goes on to say, “At Hooli, I once saw two engineers get into a fight so vicious they almost made physical contact.” So what is the deal about something that is so meaningless that, as Dinesh (Kumail Nanjiani) puts it, “Coders go batshit over it”?

People read Code

As it has been pointed out, once the code goes through the compiler, it becomes machine instructions that the computer can then execute. This means that whether one uses spaces or tabs, the code comes out the same. So why the big deal? Well, people have to read the code, and in some cases correct it.

Spaces vs Tabs
Comparison between Spaces vs tabs. Example taken from Coding Horror

Coders group things by indenting their code, which makes things readable. From the comparison there seems to be little to no difference between tabs or spaces. There hardly seems to be a reason to fight. Or is there?

The Difference between spaces vs tabs

Both tabs and spaces share one thing. In a text editor, they both take one character but how it is represented is different. Depending on the text editor, a tab jumps forward eight or four spaces. This means that, depending on the editor a coder uses, computer code can look somewhat different. Spaces offer a certain granularity of control so code looks the same on all editors.

There are certain trade-offs with this. The four (or eight) extra characters increases the file size. How big an issue this is, depends on who you talk to. In Richard’s case, this is a huge issue. There is also an “efficiency” issue when it comes to typing. Instead of typing one tab, one has to press the space bar either four or eight times.

Are Coders being anal over this spaces vs tabs thing?

It seems it all comes down to preference. If some person wants to use spaces, then they should. If someone wants to use tabs, they are free to do so. No argument, or is there?

spaces vs tabs
Richard Hendrix explains the difference between spaces vs tabs

What seems to be a matter of preference is far from. Humans must read, edit, and check each other’s code and, with it, comes certain habits and ways of doing things. When working in a team or with a group, how things are (or should be) done can cause conflict. If you aren’t a coder and still think it is silly think about the formatting guidelines where you work. There are (usually) written rules on how company documents should be styled and formatted. There are managers who would go through their employees’ code, changing spaces to tabs, before allowing that final commit.

And this what that little argument Richard Hendricks (Thomas Middleditch) has with his employees, Gleb and Sanjay. Sure, both Gleb and Sanjay are right in that once it goes through the compiler, the compiled program is the same. But it is a company rule. Having some sort of the internal consistency makes things easier to work together.

Going too Far

One of the defining things about Silicon Valley is how the characters always manage to create the unfortunate circumstances that affect them; an example of this is where Sideshow Bob steps in rake after rake on the Simpsons.

Things really take a turn for the worse when Richard starts dating Winnie (Bridey Elliott). Winnie is a coder who works at Facebook and uses spaces. Rather than let it go, Richard tries to prove his point by walking out on this date and falling down the stairs. (At least, he showed her).

Which is better?

The show does not answer which is better because there is no answer. At least none that can be answered in a quantifiable way. What it does portray is an aspect of coding culture accurately. This is something the series has done consistently by showing the sometimes absurd aspects of startup and coding culture in a humorous way, and this makes the show a consistent must-watch. I thoroughly enjoyed this episode and can’t wait for the next. After all, if you can’t laugh at yourself, no one is going to laugh with you.


Please enter your comment!
Please enter your name here