Hip Hip Array

Chap Percival has an interesting blog entry (I borrowed his title for this post) in which he talks about how he explains why array indexes start at zero. He gets into the math of it - data size in bytes, calculating offsets, and that sort of stuff. I must admit that I like talking about the bits and bytes of computer science. Don't get me wrong, I'm happy that I do not have to calculate where the data is by knowing the index, the size of the data type and other pieces of hardware when I write a program. I've been there and done that so I really do appreciate using higher level languages that take care of arrays, memory allocation and all that. But it's nice to understand what is going on under the hood. I think that this sort of detail helps students appreciate what compiler writers and people using Assembly language do. It also gives them some insight into the underlying hardware which may get some of them to thing about computer engineering as a field. Those are all good things in my opinion.

Chap does a good job explaining things in any case. And as a math teacher (Chap not me) you can understand how much he likes showing how math is useful in real life. That is often a plus.

Comments (0)

Skip to main content