Zero Again

August 25, 2022

Printing press bed sizes, circa the late 1800s.

Hillel Wayne has registered a strenuous disagreement with a bit I wrote in 2013 about zero-indexing and now I need have an internet argument because, I suppose, that is simply my nature. I’ve never met them, though I’ve enjoyed their writing whenever I’ve come across it, so if you’re invested in precision beef calibration that’s where I am. They seem like decent people, I feel like my case was misrepresented, strap in.

Wayne makes some solid points; I could stand to clean up and republish that article, something I was reluctant to do back when it took off and haven’t gotten back to. He definitely understates the case in saying “Most modern languages have at least some C influence in them”: in fact, approximately every programming language now needs to speak C, something I’m really only mentioning because it gives me an excuse to link up an amazing post that deserves a wider audience. But he falls into the same trap I railed against in my 2013 conclusion: retelling just so stories because it’s easy and fun.

I think his gist-of-it summary is not really a fair reading of the post, but the straw man I’m initially arguing against is that the claim that zero-indexing specifically-in-C “makes sense” because of an argument Dijkstra made is compelling and easy to retell, and obviously nonsense, even if Dijkstra’s argument was influential to later languages.

You can make that claim about Python, though, and you’d be right! Dijkstra’s interval-elegance argument did carry the day there. But I don’t know this because Python was born after 1982, or because elegant math, or because of some hand-waved set of conflated circumstances. I know this because I looked it up and found that Guido Van Rossum said so.

Literally everything having to do with computing was somebody’s decision, and we should not be confident we really understand the why if we can’t point at the person.

We really start wobbling on the rails further in, when… look: there’s no kind way to say this: that offhand sentence “wire formats like EBDIC and ASCII “started from 0″, since they considered the 0-byte a valid unit” is exactly what I mean, when I’m talking about things that are made up, that don’t even rise to the level of wrong. What is ‘valid’? Who’s they? How do we get from there to why?

I mention it because I know the real answer, and talking about the “wire format” of a character encoding when the first networked computers wouldn’t exist for another half decade is precisely what I’m getting wound up about here. The reason we have an all-zero-bits representation in those character sets is the same reason we use null as a string terminator, and that reason antedates mainframes, transistors and the Church-Turing Thesis. There are plenty of benefits to it that came about later! Definitely. But the reason we chose to have that in EDCBIC and ASCII (and Baudot, ITA2 and others of that era) is not “all the ways it turned out to be useful later”, and that reason was so that we could easily re-use punchcards.

Punching Down

(Fun fact, and this is a fact: around the time these standards were being hammered out, punch cards and related tooling made up 30% of all of IBM’s revenue. Consequently, one design constraint on EDCBIC that ASCII did not share was anchored in IBM’s business model: keeping too many holes in punch cards from being too close together, making the cards less likely to fail. Yes, I can find you a citation for everything in these parentheses.)

There are a few other arguments in there, rebutting claims I’ve made that I don’t really think I made, but I recognize enough contrarian in myself that I guess I’m obligated to be charitable with anyone pointing their contrarian at me. And charitable can be a job, for sure, but fair’s fair and a job’s a job. But there’s one larger point here, the real point that I wanted to make then and want to make now, that I’m not going to let go:

“Hoye’s core point is it doesn’t matter what the practical benefits are, the historical context is that barely anybody used 0-indexing before BCPL came along and ruined everything. […] I may think that counting 0 as a natural number makes a lot of math more elegant, but clearly I’m just too dumb to rise to the level of wrong.”

My point is not, my point has never been, that “zero indexing is bad”. My point is “believing and repeating uninterrogated stories because they sounded plausible to you” is bad, and I’m saying that because it’s really, really bad.

“We’re doing this like this because it just makes sense” is not just the general shape of made up stories I see programmers and engineers telling themselves all the goddamn time. It’s a habit that opens an attack surface on your soul. Smart people who’ve fallen in the habit of believing and retelling just-so stories about why things are the way they are, stories that are easy to digest and repeat, are incredibly easy to manipulate into building monstrosities, ignoring structural and systemic injustices, and acting in service of forces they don’t even realize exist because their little constructed reality seems to hold itself together.

Stories are weapons. I don’t know how to say this loud enough. Software is quite literally an idea that you’ve taken out of your head and turned into a machine, a set of decisions and parameters that you, as a programmer, impose on people who will have little or no say in the matter. It is ideology and bias turned into power. If you’re happy to repeat things you’ve heard without caring about whether or not they’re true, what are you?

Because this is where antivaxxers come from. This how the cryptocurrency cultists can bring themselves to believe their racist monkey cartoons are worth anything or ending fiat currency will stop war or any amount of all the other bullshit they believe while they’re destroy the planet and the lives of the people on it. This is why the world’s worst despots have buildings full of people spending all day on the far end of a VPN pretending to be Michigan soccer moms or Boston Antifa or Alberta Gun-Owners Rights advocates or any goddamn thing that helps them pour kerosene on anything that might set a democracy on fire. This is how smart, young developers can convince themselves that their work is morally and politically neutral while building the algorithms that, oops, hand a megaphone to fascists and turn explicit racism into implicit policy.

It’s this. And yeah, sure: it’s also other things. It’s complicated. I get it.

But it’s this.

  • Don’t be a dick.

Ok, sure. I could stand to work on that part. I concede the point.