Don't upgrade iOS if sync is not currently working..

I should have known not to upgrade to iOS 4 on my iPod Touch, but I did it anyway, and I took no precautions, like manually backing up my application data.

So the OS upgrade worked, and the app’s are all back (after a couple of reboots) but my data is all lost. Arrrg! (weight tracking, car fuel and high scores on card games)

So the errors I’m getting since upgrading to iTunes 9.2 are on sync I get three or four of these:

SyncServer has encountered a problem and needs to close.
SyncServer has encountered a problem and needs to close.

With these details:

SyncServer Crash B
SyncServer Crash B

Then after reporting all those, iTunes tells me it didn’t sync correctly, then I get a crash in the crash reporting tool, and another batch of 3-4 of the first error messages:

MDCrashReportTool crashing at 0x00b13dd9
MDCrashReportTool crashing at 0x00b13dd9

I’ve not found the a fix yet, but it’s quite frustrating.

So having all this rubbish happening I thought, oh I’ll upgrade the device in case that’s the problem. Wrong thinking..

iOS 4 seems neat, so far my only gripe is my music/podcasts pauses for a few seconds when the home button is push sometimes, or a minute or two after leaving the device alone (when is turns the screen off) which is not so impressive.

Update 14th July: It turned out to be my time zones were not the same. My PC was GMT -6 Central America not GMT -6 Central Time (US & Canada), and my iPod was set to Chicago. OMG I can’t believe it was something so simple and stupidly small. I found the answer in an Apple thread

GanttProject - Free Gantt Chart Tool

Wow, I feel like I’ve been living under a rock. Today after fighting Excel to plan my current project, I did the unthinkable, I googled for “free gantt chart“ (well I actually missed the second t, but that didn’t affect the results), and found GanttProject.

It’s Free, it works, yippie!

Now I just need to learn how to use it’s resource scheduler and see how far this program can be pushed.

WordPress 3.0

Wow, just upgraded to WordPress 3.0, and I’m really loving the new layout tools for the blog. I really like the header picture options, the menu’s, the new default theme.

It’s worth the upgrade!

EconTalk Podcast

For almost the last year I have been listening to the EconTalk podcast by Russ Roberts, and I think it’s been incredibly enlightening process.

So much so that I I’ve almost been banned from uttering phrases like: “today I was listen to a podcast” or “today I lent” at home. I really have been learning so many cool things, and thinking about issues from a new perspective.

I originally listened to the main podcast, and towards the end of that I discovered the archive podcasts for 2006, 2007, 2008 and 2009. This has been one of the main podcast I have listened to on my commute and lunch-time walks, it’s been magic.

Having started at the end and then going back to the begin of the series, it has been really interesting to see how the sytle and format of the show has changed, the introduction of the intro music, changes of email, etc.

Some of my favorite shows have been when Russ talks to Mike Munger as the interaction dynamics between the two is really energetic. Especially with Mike’s love of sarcasm, you really have to think about what he’s saying to workout when he’s joking. Also when Russ, just talks by himself for the hour, as he talks in very logical and balanced style, reviewing both sides of the argument.

On the flip side, when talking to people that fit the more traditional academic stereotype - that are not good talkers, that interrupt lots or use repetitive fillers, to keep control of the conversation - sometimes annoy me, as they are pushing the conversation to hard, and it feels less smooth flowing.

I also really appreciate Russ’s humbleness and openness to stating he doesn’t get something and willingness to ask question that sound simple.

I actually have 6 episodes not listen to, they are the Arnold Klein - The Theory of Moral Sentiments discussions, and that’s because I have purchased the book, and want to listen to each one after having read that section of the book.

Curse of the Azure Bonds – build 1.1.2 released

Version 1.1.2 of Curse of the Azure Bonds is now up on Google Code project (Windows/Mac OS X).

Changes in this version:

  • Issue 53, Casting Cloud Kill in combat crashed the game
  • Issue 49, Fixed crash related to loading monsters spell’s (random pre-combat crash)
  • Issue 48, Temple purchases set you money to the cost, not subtracting the cost from money
  • Issue 37, Magically killed foes, are not truly dead

