Manuals and instructions for everything

why do programmers confuse halloween and christmas

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 youd like to know why its so damned funny, and learn a little computing basics for good measure, read on! If youre 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 Id like to explain, these are exactly the same thing. To see why, lets 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 its the kind of thing were 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 thats all there is to it. Its so ingrained that its 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 youre 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 thats 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. Its 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 thats not a truly satisfying answer; the obvious question is why would anybody want to do that? Whats the point?


If 10 is ten, then why would anyone find any use in 10 being eight? We all have ten fingers, its easy to count in tens, so why change things and count in eights? The answer lies in how computers store numbers. Computers, you see, dont count in tens. Computers count in on and off. Welcome to! Guidelines and Information Offensive jokes are fine as long as they are still jokes. We do make exceptions for extremely offensive jokes. Keep the comment section civil and light hearted. Personal attacks will not be tolerated. If you want to be a dick, go to Jokes must be in text format, no linking allowed. (YouTube, Imgur, etc) Reposts will be removed at our discretion. If you post a NSFW image/link in the comments, it must be tagged as NSFW (Nudity/gross images) or NSFL (Gore/extremely disturbing images, and only if relevant to the conversation) These are jokes. Some of them are old, and as such reflect the tone of the times. Some of them are new, and just as offensive. Unless it s spam, it stays. If you find certain comments or submissions here offensive, the best way to address it is with more speech.

  • Views: 24

why do we use e g for example
why do we abbreviate pounds as lbs
why do we open presents on christmas
why do we need to study programming language
why do we abbreviate pounds as lbs
why do we use am and pm
wi is the abbreviation for what state