Happy Programmer’s Day!
Posted by Johan Cyprich on 13 Sep 2007 | Tagged as: General
// Compile with Visual C# 2005.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace HappyProgrammersDay
{
class Program
{
static void Main (string [] args)
{
DateTime dtNow = DateTime.Now;
Calendar calDay = CultureInfo.InvariantCulture.Calendar;
if (calDay.GetDayOfYear (dtNow) == 256)
Console.WriteLine ("Happy Programmer's Day!");
}
}
}
Today is Programmer’s Day. This is the 256th day of the year which usually turns out to be September 13, but on leap years its the 12th day. The number 256 is used because if you fill a byte with 1′s, i.e. 1111 1111, the value of it is 256. Aren’t we programmers clever?
The traditions to this day are, according to Wikipedia, “behaving silly, coding silly programs, mini computer games, playing with old computers, etc.”. This isn’t an official statutory holiday, but I think if enough people contact their local political representative, we can make it one.
| Related posts: | |
|
|
Share this post:
Follow Me:
Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.
No Comments »
Tweet This Post!
















Loading...