A petty rant

See the title? Consider yourself warned.

OK, geek culture. I am ambivalent with claiming particular things as being geeky or not in the first place, because half the time I fall outside it. (I’m not a night person, I don’t especially identify with or even like cats, to give some trivial examples.) And if it excludes me, it must be wrong. Duh.

But perhaps we should claim being petty and pedantic. Here’s my line in the sand: you do not count discrete things starting at a zeroth thing. Well, if you do, I say it’s not geeky.

There’s a sort of a general understanding that “geeks count from zero”. Here’s where it comes from: in many programming languages, arrays begin at zero, so array[0] retrieves the first item in the array and array[1] the second and so on. This is actually somewhat confusing, and results in plenty of off-by-one errors (for example, if an array has length l, then one is tempted to ask for the last item as array[l] when it’s actually array[l-1], and forgetting that is not at all uncommon).

It has meaning: it’s fairly obvious why this is done in C, it’s because elements in a C array are stored in contiguous memory and the name “array” is already a pointer to the first memory address. Say the array starts at memory address 7, then to access the items of the array you would do:

  • array[0], which is an alias for *(array + 0) or *array, ie, find out what is at memory address 7 (the dereference operator * means “look up what is at this memory address”)
  • array[1] or *(array + 1), ie, find out what is at memory address 7 + 1 = 8
  • array[2] or *(array + 2), ie find out what is at memory address 7 + 2 = 9

And so on.

Dennis Ritchie’s The Development of the C Language shows that this notation is inherited from C’s precursor B.

And it’s not a silly way to count some things. It’s the same way we count age in the Western world: at the beginning of your first year, you are age 0 and at the beginning of your second year, age 1, and so on. The first year of someone’s life begins at birth[0] as it were.

But it’s a silly way to count objects. It is not more geeky to count, say, two apples as a zero/zeroth apple and a first apple. You could perhaps refer to the zeroth apple offset, ie, the point just before the beginning of the first apple, if you had reason to refer to that point (I never have).

Try as I might, this has always bugged me about the history of linux.conf.au: CALU was not the “zeroth because it’s geeky!” linux.conf.au. It’s like someone made that up specifically to annoy me personally. I will find you, whoever you are, and I will take your zeroth apple away from you and unlike you, I will have my first apple. And I will enjoy it.

2 Replies to “A petty rant”

  1. Huh, I always thought that was jokey way to rewrite history to include CALU as a linux.conf.au post-hoc.

Comments are closed.