Apply today for a FREE subscription to CIO Magazine!
Mon, Jan 5, 2009 17:31 EST

|
Posted by: Esther Schindler in Best Practices Topic: DevelopmentBlog: Developer Wisdom
Current Rating: |
On December 31, all the 30GB Zune models turned into bricks because of a Leap Year firmware coding error. This quality assurance and testing debacle demonstrates three lessons every software developer should take to heart.
On the last day of 2008, every one of an older model of the Microsoft Zune MP3 player (the ones with 30GB of storage) locked up. The devices were back in operation again a day later, and Microsoft explained the cause of the trouble:
"A bug in the internal clock driver related to the way the device handles a leap year. The issue should be resolved over the next 24 hours as the time change moves to January 1, 2009. We expect the internal clock on the Zune 30GB devices will automatically reset tomorrow (noon, GMT)."
With that data, Zune and technical users have some idea of what happened in the "Z2K9" incident. Microsoft's Scott Hanselman wrote a very good technical analysis for programmers about the dangers of such edge cases, and apparently he's not the only one to cover the bug. (My thanks to Indrajit Chakrabarty for the pointer.)
However, aside from "how not to write code like that," there are three important things for developers and software QA professionals—and their managers—to take away from the experience.
It's great that the technical problem was so easily addressed ("wait a day"), but it's one heck of an embarrassment for Microsoft. I'm not talking about their PR issues per se, though Microsoft is still trying to live down the Red Ring of Death debacle with its XBox. However, Microsoft has a long history of, shall we say, a less-than-stellar reputation for quality, and they did not do themselves any favors with this incident. I feel especially sorry for the authors of the new book, How We Test Software at Microsoft (cue: pointing and giggling) and the many smart people I have met from the company. (They have great people. Really. Some of the smartest techies I've met. But somehow Microsoft doesn't seem to create a culture that demands quality.)
But the bottom line is that this problem was entirely preventable. As a London-based web developer pointed out to me, "Edge conditions such as year transitions on leap years really ought to be tested as a matter of course, and shouldn't be that difficult to do on devices where you can adjust the clock." The date problem really should have been spotted before it was checked in, he says; any sort of code review probably would have spotted the infinite loop possibility. So why wasn't it done? Why wasn't it caught?
I do understand the notion of "ship on time," and that some things get lost in the eternal desire to make a production date. Quality assurance testing is not the only victim. But this is a well-defined problem set with pretty darned obvious unit tests. (I won't be surprised if I get e-mail messages from QA Tools companies telling me that their products include such tests as a matter of course. Just post a response to this post, folks. In this context, it's fine.)
We all make mistakes. But the purpose of software engineering is to catch and fix errors before the product is released.
For further contemplation: Would your company's software development process have caught an error like this?
I agree this is an epic fail. Stupid even. Epically stupid. And more stupidly, inevitable. Having worked in the embedded systems milieu for many years, I'm not surprised. I see stupid stuff almost everyday. I don't want to, but it's embedded in the development geography.
For consumer devices, everything is a compromise. Limited specs, but creeping features. Limited hardware and firmware development cycles, even more limited test cycles and usually supported by primitive and often buggy tools. This is keenly balanced by unlimited marketing pressure to release a beta beast in production skin.
So, Microsoft got caught with a really stupid one. Not the first. Not the last. Embedded systems devel model isn't broken. No one has had the time to fix it enough. We're too busy re-inventing code-wheels that were perfected 20 years ago, but can't run on our current platform or the licensing cost won't fit our BOM or aren't shiny enough to fit our new shiny methodology. Oh, well, when you're building tomorrow's obsolete gadget, there's no point dwelling on the past.
It happens with Microsoft Also. then stupidity comes :) I hope small companies are more Awareness with their products
The assumption is made here that the programmer thought it was tested thoroughly enough... which we don't know.
It's funny how you go bash Microsoft for such an apparent error on their part when you have no idea what you're talking about. The issue was caused by a third party OEM chip driver for the internal clock. The same one used in the Toshiba Gigabeat S Series, which, in fact, had the same exact freezing/clock issue the Zune did (since Toshiba made the first Gen Zunes for MS). But I hear no mention of Gigabeats freezing or a 'GigaGate'!. You blatantly bash Zune but give no mention of other devices effected by the same erroneous code. (find out more here -> http://www.zuneboards.com/forums/zune-news/38143-cause-zune-30-leapyear-problem-isolated-4.html#post351116 )
It's because of supposed journalists such as yourself jumping on the bandwagon of MS hate and trying to pass your opinion off as truth, when MS really had nothing to do with this issue. Next time, get your facts straight before you go blasting something you have no clue about.
Thanks for wasting my time on that...
The fact that they work for Microsoft is irrelevant. I don't care where the developer worked. I only care that something this dumb was written and failed in the software development process.
And my comment about Microsoft lowering user expectations is less about the Zune than it's about the willingness of people to excuse the error as unimportant.