You just gotta love this tech world...
Wednesday, October 28, 2009
Tuesday, October 20, 2009
For the last couple of weeks I have found myself regularly having a Safari or Firefox window open, showing the Bitgravity stream from http://live.twit.tv, 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 TWiT.tv application on my dock.
This is the setup in Fluid:
On first start I had to add live.twit.tv 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 I usually do not need the surrounding extra information like the production calendar or the web-based IRC chat room.
This is what it looks like now, when I have started it. I will not go so far and set it up to auto start on login, but keep it in the dock for quick access.
Wednesday, October 07, 2009
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. Switching to English on the iPod works, too.
Tuesday, October 06, 2009
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.currentTimeMillis(); long age = now - creationDate; return age > MAX_AGE_THRESHOLD_MILLIS;
Always a pleasure to see the face of people when they recognize what strange things they did only weeks ago, probably late at night :)
Thursday, October 01, 2009
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: