This may look like a bathroom crisis, but it’s actually an educational opportunity.
The study of programming is really the study of language, and, to add more linguistic intrigue to the whole thing, we can even interpret the word “language” in that statement in two different ways.
First, of course, is the fact that programming students learn one or more sets of protocol for communicating with and giving instructions to computers and machinery. The other way to think of programming as the study of language is that the field has its own set of specialized terms and vocabulary that students have to become proficient with if they’re going to get very far in their academic or professional endeavors.
A tricky yet crucial distinction for new programmers to make is understanding the difference between “zero” and “null,” which in ordinary conversation are sometimes used interchangeably. When talking about programming, though, they’re very different, and to help differentiate the two Japanese security consultant and Twitter user @raysato found what he feels is the perfect example in a very unlikely place: the bathroom.
R SATO（佐藤 玲） (@raysato) February 20, 2017
“A lot of new programmers stumble over the difference between zero and null, so here’s an explanatory diagram,” @raysato tweeted. On the left is the concept of zero, represented by toilet paper roll core with no paper left on it. On the right is null, which in this context translates to not having any roll of toilet paper, either new or entirely used up, present.
In other words, “zero” refers to a known quantity equal to 0, while null describes a situation where no data whatsoever exists.
Hopefully, @raysato’s informative tweet will help newcomers to the world of programming clear this conceptual hurdle. On the other hand, the situation shown in the photograph is a major problem for anyone who just wants to use the bathroom, so hopefully @raysato replaced the roll after sending his tweet.