January 27, 2009 – 10:15 am
This shouldn’t really be news to anyone, but a study has revealed that UK kebabs have ‘shocking’ amounts of salt, fat, and calories:
The worst doners inspectors came across contained 1,990 calories before salad and sauces – over 95%
of a women’s recommended daily calories – 346% of a women’s saturated fat intake and 277 per cent of
an adult’s daily salt intake.
January 23, 2009 – 12:47 pm
Stanford University’s iPhone course has finished, and the resources for the course have been posted online. Included are the lecture slides as PDFs and code examples.
They’re probably not much use to experienced iPhone developers but might be a good starting point for anyone new to Cocoa and Objective-C.
January 20, 2009 – 2:35 pm
January 18, 2009 – 4:26 pm
As the plane was on fire, some prayed, while others did what you were supposed to do: read the emergency instruction about how to open the door:
Some passengers screamed, others tucked their heads between their knees, and
several prayed over and over: “Lord, forgive me for my sins.” But a man named Josh
who was sitting in the exit row did exactly what everyone is supposed to do but few
ever do: he pulled out the safety card and read the instructions on how to open the
exit door.
Which do you think was more useful?
January 15, 2009 – 2:33 pm
January 8, 2009 – 9:18 am
The BBC have collected a Best of Bushisms list. My favourite is probably still:
There’s an old saying in Tennessee – I know it’s in Texas, probably in Tennessee – that says,
fool me once, shame on… shame on you. Fool me – you can’t get fooled again.
You can watch him make this speech too on YouTube.
January 1, 2009 – 3:19 pm
Someone on Zuneboards has found the actual snippet of code that’s causing the recent Zune crashes:
year = ORIGINYEAR; /* = 1980 */
while (days > 365)
{
if (IsLeapYear(year))
{
if (days > 366)
{
days -= 366;
year += 1;
}
}
else
{
days -= 365;
year += 1;
}
}
The Zune stores the current date by keeping a track of the number of days since ‘ORIGINYEAR’. The loop works out the current year by subtracting 365 or 366 from the days counter and adding one to ORIGINYEAR.
The problem is with the conditional if (days > 366), which means if the current year is a leap year, the loop will never finish as days is always 366 and will never be subtracted. What it’s meant to do is if (days >= 366), although with the conditional above of if (IsLeapYear(year)) it’s not necessary at all.
This means that unless Microsoft fix this bug, it will recur at the last day of every leap year.