PDA

View Full Version : I can't help but laugh



Caged Anger
01-01-2009, 12:32 AM
As if the Zune wasn't getting enough bad press, now this hits:

http://forums.zune.net/412486/ShowPost.aspx

It would seem that Zune PMPs all around the world are commiting mass suicide to the dismay and horror of their owners. At least that was thought to originally be the case, news from Microsoft is that as soon as the new year rolls in they should be back up and operational. Something to do with the time driver...ah Microsoft, 2008 just won't end for you will it? :rolleyes:

Suicidal
01-01-2009, 01:27 AM
Their clocks actually count backwards from the end of time...

EXEcution
01-01-2009, 04:35 AM
The way computers handle time is actually a bit tricky so this really shouldn't come as too much of a shocker. However, by now these engineering teams need to figure out an algorithm that will compensate for any anomalies including leap-years.

This is only a temporary issue much like Xbox Live experiences some downtime or a security hole is found in Windows. From what I've seen and experiences the Zune is a great device, but it simply doesn't do enough to steal Apple's massive appeal.

It's only a matter of time before Apple screws up and loses some market share because of a simple bug or two.

JIMINATOR
01-01-2009, 04:44 AM
leap years are easy in computerese, the logic is something like its a leap year if you can divide it by 4 but not if it is a century unless it is a 4th century. This year we also get a leap second. might be a possible cause. anyway it is another pie in bill's face.

Death Engineer
01-01-2009, 07:30 PM
$80 total or $80 each? If total, that was a heck of a deal! Reports say that everyone's zunes are working again today.

OUTLAWS Tip
01-01-2009, 08:47 PM
I have the 30 gig one with the problem. I turned it on last night and it froze. Today it had the Battery icon on the screen. I recharged it today and it is totally back to normal.
:D

Sirc
01-02-2009, 02:51 AM
I still have my trusty 8-track. It doesn't care what year it is, and the Eagles still rock. So there.

EXEcution
01-02-2009, 09:49 PM
If anyone is curious here's the code that caused the error.


BOOL ConvertDays(UINT32 days, SYSTEMTIME* lpTime)
{
int dayofweek, month, year;
UINT8 *month_tab;

//Calculate current day of the week
dayofweek = GetDayOfWeek(days);

year = ORIGINYEAR;

while (days > 365)
{
if (IsLeapYear(year))
{
if (days > 366)
{
days -= 366;
year += 1;
}
}
else
{
days -= 365;
year += 1;
}
}
// Determine whether it is a leap year
month_tab = (UINT8 *)((IsLeapYear(year))? monthtable_leap : monthtable);

for (month=0; month<12; month++)
{
if (days <= month_tab[month])
break;
days -= month_tab[month];
}

month += 1;

lpTime->wDay = days;
lpTime->wDayOfWeek = dayofweek;
lpTime->wMonth = month;
lpTime->wYear = year;

return TRUE;
}


Anyone notice the error? It's in the first "if" statement.

Death Engineer
01-02-2009, 11:10 PM
Why does your Zune need to know what day/month/year it is anyways? How awful would it be if your MP3 player said that you copied files to it on a Thursday and somehow during a magical leap year it said it was copied on a Wed? Would that be the end of the world?? What if it suddenly said the files were copied in 1970. Would that keep it from playing the files?

I don't understand the date/time being related to bootup unless there's some kind of "shutdown at such-and-such" date coded somewhere in there (scary!). Otherwise, this is just really really lazy non-defensive coding. Unit testing on such code should be mandatory.

JIMINATOR
01-03-2009, 02:32 AM
infinite loop r us....

well, my guess is that there is some sort of apps menu, and one of the apps is a clock, and another is a calendar, therefore the need to keep them updated.

Grimmy
01-03-2009, 05:37 AM
My ipod touch is still working great :P

OUTLAWS Tip
01-03-2009, 06:22 AM
My ipod touch is still working great :P

But did you get it for free like my Zune.
:P

EXEcution
01-04-2009, 06:06 AM
infinite loop r us....

well, my guess is that there is some sort of apps menu, and one of the apps is a clock, and another is a calendar, therefore the need to keep them updated.

Exactly. Again it's simply a matter of lousy coding but I'm surprised there was no error handling exception somewhere in the code (I did not read through all 1000+ lines mind you) to prevent a small thing like that from pissing off all those Zune owners and making near-headline news.

JIMINATOR
01-04-2009, 06:36 AM
eh, in the problem segment the values for comparison are different. some types of error handling is obvious, others are not. anyway if they had unit tested the leap year condition they would have seen the problem. what's more likely is that they copied all the date/time code from some library, assuming it was correct. it sucks when these things happen, and they are obvious after the fact, but the reality is that the zune probably uses 10 million lines of code and there are probably tons of bugs just waiting for some certain condition to trigger them. The same can be said for pretty much any code of any company.

Death Engineer
01-04-2009, 07:20 PM
Agreed on the multiple bugs lying dormant. Heaven knows that I continue to find bugs in my own code that have been there for years. However, our company is not Microsoft and our software budget is next to nothing compared to what they spend on the Zune alone, I'm sure.

The bottom line is that someone didn't do their job in testing that code.

JIMINATOR
01-04-2009, 08:34 PM
lol, not sure it is a budget issue there. software is one field where adding programmers can slow a project down. you would think the opposite but unless they are really good it takes a lot of resources to get a person to be able to contribute, and even then their contributions may be limited.

Death Engineer
01-04-2009, 09:43 PM
I'm not saying that throwing resources at it fixes the problem. What I am saying is that they should have had adequate resources to address the issue before it happened.