Leap Day is a Big Hack

Our Earth makes a complete revolution around the sun every 31,556,956 seconds. This means a year is truly 365 days, 5 hours, 49 minutes and 16 seconds. However, the average of the true solar day is 86,400 seconds, or 24 hours. The length of the solar day also has variation depending on the orbital motion of the Earth, but the average is 86,400 seconds. When you do the math and divide 31,556,969 by 86,400, you end up with some left over time, which is what causes Leap Year. Leap Year was created to maintain our seasonal calendar and prevent seasons from drifting, for example, Winter in July. Leap Year takes the remainder 5 hours, 49 minutes and 16 seconds, rounds it to 6 hours, accumulates it, and every 4 years, the 24 hours of accumulated time is tacked onto the end of February, Leap Day, Feb 29th.

Now if you were paying attention, you caught that we cheated a little and we rounded the 5 hours, 49 minutes and 16 seconds up to 6 hours. What happens to the leftover 10 minutes and 44 seconds?

Leap Year Misunderstood

A common misconception is that Leap Year occurs every 4 years. For most of us reading this, we can go on believing that Leap Year occurs every 4 years because that’s how we’ll see it for the rest of our lives. However, for those that make it to 2100, you won’t see a Leap Year in 2100, even though 2100 is divisible by 4. Why? Every 134 years, the left over 10 minutes 44 seconds accumulates into a full day. To account for that, only years that are divisible by 4 and not divisible by 100 is a Leap Year. 2100 will not be a Leap Year.

If you look back at the 2000 calendar, there was a February 29th. Two thousand is divisible 4 and 100, therefore it shouldn’t have been a Leap Year. What’s going on? Well, we have another math problem. Every 134 years that leftover time makes a full day, but we compensate every 100 years, so we end up with a 34 year deficit that gets handled by another rule. This rule states that if the year is divisible by 4 and 400, ignore the previous rule and add a Leap Day. Now if you are still tracking with me, you may be thinking that this math doesn’t solve the problem and there still seems to be some time left over after all of those hacks and adjustments. If you are thinking this, you are correct.

The purpose of Leap Year is to keep seasons lined up with our calendar. Keeping the vernal equinox on or close to March 21st is the objective. This Superman III, Salami Slicing means that in 8,000 years, the calendar will be one day behind. There have been suggestions to help with this too. Some think that by the time this occurs, the length of the vernal equinox will have changed. Unfortunately, the Cone of Uncertainty is at play and this far out the change to the vernal equinox cannot be accurately predicted. As a result, the current series of Leap Day hacks will have to do. Others like John Herschel have suggested that we need another hack in the algorithm that would make the year 4000 a non-Leap Year. Who knows what this will look like by year 4000. By then I will long be forgotten, the Earth might not even exist and this Leap Year hack won’t concern me. However, if you’re a software developer like me, here’s a chunk of C# code to help you determine if a given year is a Leap Year.

bool IsLeapYear(int year)
   return (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0));

All of that Leap Day history is interesting and it’s interesting to know that something as central as our calendar has a big hack like Leap Day. But I now have a practical Leap Day question for you and it’s likely more important than this useless trivia.

What do you have planned for Leap Day 2012?

Leap Day 2012 is shaping up to be a day of announcements and product releases from Microsoft. My plan for Leap Day includes downloading and installing the Windows 8 Consumer Preview, Visual Studio 11 Beta, taking a certification exam, tuning in to hear announcements from Mobile World Congress and following the MVP Summit 2012 buzz on twitter. The following is the list of the Leap Day 2012 items that I’ll be paying attention to with links for more information and downloads.

Mobile World Congress – Windows 8 & Windows Phone Announcements

Windows 8 Consumer Preview

Visual Studio 11 Beta

MVP Summit 2012

What’s on your list for Leap Day 2012?

ALM for Agile Comes to Madison, WI

The Agile experts at Centare, in partnership with Microsoft, are bringing a day of Agile Application Lifecycle Management (ALM) to you in Madison, WI. The tour that started in the Fall last year, with Chicago, IL, Milwaukee, WI and Indianapolis, IN is now coming to Madison, WI on January 25th.

If you would like to learn how to drive your business forward with Agile Application Lifecycle Management, check out this FREE day of learning. Centare’s experts will dive into the basics of Scrum, emergent architecture, Agile testing and the Microsoft ALM tools including Visual Studio 2010 Ultimate, Team Foundation Server and Test Manager.

Register for the January 25th event in Madison, WI.

Coded UI Presentation from Chicago Code Camp

If you attended my Chicago Code Camp session on Saturday, thank you and I hope you got value from it! I want to take a moment to thank the organizers of this event. Without these community leaders, we wouldn’t have been able to enjoy such a great code camp. Thank you Michael D. Hall, Scott Seely, Jean Seely, Sergio Pereira, Tim Stall and Clark Sell, not just for Chicago Code Camp, but everything that you do for our community.

I also want to thank Angela Dugan. Angela is our Microsoft Developer Tools Evangelist for Illinois, Wisconsin, and Indiana. If you got a book or shirt from my session, please thank Angela, she provided all of those goodies.

