Nicholas Pike

Like nailing jelly to a wall…

Archive for December, 2007

Projects: Snarl & Last.FM

with 3 comments

snarlfm.JPG

Long story: My iPod touch notifies a website called Last.FM when I listen to music. If your not familiar with LastFM here’s a quick run down: Last.FM allows you to “scrobble” the names/artist of songs you listen to, and share this information with anyone an the internet. So if you go here you can see what music I have recently listened to on my iPod/computer.

So being the huge geek I am, I wrote a quick C# application that watches Last.FM for updates to my “Recently Played Tracks”, once it finds a change, it notifies me on my work desktop in a nice little bubble (see picture above).

The bubble is done with a program called Snarl, which aims to replicate GROWL functionality (an OSX notification subsystem) on Windows. (This is very hit or miss, mostly miss.)

So why did I do this? Too lazy to look at the iPod to see what the track names are ;-)

Below is the source code for the quick and dirty C# application, that makes use of external process launching to send messages to snarl, and WebClient to retrieve updates from Last.FM

Read the rest of this entry »

Written by npike

December 20th, 2007 at 2:04 pm

Posted in Projects

Thanks everyone…

without comments

Just wanted to put up a quick post to thank everyone for an awesome birthday (December 11th), most importantly Jennifer.

I got some great gifts (even from those that shouldn’t have) – so thanks!

Some funny Microsoft HomeServer propaganda: http://www.stayathomeserver.com/

Written by npike

December 13th, 2007 at 9:19 am

Posted in birthday

Quick Experiment: Google Charts on Bungie.net

without comments

 Google Charts API is now public, so I took a few minutes to experiment today: Placement Stats Pie Graph for Bungie.net (Halo 3 stats).

So whats the deal with Google Charts?  Basically you create a crazy URL to Google, and they send you back a nicely rendered chart to use anywhere you like – dynamically generated.  Using Greasemonkey I scrape the Bungie stats page to generate chart information, and then inject the resulting image back into the page.

Pretty cool – code linked here.

Written by npike

December 7th, 2007 at 4:21 pm

Leopard: Growl and Mail.app

with one comment

The release of Leopard into the wild has broken a good bunch of useful third party apps – one of my favorite being GrowlMail, which gives notifications of new mail in Mail.app.

There’s currently no ETA from the Growl team as to when this will be fixed in Leopard, but with some clever use of AppleScript, you can basically mimic its basic functionality for now.

Create a new AppleScript with Script Editor

Paste the following into Script Editor, and save it somewhere in your home folder (I put mine in ~/AppleScripts/GrowlMail.scpt).

 

on perform_mail_action(info)

            tell application "Mail" 

                set selectedMessages to |SelectedMessages| of info

                repeat with eachMessage in selectedMessages
                    set theSubject to subject of eachMessage
                    set theSender to sender of eachMessage

                    tell application "GrowlHelperApp" 

                        set the allNotificationsList to ¬
                            {"New Mail"}

                        set the enabledNotificationsList to ¬
                            {"New Mail"}

                        register as application ¬
                            "MailScript" all notifications allNotificationsList ¬
                            default notifications enabledNotificationsList ¬
                            icon of application "Mail" 

                        notify with name ¬
                            "New Mail" title ¬
                            "New Mail from " & theSender description ¬
                            theSubject application name "MailScript" 

                    end tell

                end repeat
            end tell
        end perform_mail_action

… and then create a new Mail Rule in Mail.app (You’ll find the Rule tab in Mail.app Preferences).

If any of the conditions are met:
Every Message
Perform the following actions:
Run AppleScript: ~/AppleScripts/GrowlMail.scpt

Written by npike

December 7th, 2007 at 11:34 am

Posted in leopard, osx

Vacation is over: Back to being schooled

without comments

So my two week break from work is over. Starting Monday (Dec 4) I will be returning to classes, and starting part time for Thomson (Thursday & Friday).

winter2007sched.png

Organizational Behavior is to continue my liberal arts related electives in Business, Science Tech Policy wraps up my Science, Technology and Environmental Studies minor, and Programming Skills (don’t worry, not really as lame as it sounds) will be 1 of my last 2 computer science courses.

To enlighten my readers about Programing Skills, here’s the course description:

The goal of this course is to introduce the students to a programming
paradigm and an appropriate programming language chosen from those
that are currently important in industry or that show high promise of
becoming important.

… which to be completely honest, after reading it again makes no sense.  Thats RIT and its course descriptions for you.  The course is about aspect orientated programing as  opposed to the ever popular object orientated programing.

In software engineering, the programming paradigms of aspect-oriented programming (AOP), and aspect-oriented software development (AOSD) attempt to aid programmers in the separation of concerns, specifically cross-cutting concerns, as an advance in modularization. AOP does so using primarily language changes, while AOSD uses a combination of language, environment, and method.

… again, that doesn’t really tell you much either (thanks Wikipedia!) – I guess I will just have to wait until I learn something in the class, to talk about what it actually is.  What a novel idea.

Written by npike

December 3rd, 2007 at 12:25 am

Posted in Uncategorized