tiistaina, joulukuuta 30, 2008

Should I stay or should I go?

Joel Spolsky and Jeff Atwood are a bit harsh. Essentially they say if you even think about leaving the software profession, you really should go, that even entertaining a thought like that is a sign of a bad programmer.

During the last couple of years I have been considering ways to become a professional horse trainer/stable-boy or something like that. Sorry, but I did not realize by doing that I was committing an act of treason against our beloved profession.

I never considered myself to be an excellent programmer but I never knew the bar was so high. Ok, maybe I'm not that great, but I haven't figured out a way to get someone to pay for playing with horses all day and well, I do like coding. So maybe I'll stick around a while longer.

But I do think people can be good at what they do but still get tired about it for a reason or another. And it is a very big world out there with a lot of things to do. It would be foolish to assume one can be happy only by programming computers. Yes, it pays well, like Joel says, but money is not equal to happiness. Happiness comes in many forms and can be found in many ways.

I am happy now. I hope you are too.

maanantaina, joulukuuta 29, 2008

Automating TVkaista with Automator

I have been a very satisfied user of TVkaista.fi, a tv-show recording service. I have been using it to download shows I missed for some reason and I have also used it to download tv shows to my iPod via its iTunes feed.

Only recently I realized I should perhaps automate downloading the shows I follow regularly and it was only then I discovered TVkaista has an RSS feed for each tv channel. Then it came to me that I could try to use Automator to automate the downloads. And it seems it has been a success.

There were a couple of issues.

First, I only wanted to download each show once, even if I accidentally invoked the download more than once. I solved this by subscribing the tv channel RSS feeds into Mail.app. Mail can keep track of the read/unread status of each feed article. Alternatively, each article can be flagged or unflagged. I chose to flag an article when it has been downloaded and only download unflagged shows.

Second issue was a bit strange. The Automator workflow I had made worked OK when I ran it from Automator. However, it did not download anything when I saved the workflow as an iCal plugin and had iCal invoke the download at certain times. There seems to be very little one can do to debug Automator. Eventually I realized the iCal plugin is actually an application bundle and when it wants to authenticate to TVkaista, Keychain does not allow it. After using Keychain to allow access to all programs for TVkaista authentication, my scheduled downloads work just fine.

You can check the Automator workflow I use to download Hill Street Blues. It looks like this:

If you are a TVkaista subscriber, you can try it too after subscribing to the YLE FST channel RSS feed in Mail. If you want to schedule the download, open the workflow in Automator, then from the File menu, Save as plugin, choose iCal plugin and give it a descriptive name. Then switch to iCal where you will find an event that is set to invoke an application. Change the event to run and repeat the way you like. The iCal plugins are actually app bundles saved into Library/Workflows/Application/iCal under your home directory.