If you would like my slide deck, you can get it on my SkyDrive.

One of the questions asked, that I answered with 99% accuracy but wanted to confirm, was “Can I record UI actions with Firefox, or is it just playback?”. It is just playback and you must record using Internet Explorer. For more details, check out this documentation on MSDN. http://msdn.microsoft.com/en-us/library/gg269475.aspx

Also, we discussed the VS 2010 and TFS VHD for exploring these tools. Microsoft has provided a VHD for each Microsoft virtualization technology and can be downloaded from the following links.

One of the books that I gave away, “Software Testing with Visual Studio 2010”, is a great little book that has broad coverage of the Visual Studio 2010 testing tools and I highly recommend reading it.

Thank you again. If you have any other questions, feel free to comment or reach out to me.

Speaking about Coded UI Tests at Chicago Code Camp

We are just days away from this year’s Chicago Code Camp and it is shaping up to be an outstanding event. Chicago Code Camp is an entire day of FREE sessions for developers of all walks, including C#, Java, F#, SmallTalk, Clojure and more. If you are a developer in the Chicago-Milwaukee area, you should set aside this Saturday, May 14th to attend Chicago Code Camp.

I will be presenting “Testing the User Interface: Coded UI Tests with Visual Studio 2010” and expect this session to be educational and interactive. In an attempt to make this session as valuable and targeted as possible, I’ve setup a UserVoice forum where you can suggest and vote on the content presented. I’ve seeded the forum with the topics that I have envisioned, but I’m sure there are other great ideas I haven’t considered. If you are planning to attend, please visit http://ericdboyd.uservoice.com to suggest and vote on the topics you would like to see.

There is an amazing lineup of speakers and sessions for Chicago Code Camp 2011, and you can get a complete listing with the schedule at http://chicagocodecamp.com. If you are planning to attend and you haven’t yet registered, please do so at http://chicagocodecamp.eventbrite.com. It is a completely FREE event, but event logistics are a lot easier when you know how many people are attending.

The organizers of this event have spent a great deal of time making this a world-class code camp, so please thank them when you see them. I would like to extend a special thank you to Michael D. Hall, Scott Seely and Clark Sell for all of the work they have done to make this event great.

Microsoft embraces OS X, Linux and Unix developers

Typically when developers think of Microsoft development, Visual Studio, the .NET Framework and Visual C++ come to mind. Rarely is Mac OS X, Linux, Solaris, AIX, HP-UX or Eclipse a thought. However, over the past year Microsoft has embraced these OS’s and the Eclipse IDE with a new product called Team Explorer Everywhere. Team Explorer Everywhere 2010, or TEE, is a new Microsoft product that came out of the Teamprise acquisition that occurred in November, 2009. TEE makes it possible for developers using non-Microsoft OS’s and IDE’s to collaborate and take advantage of the great application lifecycle management tooling provided by Team Foundation Server.

Now, as a Java developer running Eclipse on OS X, you can make use of TFS just like the .NET developers using Visual Studio. You can manage projects, tasks , version control and builds using Ant and Maven. Even if your development is split between technology stacks like Microsoft, Unix and Java, you can now collaborate, share assets and get a combined view of the project across the teams who were previously disconnected.

Team Explorer Everywhere 2010 provides:

You can get more information about Team Explorer Everywhere 2010 at

Whether you are new to TEE or have been using since it was Teamprise, this week you will have the rare opportunity to meet and hear from Ed Thomson, one of the engineers who created the product.

Ed will be touring the Midwest and presenting:

Collaborate Across Platforms without Compromise
Save time and add value to your development team process

During his talk, he’ll examine how the non-windows platform support provided through Visual Studio Team Explorer Everywhere 2010 enables development teams to easily collaborate across platforms. It provides the tools and plug-ins you need to access Visual Studio Team Foundation Server 2010 from within Eclipse-based environments, so everyone can work together to achieve business goals.

Key Discussion Points:

  • The current state of Team Foundation Server tools for non-windows development
  • Feature parity of Eclipse and Team Foundation Server
  • Discussions on the direction of Team Explorer Everywhere
  • Eclipse and tools for TFS for non .NET developers

Speaker Bio

Edward Thomson is a software development engineer for Microsoft Visual Studio Team Explorer Everywhere on the Team Foundation Server team. He develops the Team Foundation Server plug-in for Eclipse to provide Java developers and cross-platform users first-class access to the integrated Application Lifecycle Management functionality of TFS. Before joining Microsoft, Edward spent a decade developing version control and work item tracking tools for the Microsoft platform as well as for cross-platform users.

Ed will be visiting the following cities and they are filling up fast. If you want to hear from the Microsoft product team about cross-platform development using TFS, you should register now.

Austin, TX
Monday, April 4th @ 11:30AM to 1PM
TFS Austin User Group

Chicago, IL
Thursday, April 7th @ 2PM to 4:30PM

Thursday, April 7th @ 6:30PM to 8:30PM
Chicago ALM User Group

Milwaukee, WI
Friday, April 8th @ 9AM to 11:30AM