While programmers don't actually think October 31 and December 25 are the same day, this is the punchline of a joke relating to Octal 31 and Decimal 25. There are numerous other "programmer jokes," many of which involve numbers and wordplay.
In programming, octals and decimals are numbering systems that have different bases. A decimal has 10 bases, while an octal has 8. As such, Octal 31 and Decimal 25 have the same value. Because these values are abbreviated as Oct 31 and Dec 25, programmers often joke that they get Halloween, which is on October 31, and Christmas, which is on December 25, mixed up.
As a math equation, Octal 31 is represented as 3 x 81 + 1 x 80. This equals 24 + 1, which is 25. In the decimal system, it would be written as Dec 25.
Octal became widely used in early computers because it works perfectly in systems that use 12-bit, 24-bit or 36-bit words. There are three binary digits for each octal, and 12, 24 and 36 are all divisible by 3.
Decimal systems, on the other hand, are the most commonly used numbering systems in modern civilizations and have roots in early mathematics of ancient China, India and the Middle East.