Thanks to Manning for providing the first log of crashes.

As always any issues post here in the comments, email me directly (simeon.pilgrim@gmail.com), or post on the issue list.

Programming Challenges: 110206 Erdos Numbers

I had first tired the Erdos Numbers problem back in 2004, and at the time I was having some odd problems with wrong answers, so ended up submitting the problem 160 times, using while(true); blocks to find which Scenario was the problem.

When I picked up the problem this time I got rid of my fancy std::map c++ code like this:

bool relations_less_both = true;
struct relations_less : public binary_function < pair<string,string>, pair<string,string>, bool>
{
  bool operator()( const pair<string,string>& lhs, const pair<string,string>& rhs ) const
  {
    if( lhs.first < rhs.first )
    {
      return true;
    } else if ( relations_less_both &&
                lhs.first == rhs.first &&
                lhs.second < rhs.second )
    {
      return true;
    }
    return false;
  }
};

Which I loved, because you could sort a set of pairs, thus preserving uniqueness, while later do a range filter to find all pairs with the first parameter matching.

This time I threw that all way, got rid of the std::string also, and just used good old char*, rewriting the shortest-path-first, in a classic C style with fixed size array’s. And once I used a large enough node count (5000) the problem was solved.

I used to really like the std::vector, std::set and std::map because I didn’t have to do any pre-allocation of memory, but then last night I realised I could have just used realloc, to grow my data structures, which is what the std:: stuff is doing anyway.

So the guts of the problem are you need space to store 5000 unique names, you need to parse the papers, then run short-path-first.

Programming Challenges: 110208 Yahtzee

I completed the Yahtzee problem today, after a couple of days effort.

I first double checked my previous 2004 solution’s scoring function, there were a few gems in there that I had to reproove, like how the full house was worked out.

// a - e are the five dice rolls
int array[7] = { 0,0,0,0,0,0,0 };

array[a]++;
array[b]++;
array[c]++;
array[d]++;
array[e]++;

// full house
if ( ( array[a] + array[b] + array[c] + array[d] + array[e] ) == 13 )
{
    scores[count][12] = 40;
}

I then rewrote the recursive function to remove my fancy std::list<int> stuff and used simple arrays of ints, and wrote a completely naive checker. But at 6 billions checks per score set, it was never going to fit the time limit.

I then thought about it for a day, and this morning, wrote a version the skipped the skippable stuff, but it got the wrong answer, then I noticed a case I’d skipped that I shouldn’t have. I added that back in, and all of a sudden my code started giving really bad (low) score results.

I noticed the my best score function was entering (new_score > best_score) when they were the same values.

Much muttering, explaining to my wife and children later…

I noticed a compiler warning:

warning C4390: ';' : empty controlled statement found; is this the intent?

from this:

if( new_value > best_value );
{
    //cout << "b: " << best_value << " n: " << new_value << endl;
    memcpy(best_set, current_set, sizeof(int)*13);
    best_value = new_value;
}

after removing the stupid semicolon and debugging text, my solution solved the puzzle!

Planet Money Podcast

Just completed the Planet Money podcast listener survey,  and one of the question was about recommending the podcast.

I have given it a good rate in iTunes, but will also recommend it here:

If you are interested in a down to earth, no hype look into “money related things” I recommend this podcast. It’s done by NPR is relax, and not pretentious, and they have covered some interesting topics in the past, and I really enjoy listening to it when new stuff is released, usually two 20-30minutes podcasts a week.

However, on a side note, the survey asked some really odd, and US centric questions, and felt very non-web aware, which to me consuming the podcasts via iTunes (I assume RSS), and reading the blog via RSS it seemed very odd, that most the questions were news focused, with a slant to print paper, and magazines. Then TV.

I don’t watch news any more, and but have a large number of people I follow via RSS/Atom, and their shared links are a great source of real news. Then I may follow this up to find more.

So odd survey, but good radio show/podcast, give them a try.