Showing posts from October, 2009

Google Navigation

You just gotta love this tech world...

Fluid app for

For the last couple of weeks I have found myself regularly having a Safari or Firefox window open, showing the Bitgravity stream from , Leo Laporte’s netcast site. Time and again however, I accidentally closed the video when I routinely quit the browser when I had finished using it for other web related stuff. Today I got sufficiently annoyed by myself to resolve this situation once and for all. So I created a Fluid app , took a TWiT logo from their homepage and now have a standalone application on my dock. This is the setup in Fluid: On first start I had to add to the ClickToFlash white list again – the white   list from the regular Safari settings was not taken into account by this standalone browser – and then resize the Window to precisely match the video size. This is remembered for any subsequent launches. I went for the popped out player available from the regular page (see the URL in the Fluid setup screenshot above), because

Setting up iPod Touch for Google Sync

Google offers an Exchange/ActiveSync based option to keep your mails, contacts and calendars lined up nicely on your iPhone and iPod Touch. I succeeded in setting this up on my iPod Touch 2G as per their instructions, but when I tried to configure which of my calendars were to be synced by going to with the Mobile Safari browser, it told me that “Google Sync is not supported on your device” (well, actually in German, but never mind). I suspect there is some user-agent filtering going on and that for some reason – even though from what I understand the iPod should be fine – it likes an iPhone better. Mac OS X 10.6 Automator to the rescue: Both options are from the Internet section of the Library on the left (not shown). Save this as an Application or just run it from Automator and you will get this: This allowed me to set up the calendar on the iPod to sync more than just one Google calendar. EDIT: Much simpler, it just did not like the German language

Another note on code readability

Some time back I posted a piece of code I found that was trying hard to obscure its meaning (see this post from September 2008 ). Today I came across this: long now = CalendarUtil.theCalendarUtil().getCalendar(new Date()).getTimeInMillis(); long milis = now - creationDate; milis = (milis < 0 ? milis * (-1) : milis); return (milis > 2 * 60 * 1000); Now, do you immediately see what’s going on here? Right – of course, you do. The method is called isInstanceTooOld(), the idea being that it should return true, if the current object was created less than two minutes ago. The constructor records the creationDate field to track that. This nicely shows that convoluted code – even intended to provide a simple function like this one – is prone to errors: This one returns true, too, if the current object is two minutes newer than the current time. The correct function looks like this: static final long MAX_AGE_THRESHOLD_MILLIS = 2L * 60 * 1000; long now = System.currentTimeMill

John Lloyd on Invisibility

The following video I came across by chance – listening to some podcast I was reminded about  TED, browsed through the site and found this. I really find it a great little talk (10min), so here it is: The original can be found on the TED Site ( direct link ). Technorati Tags: john lloyd , ted , video , fun