nanovivid

Growl Notifications for Lala

November 15th, 2008Code / Geeking Out / Goodies / Mac / Music2 Comments

Recently, Jeremiah was kind enough to introduce me to Lala, which is a wonderful music browsing/listening/collecting/buying site. That’s a little convoluted, so maybe a “web-based iTunes with some community features” might be the best way to describe it. Easily my favorite feature is that you can listen to entire songs before you buy, not just 30 second snippets. That’s a huge win compared to most competing stores (Rhapsody MP3 lets you listen to full songs as well, but it lacks an easy method of queueing entire albums). Pricing is another advantage; most albums are $7.49 or less, beating iTunes, Amazon MP3, Rhaposdy MP3, and just about everyone else.

Almost as soon as I started using Lala, I realized that it really needed its own Dock icon and separate browser window. Enter the wonders of Fluid. I created a SSB (Site Specific Browser) for Lala with a cassette tape as the icon. (Sure, it might not make perfect sense, what with it being digital music and all, but it’s better than using Lala’s favicon. If you want another option, the speaker icons by Jonas Rask are very nice.)

However, one important piece of functionality was missing. I’m very accustomed to having Growl notifications for music that’s playing, and while Fluid supports dispatching Growl notifications, there weren’t any existing Userscripts to make it happen. Of course, I couldn’t leave well enough alone and spent a couple hours poking around Lala’s JavaScript to see if I could find anywhere to hook in and grab player notifications. Eventually I tracked down the Header.updatePlaybackNowPlaying function, which had exactly what I needed, and I was able to write a Userscript to generate Growl notifications on Lala track changes.

If you want to set up your own SSB for Lala with Growl notifications (note that you will need to have Leopard for this as Fluid is 10.5-only):

  1. Download Fluid if you don’t already have it.
  2. Open Fluid and create a new SSB for http://www.lala.com/ (and set the icon if you’re so inclined).
  3. Launch your Lala SSB.
  4. Click the Script menu (the icon to the right of the Window menu) and choose Open Userscripts Folder.
  5. Download the LalaGrowl Userscript, unzip it, and place LalaGrowl.user.js in that folder.
  6. Back in Lala, click the Script menu and select Reload All Userscripts.
  7. Click the Script menu one last time and click LalaGrowl to enable it.
  8. Reload the page to activate the script (it’ll be automatically loaded from now on, but you have to reload the first time so the code can hook in and grab the information it needs to display notifications).
  9. (This is optional and not related to Growl notifications). I’d highly recommend checking the Closing the last browser window only hides the window option in the application’s General Preferences. This makes it so that you can close the window and music will continue to play, just like in iTunes.

Hopefully someone other than me finds this useful!

As a disclaimer, I should also mention that if Lala changes their JavaScript significantly, the notifications will stop working, since I am depending on undocumented functionality (Lala doesn’t have an offical JavaScript API).

If you want to be my friend on Lala, here’s my profile page.

M83 - Couleurs (Sasha Invol2ver Remix)

jQuery Is Sorcery

June 1st, 2008Code / Geeking Out2 Comments

Geeky content warning: Feel free to skip this post if “JavaScript” makes you think of writing a play at a coffeehouse. Otherwise you may be confused and/or bored to tears.

Lately I’ve been using the jQuery JavaScript framework quite a bit, and I consistently find myself surprised by how close to magic it seems. Being able to simply write $("#id").hide(); and have the element disappear is a bit shocking if you’re used to writing “traditional” JavaScript. jQuery encourages a massive reduction in the amount of code required to do just about anything.

For example, the collapsable yearly archive in the footer of the site is based on the Flexo Archives Widget. The original JavaScript is about 220 lines of code, including comments and whitespace. Here’s the code ported to jQuery:

jQuery(function(){
    jQuery(".flexo-link").each(function() {
        // Add a hint to each expandable link
        jQuery(this).attr("title", jQuery(this).attr("title") + " (Click to expand)");

        // Hide each list of months
        jQuery(this).parents("li:first").children("ul").hide();

    }).bind("click", function() {
        // Show or hide a list when the user clicks
        jQuery(this).parents("li:first").children("ul").slideToggle("fast");
        return false;
    });
});

That took the code from ~220 lines to ~15, which I’d say is pretty magical. Now, to be fair, jQuery is a 14 kb framework (when compressed), while the original Flexo code is only 4 kb compressed. In my case, I was already using jQuery for other functionality, so it made sense to go ahead and shrink the JavaScript for the archives. I also added scrolling to make sure the content stays on screen as it’s expanded and a few other tweaks. Even with those new features, my code only reached about 35 lines.

This is only a small taste of what jQuery can do. In addition to the core functionality, there’s the very impressive jQuery UI and all kinds of plugins. If you’re writing JavaScript, I’d highly recommend taking a look at jQuery. Then you can feel like a wizard too.

Sigur Rós - Gobbledigook

Dirtywhirl

May 13th, 2008Geeking Out / News / Site2 Comments

After a little over five years of using my custom blog engine, I decided that it was time to switch to something else. (Even though it never technically had a name I’ll refer to it as nvJournal for the sake of brevity here). Although I had a lot of fun writing it and adding features over the years, I felt that the time it would take me to extend it further was more than I wanted to spend. So I up and switched to WordPress. I know, right? But it’s working out pretty well so far.

One of the big reasons for switching was so I can use MarsEdit. I was getting really tired of having to write all my posts in the browser and nvJournal didn’t have any sort of API support. Thus, I either had to write an XML-RPC interface or switch to something that did. There was also the lack of support for drafts. With nvJournal it was either published or not (I could publish privately, but then I’d have to dive into the database and manually edit the date when I posted).

nvJournal’s admin interface was also slightly… limited. It worked well enough for writing new posts, but management wasn’t so hot. I only ever got around to listing the twenty most recent posts and then throwing in a box where I could enter the ID of an old post to edit it.

So a couple weeks ago, I grabbed a copy of WordPress, threw up a test domain, and started playing. Obviously the first task was to get my old blog imported. It didn’t take too long to figure out the WordPress export format, so I was able to generate a file for import pretty quickly. I had to tweak a couple of core files to get my post IDs to carry over, but after that, it was smooth sailing.

Then I needed to settle on a design. I’ve been playing with ideas for the post-Whiteroom design since, oh, July of 2005. Nothing ever quite stuck though and I let it stagnate for a couple years. I finally picked things back up last spring, but again, none of the designs felt quite right. Then I tried again in the fall but it was the same story. However, this time, the stars aligned as I hit on the idea of a dirty, worn version of the circles logo that I used in 2003. It’s always been my favorite nanovivid logo by far, so I decided it was time to bring the circles back.

nvdot.gif circles.png whiteroom-icon-48.png nvglyph-worn.png

After a lot of pixel pushing, I finally ended up with the design you see here. Of course, I had to go and implement it in HTML, but that surprisingly ended up being fairly easy. There really weren’t too many cross-browser issues to work around this time, largely because the design is much simpler than the last one. And hey, my site is now properly IE7 compatible, so… yay?

Please let me know what you think of the new design. I think the only outstanding issue left is user accounts, and I’ll post once I have that worked out. I’m going to do my best to migrate them over. I hope the redesign and move to WordPress will mean that I will be a bit more likely to blog than in the past couple of years. But we’ll see how that goes.

Basement Jaxx - Same Old Show

I Can Has Upgrade?

September 5th, 2007Geeking Out / MacComments?

WANT

Sure, iPod Touch is very cool and all, but there are a couple of things that make iPod Classic much better for me. First of all, I love having all my music with me, all the time. That’s definitely not an option with iPod Touch yet. The clickwheel on the Classic is also nice for use with gloves in the winter. Which we tend to have a little bit of around here.

I’m still rather amazed that the low-end iPod Classic has more than twice as much storage as my 3rd generation for half the price. I think it’s about time to upgrade. Of course, once I do, I’ll have to think up a new tagline for my Last.fm page since “Running out of space on my iPod” will no longer be true. Such is the price of progress.

Le Castle Vania - Trouble In Daylight

Blog, You Say? What’s That?

January 14th, 2007Geeking Out / Mac / News5 Comments

So! Hello internet! We just freakin’ bought a house! It’s still sinking in, but I think it’s going to be cool. The house is in Lakewood, so we’re going back to the west side, which I’m a little sad about since it means a longer commute again, but I like the area better, so I think I’ll survive. Not to mention that we’ll be able to get Angelo’s again. I think that’s the main reason Bryan wants to move — we haven’t found good pizza on the east side. ;-) Anyway, the house is super nice and has had so much done to it — plumbing, electrical, insulation, waterproofing… just about everything is redone. We’re closing in February and moving in April!

Speaking of buying things, I’m getting a 15″ MacBook Pro, which should be arriving on Tuesday! I’m excited to be replacing my aging PowerBook with an ultra-fast machine.

Now we get to spend even more money on things for the house. Time to start eating Ramen? Not likely.

Manuel Göttsching - E2-E4

Music Box

