A long explanation of a damned fine joke.

April 15, 2009

Here’s a good joke:

“Why do programmers always mix up Christmas and Halloween.  Because Dec 25 is Oct  31”

Get it?  If you do, then you should probably stop reading here because this is likely to be old news to you.  If you’d like to know why it’s so damned funny, and learn a little computing basics for good measure, read on!

If you’re not a programmer, you (hopefully!) recognise the abbreviations for December 25th (Dec 25) and October 31st (Oct 31), and (hopefully!!) recognise them as Christmas and Halloween.  So far, so good, but not very funny – even to a programmer.

To a programmer, the abbreviations ‘Dec 25’ and ‘Oct 31’ can also mean something entirely different.  Dec 25 is an abbreviation for “Decimal 25” and “Oct 31” is an abbreviation for “Octal 31”, and for reasons that I’d like to explain, these are exactly the same thing.

To see why, let’s start at looking at the normal decimal number system – the number system we use in day-to-day life.  Decimal is simply a way of counting – or more precisely, of representing, numbers – in blocks of ten.  In day-to-day use we use the arabic numerals 0 through to 9 to represent the English numbers “zero” through to “nine”.  After nine, we start counting in units of ten, so ten is 10, eleven is 11, twelve is 12 and so forth.  After ninety-nine, we start with another block of 10, so hundred is 100, one-hundred and one is 101 and so on and so forth.

This is, of course, fairly elementary stuff – it’s the kind of thing we’re all taught in primary school.  As an aside, this, unfortunately, is also one of those things that everyone knows so instinctively that they stop thinking about how numbers work.  10 is ten. 12 is twelve, and that’s all there is to it.  It’s so ingrained that it’s easy to forget what an inspiration the arabic numbering system actually is and how out of kilter with our actual counting system it is.

Okay, so when we say “twenty five”, we write out the arabic numerals 2 and 5, representing 2 x 10 + 5.  When we say “thirty one”, we do the same thing: 3 x 10 + 1.

But why stop at 10?  Why should the arabic numerals ’31’ necessarily represent the number thirty-one.  What if – for reasons that I will shortly explain – I want each column to represent a multiple of a different number?  What if I wanted each column to represent multiples of 8?

There is absolutely nothing stopping us from doing that, and that is precisely what Octal is.  In Octal, the numbers zero through to seven are represented in the normal way: 0, 1, 2, 3, 4, 5, 6 and 7.  When we get to eight though, things get slightly skewed.  Eight in Octal is represented by the arabic numerals 10.  Remember, each column is representing multiples of eight, not multiples of ten; so 10 is Octal is 1 x 8 + 0 – Eight.  And we carry on from there: nine is 11, ten is 12, eleven is 13, and so forth 20 is sixteen, and 31 is 3 x 8, which is 24, plus 1 which gives us twenty five.

(Incidentally, I bet you’re reading that and your mind is reading it as, “so ten is [twelve], eleven is [thirteen] and so forth.  Try to think of each arabic numeral as an independent figure: “so ten is [one, two], eleven is [one, three]”)
So that’s the joke in a nutshell:  to a programmer, the number represented by the arabic numerals ’25’ (two, five) in decimal is the same as the number represented by the arabic numerals ’31’ (three, one) in octal, because 2 x 10 + 5 is the same as 3 x 8 + 1.  It’s simply an amusing coincidence that, to the programmer, Dec can mean both “December” and “Decimal”, and Oct can mean both “October” and “Octal”; and that Dec 25 is just happily, and coincidentally, Oct 31.

But that’s not a truly satisfying answer; the obvious question is why would anybody want to do that?  What’s the point? If 10 is “ten”, then why would anyone find any use in 10 being “eight”?  We all have ten fingers, it’s easy to count in tens, so why change things and count in eights?

The answer lies in how computers store numbers.  Computers, you see, don’t count in tens.  Computers count in “on” and “off”.

This will be the subject of part II :)


“The Atheist Insult”

February 24, 2009

Oh, this is just too good.  More religious people whinging that the Atheists dared to put out an advert.  To be fair, this guy doesn’t like adverts.  He really doesn’t like adverts:

Adverts are by their very nature offensive. Whether they are printed, pop up on computer screens or play out on radio or TV, they are irritating invasions on private space that seek to bully and bombard people with pernicious consumerist messages.

Bear in mind that this is clearly the benchmark this guy is using for adverts: they’re offensive by default.  So to write a whole article on why the atheit bus campaign is so evil, he must really hate it.  And he does:

But what if the ideology urged by the advert really, really offends you? What if it challenges the core beliefs that fundamentally form the way you live?

Can you guess who’s about to magically become offended by a viewpoint expressed on the side of a bus?  A viewpoint, incidentally, that does not incite and does not accuse.  It does not express the view that people who disagree with the sentiment of the advert are evil, or that people who disagree should be punished.  It simply promotes the view that, “There probably is no god”.  Simple.

I can understand this guys confusion though:

With their marketing scheme, the Atheist Bus Campaign sought not to sell a product, but a particular point of view

I’m guessing that James hasn’t lived through many local or national government elections. But then James starts getting weird:

