In Douglas Adams’ “Hitchhikers Guide to the Galaxy” the computer Deep Thought famously gives the answer to “The Meaning of Life, the Universe and Everything” as 42. Ever since geeks have pondered and wondered about the reasons why Douglas Adams choose 42. Did he just pick an arbitrary number? Or was there really something to ‘get’?
It is my opinion there is something to ‘get’ and it all involves understanding a little bit about C and ASCII. You see, Deep Thought, as a computer, would have to be programmed, and you will know, if you are a programmer, that programs generally have BUGS!
It is my contention Deep Thought had a bug.
To understand why this is, consider the following piece of code:
char x = ‘*';
printf(“The meaning of life is %i”, x);
It prints to screen “The meaning of life is 42″. The ASCII representation of an asterisk “*” in the computers memory is the number of 42. In the above code ‘%i’ take an integer as an argument, but since we have declared the variable x as a character type, instead of printing the character ‘*’, the printf statement instead prints the ASCII (integer) representation of “*” which happens to be 42.
“The meaning of life is *”
The asterisk makes sense. An asterisk is a pointer, a marker than stands in for something else. Was it that perhaps Deep Thought was about to return the contents at memory location of The Answer? Maybe, but I haven’t figured out a way to make a C program do this yet. But I think its more likely that there is nothing there and that the asterisk represents something ‘over the horizon’ pointing at the space where after our computation that is life is complete the answer will be stored.
Is it is all a giant metaphor? Is Douglas Adams is saying “fucked if I know”? Or perhaps, ‘see the footnotes’, conveniently missing.