narfblat Posted January 3, 2009 Share Posted January 3, 2009 That's what I thought at first too, but no, > is right; days represents the current day of the year. The actual problem is the while loop used at line 259. On a leap year, it gets stuck in the loop on day 366 - it satisfys the condition to run the loop, but doesn't change anything to make the loop end. Even when it became January 1st, the day in the program didn't become 367 because it was stuck in the loop. Once you force it to restart, and the day is 367 or more to the program, it can finally subtract 366 from the year, and run as normal. I can understand why the used a while loop, so if multiple years have passed it can subract them all at once; however, their logic is very flawed. Another issue: What would happen when it passes multiple years at once, without checking which are leap years? If the year it was on when it started the loop was a leap year, it would treat all as leap years; normal year when it starts would treat all as normal years. Link to comment Share on other sites More sharing options...
Pho3nix Posted January 3, 2009 Share Posted January 3, 2009 iPod touch > all. Link to comment Share on other sites More sharing options...
EnderWiggin Posted January 3, 2009 Share Posted January 3, 2009 That's what I thought at first too, but no, > is right; days represents the current day of the year. The actual problem is the while loop used at line 259. On a leap year, it gets stuck in the loop on day 366 - it satisfys the condition to run the loop, but doesn't change anything to make the loop end. Even when it became January 1st, the day in the program didn't become 367 because it was stuck in the loop. Once you force it to restart, and the day is 367 or more to the program, it can finally subtract 366 from the year, and run as normal. I can understand why the used a while loop, so if multiple years have passed it can subract them all at once; however, their logic is very flawed. Another issue: What would happen when it passes multiple years at once, without checking which are leap years? If the year it was on when it started the loop was a leap year, it would treat all as leap years; normal year when it starts would treat all as normal years. ie: ****ing microsoft programmers suck major penis. _EW_ Link to comment Share on other sites More sharing options...
MrWally Posted January 3, 2009 Author Share Posted January 3, 2009 I'd agree, except that it says at the top that the coding was done by Freescale Semiconductor Inc. programmers, not Microsoft. :/ Link to comment Share on other sites More sharing options...
RoxStar Posted January 3, 2009 Share Posted January 3, 2009 I'd agree, except that it says at the top that the coding was done by Freescale Semiconductor Inc. programmers, not Microsoft. :/ Toshiba made the original Zunes. Microsoft made all the rest. 2009 looks like a crazy year. Windows 7 is good... The Zune 30 bug wasn't MS's fault 360 has solid games and less red ring Link to comment Share on other sites More sharing options...
Darth Groovy Posted January 4, 2009 Share Posted January 4, 2009 Either way, it is fixed now, so I don't have to exchange it. Good thing, I might have got in trouble because I bought it at work, and no longer have the receipt. Even if I did, it is long past the return policy. The sad thing is, that I have had the same damn two Zunes sitting in my store for the past 3 years. Point is, I WOULD have used my Zune extensively on New Years eve. I had a doctor's appointment to see if I can get the alien implant removed from my brain. Also had to go to Sam's and the grocery store for some party food. I like to put the head phones on to block out all the damn noise. Link to comment Share on other sites More sharing options...
Rogue15 Posted January 5, 2009 Share Posted January 5, 2009 I like to put the head phones on to block out all the damn noise. you mean...the voices? Link to comment Share on other sites More sharing options...
Darth Groovy Posted January 5, 2009 Share Posted January 5, 2009 you mean...the voices? Yes. Link to comment Share on other sites More sharing options...
Alegis Posted January 8, 2009 Share Posted January 8, 2009 I would assume the correct line would be: 267 if (days = 366)[/COde] [Code]267 if (days [b][color="Red"]==[/color][/b] 366)[/COde] Link to comment Share on other sites More sharing options...
narfblat Posted January 9, 2009 Share Posted January 9, 2009 267 if (days [b][color="Red"]==[/color][/b] 366)[/COde] the compiler would catch that. But, as I said, that's not the problem anyway. Going back to what I was saying was wrong with the code, I think the simplest total fix would be to change the "while" to an if, and if multiple years have passed since it was last on, the zune must be reset that many times.(Maybe add a "reset" option in the code, as the battery-drain reset would be very annoying to do 5 times) Link to comment Share on other sites More sharing options...
Kain Posted January 10, 2009 Share Posted January 10, 2009 Problem - iPod rules, Zune=mook. Link to comment Share on other sites More sharing options...
EnderWiggin Posted January 10, 2009 Share Posted January 10, 2009 267 if (days [b][color="Red"]==[/color][/b] 366)[/COde] same difference XD _EW_ Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted January 10, 2009 Share Posted January 10, 2009 the compiler would catch that. gcc didn't #include <stdio.h> main() { int days = 365; if(days = 366) { printf("%i\n", days); } } compiles with no errors or warnings and prints 366 and a newline value == variable supremacy despite the fact i've never gotten myself into the habit of using it Link to comment Share on other sites More sharing options...
EnderWiggin Posted January 10, 2009 Share Posted January 10, 2009 gcc didn't #include <stdio.h> main() { int days = 365; if(days = 366) { printf("%i\n", days); } } compiles with no errors or warnings and prints 366 and a newline value == variable supremacy despite the fact i've never gotten myself into the habit of using it oh wow then i guess i was wrong. _EW_ Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted January 10, 2009 Share Posted January 10, 2009 oh wow then i guess i was wrong. _EW_ c supremacy maybe you should head on back to javatown babby Link to comment Share on other sites More sharing options...
Jeff Posted January 10, 2009 Share Posted January 10, 2009 c supremacy maybe you should head on back to javatown babby I'm stuck in javatown. Link to comment Share on other sites More sharing options...
Alegis Posted January 13, 2009 Share Posted January 13, 2009 same difference XD the compiler would catch that. No. Days will be assigned to 366 AND will evaluate to true. You shouldn't have even run gcc to verify this. I suggest you go over the basics again to ensure you didn't skip something else. Silly mistakes like these can be too painful (hello zune). Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted January 13, 2009 Share Posted January 13, 2009 using gcc settled the issue though :/ it's certainly more solid than "WELL MY CS 101 PROFESSOR SAID SO" Link to comment Share on other sites More sharing options...
Darth Groovy Posted February 14, 2009 Share Posted February 14, 2009 Anybody had trouble syncing zune to the pc lately? Usually when I plug my zune into the sync cable, and plug the cable into a usb slot on my pc, the zune software browser starts and my zune automatically syncs. Starting yesterday morning, I can't even get the software to recognize that the device is even plugged in. It will still charge, but I cannot seem to get it to sync. The only thing I have not tried yet is re-installing the Zune software. Only reason I posted this, is that just recently all the zunes were recalled in my store, and recently all the zunes at wal-mart were marked down. Would they just shut down a service like this completely without some sort of formal notice? Edit: Software re-install fixes the problem if this happens to anybody else. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.