Monday, September 12, 2016

Happy Programmer Day!

The 256th day of the year is Programmer Day in Russia. Good idea for the rest of the world to follow.
Per Wikipedia, Programmer Day was first proposed by Valentin Balt and Michael Cherviakov back in 2002. It took until 2009 for the idea to catch on sufficiently that the Russian government recognized it officially. This year, 256 days falls on September 12. (That's because of the leap year...on non-leap years, it's September 13.)

Why the 256th day of the year? In programming, powers of 2 are very important numbers. 2^8 is 256, the largest power of two that's less than the number of days in year. It's especially important because 256 is also the number of values represented by a byte, one of the most basic units of memory in a computing environment.

The Programmer Day logo shows a full byte's worth of binary digits: "1111 1111". Those familiar with binary have probably noticed that's actually the value 255, not 256. That's because zero is also represented by a byte - "0000 0000" - giving a total of 256 values. This is called zero-based numbering and is used extensively in computer science. It's a common mistake for novice programmers to forget the zero value, so their total count ends up being off by one.

That logo could just have easily used hexadecimal (or "hex") as binary. Hex is a base-16 numbering system, using 0-9 and A-F as digits. It's often used as shorthand rather than writing out full binary values. The full byte value is "FF" in hex. Anyone who spends much time learning what's under the hood of computers will encounter hex sooner rather than later.

I don't do a lot of programming any more, but there were times in the past when it was pretty much my whole life. And I still dabble occasionally. I applaud the Russians for their official recognition of my fellow programmers!

No comments:

Post a Comment