[There's probably no God] Is a pretty bold statement to make. Though it stops short of saying “God does not exist,” the idea put forward is that there is no cosmic entity overseeing the universe. But how can you know?

Erm, James, it says, “There’s probably no God”.  Perhaps you should have spent more time reading it than being offended by it.

Maybe a divine being does have a role in such issues, and that comes down to your own personal beliefs and how you think the universe works. Personally, I very much believe that there are “paranormal” beings beyond our mundane human order out there and I reckon that there are spiritual energies and forces at work around us. As such, as someone who believes that godly beings exist, I’m definitely affronted by the Atheist Bus Campaign.

So James believes that there are paranormal beings beyond our mundane human order (whatever the fuck that’s supposed to mean), but is strangely affronted by the Atheist Bus Campaign?  James, you’re views are weird.  They make no sense.  Yet strangely, I can read them without being offended.  I fundamentally disagree with you – and, incidentally, would like to see the proof you demand from the atheist with respect to your beliefs – but I am not affronted by having seen them.  Why do people with weird beliefs have such difficulty making this distinction?

In fact, I’d go so far as to say that the advert isn’t nice at all and is, in fact, a pretty damn nasty bit of text

James thinks this is nasty? I wonder what evidence he’s going to produce to make the association that, “There’s probably no God, now stop worrying and enjoy life” is nasty.  That’s one hell of an accusation, James.

The average commuter could be plunged into an existential crisis and find themselves contemplating life much more than they intended to on their Monday morning journey to work.

OMFG! It’s going to cause and existential CRISIS. EVERYBODY PANIC!!!!111 one!1.

James, of course, places himself above “Joe the commuter” of course, and doesn’t experience this existential crisis: he simply goes straight to “offended”. Do not pass god, do not collect £200.

For those that believe in God or, indeed gods, the advert is even more of a kick to the psyche. It sticks out as a personal insult to those who pay reverence to a deity and dutifully follow a spiritual schema by basically saying: “You are wrong”.

OMFG! Someone is wrong on teh religions. (sorry).  EXISTENTIAL CRISIS!!!

it’s actually a noxious sermon that seeks to stigmatise a significant section of society. The campaign is preaching prejudice rather than peace of mind.

James, have you been following the teachings of the various religions lately?  Do you really want to get into the whole “my sermon is more obnoxious than your sermon” debate?  Seriously. Don’t go there.  You can’t win.  Unless, of course, you actually meant to use the word “noxious”.  In which case this could get real messy real quick.

At a gut level, religion is once again represented as a bloody great bugbear that brings hatred and malice; the preserve of superstitious simpletons, delusional traditionalists andfundamentalist loonies.

What did that sign say again, James?  “There probably is no God, now stop worrying and get on with your life”.  Did it mention religion?

Religion can do remarkable things – and has done so repeatedly. To simplistically state that “Religion is evil” is like saying “Fire gives people third-degree burns.”

James, once again who is making these accusations?  The Atheist Bus Campaign didn’t.  You are the only person in your article making these associations.  Perhaps that says more about your own attitude to the gods and religion than it does about the atheist.


So this is what poverty must be like

February 11, 2009

Just in case you thought the banking crisis wasn’t bad enough, maybe you should spare a moment for these poor folks who are facing imminent abject poverty.  Bankers:

Five hundred thousand dollars — the amount President Obama wants to set as the top pay for banking executives whose firms accept government bailout money — seems like a lot, and it is a lot. To many people in many places, it is a princely sum to live on. But in the neighborhoods of New York City and its suburban enclaves where successful bankers live, half a million a year can go very fast.

Aww shucks, that sounds bad.  But wait, it’s worse!

As hard as it is to believe, bankers who are living on the Upper East Side making $2 or $3 million a year have set up a life for themselves in which they are also at zero at the end of the year with credit cards and mortgage bills that are inescapable

Which probably explains why the economy in America and the UK has tanked.  If you can’t balance a $2-3 million annual salary – plus bonuses, don’t forget the cash bonuses – I don’t think you’re in any position to run a bank.


This is really stupid

January 7, 2009

Only read if you have a strong head for irony:

http://post-darwinist.blogspot.com/2009/01/year-of-darwin-dawns-loud-and.html


Spot the BNP supporters.

November 19, 2008

Everyone and their mother now knows that the list of BNP supporters has been unleashed upon the internets.  It’s amusing reading, but not as amusing as what appears to be people who are clearly – and absolutely not – BNP supporters descending upon the IT forums:

http://www.theregister.co.uk/2008/11/19/bnp_members_trouble/comments/

 

Schadenfreuder.


nOOb!

November 18, 2008

The Reverend Evan Cockshaw: nOOb!


Here’s something strange…

October 29, 2008

I learned something today that I hadn’t realised before.  Now that I know it, it is both blindingly obvious, and remarkably funny.

Whenever I browse through the Reference section on the “App Store” section of Apple’s iTunes, I’m often curious as to how there can be so many different bible applications, and I was astonished at how much some people are charging for them.  Out of pure idle curiosity, I clicked on one that happened to be free, and read this rather amusing comment in the application’s description:

NIV, ESV, NKJV, etc. are copyrighted texts.  I cannot afford to pay the royalties.

The bible is copyrighted, and subject to royalty payments!  God, apparently, doesn’t believe in Open Source…


Sick F*ck

October 22, 2008

I’m seeing a little too much of this in the American election for my comfort:

And that twisted individual is not alone. Calls of “terrorist”, “traitor” and “kill him” have become far to common in the American election; all of it – naturally – directed against Obama. Congratulations McCain, by falsely accusing Obama of being a friend to terrorists, you’ve given comfort to the most obnoxious and un-hinged segments of the American public. Your mum must be real proud.


Great Scott!

August 13, 2008

Noooo!  They’re remaking The Rocky Horror Show!

I love The Rocky Horror Show!  Given the state of remakes from Hollywood recently, I can’t see this as a good thing.  Although I’ll probably end up watching it anyway :)  I wonder who they’ll have playing Janet! Dr. Scott! Brad! Rocky!


Dagnamit!

April 7, 2008

I’m clearly not swearing enough:

The Blog-O-Cuss Meter - Do you cuss a lot in your blog or website?
Created by OnePlusYou