September 12th, 2006Geeking Out / Mac / Music1 Comment

I’ve been sitting here listening to the ends and beginnings of tracks for like the past half hour. And grinning maniacally every time.

Hee! There it goes again!

Let me explain. As soon as I skip to the end again.

Yay! Yayayay!

See, the new iTunes 7 has gapless playback. That means…

Woo!

That means that if you have a continuous mix, or really any album where the tracks go directly into each other on the CD, there’s no longer a little blip of silence between each track when they’re played sequentially.

It’s amazing being able to once again listen to albums the way they were recorded after years of gaps. Apple could have released iTunes 7 with just this one feature and I would have been thrilled. I’m seriously that excited by it.

Again!

Le Knight Club - Mirage

All Is Full of Amora

August 1st, 2006Art / Geeking Out / MacComments?

Wow. Wow. Wowowowow.

Sorry, my mind is a bit blown by the amazingness of Amora. David Lanham always makes beautiful art and Amora is no exception. The initial inspiration was the video for Björk’s All Is Full Of Love (which is also great).

Now my Mac is all tricked out with Amora and it’s wonderful.

Slyder - Lex Luther

Get Myself Into It

July 24th, 2006Geeking OutComments?

Am I a bad person for finding Lotus Notes development rather enjoyable? Google Fight says… apparently not. I guess would be much more evil if I enjoyed doing stuff with Outlook. At least according to the Internets. I really have been enjoying learning how to work with Notes, even if some of its shortcomings do make me want to gouge my eyes out with a rusty nail. Why can’t you search for multiple keywords in a view? I don’t know! And by now everyone has stopped reading anyway because all they’re seeing is “geeky rant bla bla bla” so I’ll shut up now.

Björk - All Is Full Of Love

Shot Through a Wormhole

May 7th, 2006Geeking Out / Television1 Comment

Last night, Bryan and I finished Farscape. We’ve been working our way through the series since last October. I’ve thoroughly enjoyed it and I’m pretty sure Bryan has too. Prior to renting all the DVDs (thanks, Netflix!), I had only seen parts of season two and three, so it was great to see the whole story from the beginning.

My favorite aspect of Farscape has always been the characters, which are unusually deep and well-developed. Generally, the villains even have plausible backstories, motivations, and reasons for their actions (though there is some failure in that area when it comes to the Scarans). This development is the reason I love Scorpius, who is without a doubt one of the most complex and interesting villains on any show I’ve seen. There are plenty of other great characters as well, but Scorpius always stands out to me.

The other excellent facet of the show is the storytelling. They’re never afraid to take risks with the stories or characters, and there are times when it is amazingly, relentlessly dark, but in a good way (if that makes any sense). It’s one of those shows where if you drop in during the middle of the series, you’ll probably be a little lost due to all the history and backstory. In the end, it’s a little disappointing that Farsacpe got cancelled after season four and they had to tie everything up in a three-hour movie, but at least they did get to bring closure to the main story arc in a pretty big, dramatic, and satisfying way.

If you’re thinking about watching Farscape, definitely start at season one… and hang in there. The early episodes when they’re establishing the universe and the characters can occasionally be a bit difficult to get through. Then about three-quarters of the way through season one, the main story arc of the series really kicks in and gets the story moving. From there on out, it’s pretty incredible and easily one of the best series ever to appear on television, science fiction or otherwise.

Norfolk & Western - A Gilded Age

Deanach

April 1st, 2006Art / Friends / Geeking Out / Mac3 Comments

In addition to being a lazy-ass loser, one of the reasons I haven’t been blogging lately is called Deanach OSX.

It’s a port of Deanach3 for Windows to the Mac that I’ve been working on (with Anubis from MacThemes Forums) for, oh, the last four months or so. Theming OS X is insanely time consuming, because there are exactly thirteen-bajillion elements to skin. I’m not kidding. I counted. And by counted, I mean… approximated.

Today, however, I am freed from the time-consumingness of this theme (well, except for the bug-fixing and tweaking). It’s finally released, and the reactions have been good. Finishing a project of this magnitude and having people like it feels quite nice.

For as much as I enjoy pixel hacking, I’m definitely going to wait a bit before diving into a new theme. The amount of time sucked down by creating (or even porting) a theme is rather insane. Plus, Bryan gets tired of me constantly having my nose in ThemePark and Photoshop.

To celebrate Deanach’s release, we’re going out to eat with Bryan’s friend Sandra tonight. Actually, dinner has nothing to do with Deanach. But I can pretend that it does, because I’m a dork like that!

Swimmer One - Cloudbursting