Friday, November 27, 2009

ZumoDrive, my new gig


About two months ago I made the tough decision to depart PowerReviews to join a small startup called Zecter. Zecter's flagship product is ZumoDrive, a cloud drive for all your internet connected devices. A lot of friends and family have been asking what it is, exactly, and how it works. So I thought I'd just write about how Kjersti and I use it.

The best way to think of ZumoDrive is as a repository for all your stuff: documents, music, photos, movies, etc. The repository appears as a local drive on all your computers once you install the software, just like plugging in a USB stick or external hard drive. But it's so much more than simple storage like an external hard drive.


For one thing, it's a single drive that can be "plugged in" to multiple machines at the same time, all the time, no matter where those machines are. When Kjersti adds a new file to ZumoDrive on her computer, I get a notification and can see it on my computer within seconds. I really like this idea of having a "single source of truth" for all our important data. I don't have to keep track of which computer a file is on. I don't have to worry about losing any of my data if one of those devices dies or gets lost or something. And when I replace my old computer with a new one, I don't have to worry about migrating everything over (have you ever tried to do this by burning CD-Rs or DVD-Rs?!).


I think the value that ZumoDrive provides just for online backup is pretty substantial in itself. For instance, when you edit a document in your ZumoDrive, it saves revisions, so you can revert to any past version. Say goodbye to all the Report (Copy).doc, Report (Final version).doc silliness. Accidentally deleted a file? Just go to the recycle bin on the ZumoDrive site and restore it. And if you lose your laptop, or your house burns down along with all your computers, external hard drives, and USB sticks, your stuff is safe in the cloud! In fact, since we use Amazon's S3 service, your data is ensured to be stored in 3 different earthquake zones, so it's a hell of a lot safer than any external backup disk. Just because you have an external hard drive, doesn't mean your stuff is safe. In fact, by getting a second hard drive, you've doubled the probability of one of them dying. Don't delude yourself into thinking your data is nice and backed up on that external hard drive!


ZumoDrive appears as a local disk to your computer. For example, on Windows you'll have a Z: drive. This means all your desktop applications, like iTunes, Word, Excel, iPhoto, Picasa, etc. already know how to store stuff on your ZumoDrive, because for all it knows it's a regular drive! You don't have to worry about manually uploading files you save from these applications, it's done for you. ZumoDrive also works well when you're not connected to the internet. Just keep saving stuff to it as usual, and when you go online again, ZumoDrive will start uploading automatically in the background.


Going along with the "single source of truth" idea, your ZumoDrive is effectively unlimited storage. It doesn't matter if your computer only has 30 GB available but you want to store 400 GB. ZumoDrive treats your local disk as a cache. It will stream content from the cloud on-demand and store it in the cache as needed. And it will do its best to intelligently pick your most used files to keep in the cache. But even if a file is not in the cache yet, this doesn't mean you have to wait for the whole thing to be downloaded. Depending on the type of file, it can most likely be streamed. Like if you start playing a song in iTunes, after we fetch the first few kilobytes, the music can start playing. Sort of like a YouTube video. The song can start playing within a second even if it will take a minute or so to download the whole thing. This technique generalizes to all types of files, too, not just music and videos.


Putting your music collection onto ZumoDrive is probably one of the most killer use cases. With our music on the ZumoDrive, Kjersti and I can share our collection, instead of each having our own overlapping set of music on our laptops. If she downloads a new song, I can play it instantly! But the best part about this isn't when we're on the laptops, but the iPhones. With the ZumoDrive iPhone app, we can both access the whole music collection all the time -- even though it's bigger than either of our iPhones have space for! I hate having to sync my iPhone with iTunes and pick and choose which songs I want on it. I just want everything to be available. And if I buy a new song, I don't want to have to wait until I sync again for it to appear on my iPhone. With the ZumoDrive app, I can just stream the music instantly (as long as I have an internet connection). Oh, and if my connection sucks because I'm on EDGE instead of 3G or something, the ZumoDrive server will automatically "downsample" the music to a lower bitrate so it will download faster.


The mobile aspect of ZumoDrive is definitely one of the best parts. With all these netbooks and tablets and smartphones coming out, you're very likely very soon to have several internet connected devices where you'll want to access your documents, photos, music, etc. You don't want to have to keep copying stuff around to each of the devices! And even with software to take care of all this syncing, you have to pick and choose what content you want to go on what devices. In fact, DropBox (probably the best of the sync solutions out there) doesn't even have this "selective sync" functionality yet, although it is their most requested feature. So if one of your computers doesn't have enough free space to hold all the content in your dropbox, you're SOL. Not even something you have to think about with ZumoDrive.

I already mentioned how cool it is to have access to my whole music collection from our iPhones... Well, the same goes for photos. We've got a fairly large collection of photos from over the years, taken with our digital camera or phones. I had them all organized in folders on my hard drive, and had been manually backing them up (cuz once you lose your photos you can't get them back!). I was also uploading them to Flickr to share with friends and family, but it's been so long since I've done that because it's such a pain. I have to wait forever for it to upload, then go through and add titles and captions. And usually the upload fails part of the way through and I have to start over, but make sure not to re-upload duplicates. When I installed Zumo, I just dragged all my photos in and voila, they're backed up. Maybe I want to share an album? Just right click on the folder and get a link that I can paste into an email or IM. When someone opens the link they get a nice view on the web where they can watch a slideshow. Or they can download the whole album as a zip, or individual photos. It's so much easier than Flickr! This photo album feature is fairly new, as well, and we'll be improving on it.


Oh, and Kjersti takes a lot of pictures with her iPhone these days, and for a while she was emailing the photos to herself. But with the ZumoDrive iPhone app, I showed her that she can just upload the photo directly to ZumoDrive from the iPhone. I love this feature because when she takes a picture of Garbanzo at the dog park, I get a Growl notification on my computer at work and can see it instantly. :)


I mentioned the sharing aspect, but this goes even further. When you right-click on a file or folder in your ZumoDrive you can do a couple of things. You can "get link" which will generate a hyperlink you can share with anyone (even if they don't have a ZumoDrive account). Or, you can share the file or folder with another ZumoDrive user. Just enter their email address and they'll get a notification. Once they accept the share, the folder will show up in their Z: drive as well. Now you can collaborate on a project without having to email files back and forth!

So this is has gotten pretty long. It just goes to show how useful ZumoDrive is and how many ways there are to use it. It's been under heavy development for a while and has gotten fairly stable. I would recommend it to anyone. You can get 1 GB for free, so there's no harm in trying it out. In fact, 1 GB might be enough for you, but probably not after you start adding your media content. But like I described above, music and photos are some of the best use cases for ZumoDrive, so you're missing out. Upgrade to a larger drive and pay monthly, you can downgrade at any time.


Okay, there's one last feature I want to tell you about. It's been in the works for quite a while, and we are getting ready to release it. I've been using it for a couple of months now and I love it. It's called folder linking. This enables you to link any folder on your computer with ZumoDrive. For instance, instead of moving all my music into the Z: drive, I just right-clicked on my existing Music folder and added it as a linked folder. Now it shows up in ZumoDrive under /Linked Folders/Greg's Computer/Music. I can still get my music on my iPhone and share with Kjersti and everything. I didn't even have to configure iTunes to keep its music in a different location. It just works.

So if I seem pretty busy these days, this is why. We're hard at work making ZumoDrive better. It helps that we are some of its most avid users. We also talk quite a bit with our users on the ZumoDrive forums, so if you have any issues or questions or suggestions, head on over there. You'll get a response from one of us within a day or two.

Thanks for reading!

Monday, July 13, 2009

Other People


I want to try to write on my blog more.  Hold me to it.

You know what's annoying?  Other People.  I know, that's a negative and general thing to say.  But I mean it in the sense of, not you...  Other People.  Here are some examples:

You know when you go to a movie and there's that guy with his group of friends?  I think there has to be at least four of them.  And he has some clever quip he wishes to share with the group...  Only, he really wishes to share it with the whole theater, to impress the group.  Sometimes, to impress the whole theater.  So he doesn't tell his joke, he announces it.  Like, "Wait a minute.  This isn't Transformers!!"  Har har.  I mean, I can sort of respect someone who has the guts to come up with something funny and read the crowd to see if the general sentiment is there and put on a mini-performance.  But it's kind of pathetic when he just halfway does it, like, starts out loud and then tapers off cuz he's nervous.  And then -- this is when it gets really bad -- he announces it again, like, Hmm, nobody heard me the first time.  And sometimes his friends -- probably the ones closest to him -- will, out of embarrassment, laugh louder than usual, to kinda help him along and to join in on the performance, and draw some more attention to their darling little clan.

Or you know when you get off the train or the plane or whatever, and that person is walking in front of you, veering left and then right so you can't pass them, taking up the whole width of space?  Usually an older person who's sort of lost and kinda snappy about it...  And they just stop there.  Like right at the end of the jetway or right on the train platform.  Totally oblivious.  And they often have one of those bags with wheels that they drag behind them, like right below your field of vision, just in the perfect place to trip you up as you collide into their bubble.  And then there's this chain reaction, people piling up behind you, everyone annoyed.  Now here's where it gets bad: you get stuck in a vacuum.  Just like when you're behind that semi truck in the right-hand lane on the highway, and the cars behind you start passing and you can't gain enough speed to make your move into the other lane.  But it's worse, cuz now you're tripping over a bag and you don't have that windshield of anonymity.  You can't vent your frustration by yelling in the privacy of your own car.  All you have is the exasperated sigh, as you try to maneuver past this idiot who can't decide if they're going this way or that way.  They're usually trying to avoid making eye contact or acknowledging you.  So, as a defense mechanism, they get annoyed with you!  Usually right after you let out the sigh.  Like, "Ooh, EXCUSE ME FOR BEING IN YOUR WAY!"  Well, yeah, you're in my way!  Move.  Oh, and often it mixes with the first kind of Other Person, where they decide to say loudly enough for everyone around them that, "This airport layout is totally stupid!"

Or you know those busybodies who like to tell you how to do something.  Complete strangers!  This happens a lot when you have a puppy.  I'm sure it's a million times worse when you have kids.  People feel entitled to tell you what you ought to be doing.  I hate this because often it's a matter of opinion.  But even when it's not, you're unsolicited little factoid puts me in the position of doing one of three things: 1) saying, "Yes, I know that," 2) saying, "No that is false," or 3) thinking, I've never heard that before, thanks, but since you're a stranger, I'm skeptical.  67% chance you're not being helpful, and 100% chance you're putting me off.  But like I said, usually it's an opinion anyway.  Now, no two opinions are the same, and as a corollary of that law I'm not going to agree with you.  So now I'm in the position of indulging you or telling you I disagree.  I never asked for this!  Opinions are like ass holes: everybody's got one and most of them stink!  And they should be kept to yourself when you're out in public.

Anyway, there are a lot of things about Other People that are annoying that I could write about all night.  But this is probably enough cynicism for one post.

Sunday, March 29, 2009

The Zen of Redjinski


I draw inspiration from my turtle.  Russian tortoise, actually.  Redjinksi Tortinov.  Redji for short.

Kjersti and I have had him for as long as we've been married.  And it took some time for him to really trust us and reveal his personality.  At first he was cautious and private.  Naturally, after a mysterious life of surviving in the cruel confines of a small Seattle pet store with other creatures.  But now in our third year, he's let down his guard.  And here's what I've learned about him.

He sees something he wants and he goes for it.  Most of the time it's a long haul to get to it, but once he embarks he doesn't turn back.  He doesn't get distracted.  He doesn't get demoralized.  He'll march and march.  He'll take a break and look around.  Many times he'll be interrupted.  We'll pick him up and play with him.  Or we'll put him back in his Rubber-Maid terrarium where he'll bask in the artificial UV light.  And he'll dig.  He'll scratch and scrape and try to dig himself out.  Because he was on a mission before.  And he still is.

Hours, days, or even weeks later we'll let him out.  And he'll just continue on his mission.  He'll march and march.  Slow and steady.  He'll finally get to where he's going, and he'll conquer it.  He'll climb up the log and nosedive off the other side.  He'll do that again and again.  He'll go spelunking under and behind the furniture.  He'll find every passageway through a pile of blankets.  He'll bury himself in the mess of cords behind the TV.  When we pull him out, he'll grab onto the cords and won't let go.  And once you get him untangled and set him down, he'll head right back for it.  Tenacious turtle.

This weekend we were camping in Half Moon Bay.  We always take him camping with us.  He loves to explore.  You have to keep an eye on him, but at the same time, you can trust him with himself.  He's not reckless.  He knows when to hunker down.  Any sudden movements, and he'll react lightning fast, pulling his head into his shell.  If he feels exposed he'll head for the closest patch of whatever he can hide in.  And that's why you have to keep an eye on him.  He's the best hider I've ever seen.  He can hide in plain sight.

One time we were camping in Washington at Mt. Ranier.  We wanted to go brush our teeth at the restrooms, so we left him on top of a very large stump that was about 4 feet high.  There's no way he could get off...  When we came back he was gone!  He slid right down the slightly sloped side of the stump on his shell and started marching toward whatever he was fixated on.  We should've known.  We know him better now.

On our way down to California from Seattle he figured a way out of the cardboard box we kept him in.  Basically, during the car rides, he would scratch and scratch and scratch away at the corner.  Not in a panic.  Not like, "I just gotta get out of here!!"  But calmly and rhythmically.  He barely did any damage on the first day, so we thought nothing of it and got used to the sound of his scratching.  But by the end of the week, he had gotten one arm through, and was starting to use his strength to tear the box at its edge.  He would've gotten out, even if it took him months.

But that's Redji.  He's focused, he's slow, and he's steady.  He's quick to react.  He knows when to march forward, when to take a break, and when to take cover.  Most of all, he's persistent persistent persistent.

Saturday, February 21, 2009

I Want to be a Republican


I want to be a Republican. I mean, I want to. Make government small: more efficient, less wasteful. Entrust the market to do what it does best. Keep government out of our personal lives. Strong national defense. I mean, it sounds good. Sign me up!

Maybe it's the idealist in me.

The pragmatist in me knows that smaller government doesn't necessarily mean more efficient or less wasteful. I mean, we have to build roads, right? Or should private business have done that? What about the mail? Military? Schools? Health care? Police? Emergency services? Social programs? Surely there's just a single "right answer" to all these! Either they're all government or not, right? Damn, I guess it's not that simple.

The pragmatist in me knows that the market can't just go unregulated. I mean, look what happens. So, we have to have some regulations? How much regulation? Damn, this is getting hard. I was hoping for a one-size-fits-all philosophy of a free market that was always the best answer, no matter the circumstances. I think it works in theory! I guess it's not that simple.

The pragmatist in me knows that there's not really a clear line dividing my personal life and everything else. I mean, I should be able to have all kinds of dangerous weapons and booby-traps on my property, right? Wait, that affects other people. Unwary neighbors or kids who could foreseeably stumble upon my AK-47. Hm. I guess it's not that simple.

Strong national defense, that sounds good! Don't fuck with us!! USA! USA! USA! I love those awesome fighter jets and bombs I see on the history channel. Wait, what's that you say? This costs money? Shoot, that contradicts my other goal of small, efficient government. Wait, you say there's more? A huge force can't solve every international problem? But the terrorists hate us! Let's go drop bombs on them. I know what you're going to say. It's not that simple. Grrr!

I hate it when things aren't simple! It's so much easier to just believe in what I hear on the radio and see on bumper stickers, and not really think about it!

OK. I know, I know... Just because there are tradeoffs doesn't mean I shouldn't join up and help our country strive for these goals in general, even if it's not simple or one-size-fits-all. But the party seems so far removed from these ideals. They were in charge for a while. Let's see... Smaller, less wasteful government? Hmm, they haven't done a very good job there. Acknowledge that the market can't be completely unregulated, and figure out what minimum regulation is necessary, and enforce it? Fail. Keep government out of our personal lives? Prop 8. Epic fail. Strong national defense? We're spread so thin fighting an unnecessary war they started, we're probably at the weakest we've been in a long time. Thanks republicans, but the other party seems like a better fit right now.

Let me know when you're ready for me to take you seriously again. More hip-hop is a good start! And don't forget about the one-armed midgets...

Saturday, October 4, 2008

Religulous

Tonight Kjersti and I went and saw Religulous -- Bill Maher's documentary film about religion and how ridiculous it is. I liked it. I thought it was incisive, compelling, and frankly cathartic. Ten years ago -- maybe even five years ago -- I wouldn't have been able to openly admit that I liked this movie. It would have been "social suicide" as one ex-mormon in the movie described it (he was talking about actually leaving the church, which is obviously a much bigger deal, but you know what I mean). I don't claim to be an ex-mormon. I've never been religious. But in a very religious place in a very religious country, to be openly appalled by religion is not really something you can do in front of all your family and friends. Usually it doesn't seem worth it. You'll never change someone's mind. And you have to really ask if you want to be responsible for changing someone's mind.

The movie reminded me of how lonely I've been my whole life. I'm not trying to win sympathy points here, I don't feel bad for myself at all. I'm proud of who it's made me. But being an atheist is lonely, especially in Utah. Even though there are a lot of us out there, it's offensive and unacceptable to so many people. You really have to get to the point where you can come out of the closet and forget what anyone else thinks. You have to be willing to say -- at least in your head -- "fuck off" to someone who doesn't really want you to be yourself. People ought to root for others to be themselves; forget those who don't. Something as simple as openly being yourself is very empowering, and it's taken for granted by everyone in many ways.

Anyway, I was talking about being alone. Or feeling alone. But there was one statistic in the movie which I found quite encouraging. About 16% of Americans don't want to be affiliated with any religion. According to the CIA via Wikipedia, about 4% are "none" and 12% are "unaffiliated". There are way more of us than Mormons. Way more of us than Jews. Way way more of us than Muslims. More of us than there are gays. How come it seems so unacceptable to be nonreligious?

The movie also goes on to point out how detrimental religion truly is to humanity. Religion has done more harm than good throughout history and continues to today. I'm willing to have that argument with you, but I'm not going to elaborate in this post because giving a single example just doesn't do the magnitude of it justice. There's an endless stream of examples.

Another thing that struck me in the movie is the common argument styles of every religious person Bill talks to. It's something I've seen so many times. I'll try to generalize it here. The pattern goes something like, "I believe [insert something unprovable] because it's true and I know it's true in my heart because of [insert some anecdote here that very thinly implies the point they're trying to make]. Therefore it's true and you just don't understand because you're not one of us." The problem is, in everyday conversation, especially with people you know, you have to just let this mess of asinine logic go unchallenged because it's just that: asinine. To call out the flaws in their argument is tantamount to calling them stupid. But even if you take that risk and point out that they're just believing something silly based purely on faith, they get very defensive. Now you're offending them. Now you're talking about something you're not allowed to talk about. And there's the rub. You cannot reason with these people when you get to this level. It's not an even playing field. You're playing the game by the rules of rationality -- they're playing by a very different set of rules. Now you're talking past each other and it's futile.

At the end, Bill calls on people like me to not give up on this exercise in apparent futility because it's really not all for nothing. The more we can open up people's eyes to the world we live in, the better it is for all of us. People who are certain about their religion are dangerous; especially when they reach positions of power where they apply their beliefs blindly to things as important as public policy. Sound familiar? We cannot let that happpen again.

Anyhow, I've come a long way from hiding my true self. I hope people like me can continue forward with this march and be fairly represented in the country and the world. But at this point, it just feels like we're not part of the dialogue.

My honest dream is to one day be an openly atheist politician, but any time I start that thought experiment I give in to cynicism.

Tuesday, September 9, 2008

Abraham Lincoln is my Favorite President


I have a countdown clock on my computer that says "56 days". In 56 days those of us who are willing and allowed will cast our votes in the presidential election. So far I've split my voting age in two very different locales -- ultra conservative, 5 electoral votes Utah; and fairly liberal, 55 electoral votes California. In either place it's hard to believe that my vote can really make a difference. Any rational observer knows how each of those electorates will go. But, although a single vote never matters, every single vote does.

In April 2000 I got the right to vote. In November that year I voted for Al Gore and Joe Lieberman. I watched the ensuing debacle through the TV -- as much of an information junky, CNN-aholic then as I am now. In 2004, while attending a convention for an engineering honor society as the Utah chapter president and delegate, I watched John Kerry and George Bush debate on TV in a hotel room with 50 other bright engineering students from around the country. It was an interesting time for me -- it seemed like everything was changing. I broke up with my girlfriend of 3 years, the software I had poured a summer's worth of energy into was being deployed to 40+ restaurants, the Red Sox won the World Series, and the country that was polling strongly for change -- for Kerry -- suddenly decided on "four more years" of Bush. Again I was hooked to the TV.

Amongst all the information, misinformation, disinformation, and plain old noise that flowed through 24-hour live cable news channels during those times, I remember one constant: John McCain. John McCain slaughtered Bush in some early primaries, and should have been the Republicans' nominee. Except that he failed to defend himself against the awful tactics of Bush and Rove when they insinuated -- and somehow convinced Republican voters in South Carolina and other states whose primaries followed -- that McCain had fathered an illegitimate child with a black woman. An outright lie, obviously, but apparently a picture of McCain with his Bangladeshi adopted daughter Bridget was enough to scare voters into believing that Bush exemplified their Christian values better than McCain. Like I said, McCain should have been the nominee. Gore should have been the president. Bush should have gone back to Texas. And in 2001, McCain should have become a Democrat; he seriously considered it.

I remember in 2004, McCain was flirting with the left again. This time with his friend John Kerry. There was talk that he would be Kerry's runningmate. But due to the apparently now-confirmed rumors that McCain wanted to bid for the Republican nomination again in 2008, he reportedly turned down the offer.

If you've read this far, you probably think I support McCain for president. But I have to tell you, as much as I wanted him to beat Bush in 2000, I never wanted him to be president or vice president. And that's more true today than ever. Too little, too late, too old. I think he has sold out what little credibility he had as a "maverick". It's not just an Obama campaign talking point, it's a fact that McCain has spent the past 8 years in the Senate voting with George Bush 95% of the time. That's piss-poor judgment in my book. He stands opposed to my beliefs and positions on so many important issues for this election. And on a personal moral basis, I think he is reprehensible. He struggled through school, not because he was slower than the other kids, but because he was a bully and all around ass hole; he graduated in the bottom 0.5% of his class; he was a "hotdog" pilot -- and a bad one at that. Yes, at no fault of his own he was captured by the enemy and tortured as a POW -- his perserverance and survivorship are inspirational, and his dedication to public service thereafter is admirable. But while he was gone, his wife Carol was crippled in a car accident. When he returned a celebrity, what did he do? He hooked up with a rich, blonde heiress to a Beer distribution fortune -- a woman 18 years younger than him... in a bar... while still married. He divorced his disabled wife -- a woman who mothered his 3 children; a woman who waited years in agony while he was imprisoned across the world; a woman who endured her own adversity and needed him more than ever when he returned.

I could go on and on, but it's not just that I don't support John McCain; I wholeheartedly support Barack Obama. I think a lot of people are nervous about electing someone with so little experience, but I maintain that it's exactly what we need. The conservatives are trying to tell me that they'll effect change -- but they don't get it. For one thing, "change" -- the word, the definition, the spirit -- directly contradicts "conservative" -- the word, the definition, the spirit. They don't want change, they want to tap into all the excitement around impending change. The Republicans' change is like Microsoft's Zune -- they're copycats and they're getting it all wrong anyway.

Change isn't easy to make happen. I think that the ingredients for the kinds of change I want are summed up in Obama and what he represents. As a Washington outsider and Democrat, Obama is better equipped to change the course of our country than anyone I can dream up. Everything about him is different than the status quo -- his heritage, his upbringing, his background, his career, his beliefs. And yet he is not radical. He is not way out in left field. He is practical and center. He's an intelligent pragmatitist. He's calm and consistent. He's a moderate, like me. He's smart and educated and demonstrates the ability for intelligible, deep thought. He's an inspirational orator and writer who knows how to express that thought. He's a good communicator. And he's in line with me on almost every issue.

Anyway, I feel very strongly about this election. As usual, I'm hooked to the TV and internet. I look at the polls in each state almost every day. I read the comment threads on blogs and watch almost every political show I can -- even Fox News. I feel pretty confident that Obama will win this election since everything is trending in that direction. But if there's one thing I've learned in both presidential elections I've participated in, it's that anything can happen.

56 more days.

Fact: Barack Obama is a lawyer, Illinois state legislator, and 2 year member of congress.

Fact: Abraham Lincoln was a lawyer, Illinois state legislator, and 2 year member of congress; and then the leader of one of the most important periods of change in US history.

Sunday, June 29, 2008

Ripping and Tagging Radio Paradise


Kjersti was out of town this weekend, so I spent some time tinkering with my MythTV. We moved a few weeks ago, and I haven't had the time to figure out why it was apparently not able to pick up the new cable listings. I decided to just do a fresh install of the newest Mythbuntu, based on Ubuntu Hardy Heron. After the usual headaches I got it working.

I was listening to Radio Paradise -- my favorite internet radio station -- and was remembering iLog, this little program I wrote when I worked at Sizzling Platter back in Utah. Basically, I'd sit at my desk coding all day, usually listening to Radio Paradise, and I'd hear a song I liked. So I'd keep this little text file open all day and write down the artist and title so I could download purchase the song later. I did this enough that I thought it'd be cool if I had a hotkey for it so I wouldn't have to alt-tab away from Visual Studio. iLog was a .NET/C# program I wrote to sit in the background as a Windows Daemon. When I pressed Control-Shift-G, it would "grab" the song and record it. Then, at the end of the day, it would email me all the songs.

Anyway, I took this a step further this weekend. I went and used my $200 Apple Store gift card and got a LaCie 500GB external hard drive and hooked it up to my Myth box. There's enough space there for about a year's worth of straight 128 kbps Radio Paradise MP3, so purely as an exercise, I set up my Myth box to save Radio Paradise to LaCie for me.

Turns out, it's not too hard to rip an internet radio stream with StreamRipper, which has a nice Linux CLI client. It will automatically split up the files and put the artist and title in the file name. Basically, it buffers the current song to an "incomplete" folder and saves it out when its done. As far as I can tell, it doesn't write any ID3 tags for you. It looks like you can set up rules and such in its configuration files, but I didn't want to dive into all that. Instead, I wrote a Ruby script that will
  1. Parse out the artist and title from the file name and write it to the MP3 using the handy id3lib-ruby library.
  2. Scrape Amazon for the album name and cover art, and again add those tags to the file.
  3. Move it to LaCie (symlinked at /home/greg/music).
Here's the code (syntax highlighting done with Spotlight):
 1 #!/usr/local/bin/ruby
2
3 require 'rubygems'
4 require 'id3lib'
5 require 'open-uri'
6
7 rip_dir = '/home/greg/ripstream/Radio_Paradise'
8 save_dir = '/home/greg/music'
9 global_genre = 'Eclectic Rock'
10
11 Dir.new(rip_dir).each do |file_name|
12 if file_name =~ /\.mp3$/ then
13 puts
14 puts "Processing #{file_name}"
15
16 file_path = rip_dir + '/' + file_name
17 tag = ID3Lib::Tag.new(file_path)
18 parts = file_name.split(/ \- /)
19
20 tag.artist = parts[0]
21 tag.title = parts[1].gsub(/\.mp3$/, '')
22 tag.genre = global_genre
23 tag.update!
24
25 puts "Artist: #{tag.artist}"
26 puts "Title: #{tag.title}"
27 puts "Genre: #{tag.genre}"
28
29 search_term = "#{tag.artist} #{tag.title}".gsub(/[^\w ]+/, '').gsub(/[ ]+/, '+')
30 results_page_url = "http://www.amazon.com/s/?field-keywords=#{search_term}"
31 results_page = ''
32 open(results_page_url) { |s| results_page = s.read }
33 results_page_match_data = /<a href="(.+?)"><span class="srTitle">(.+?)<\/span><\/a>/.match(results_page) if results_page.length > 0
34 if results_page_match_data then
35 tag.album = results_page_match_data[2]
36 tag.update!
37
38 puts "Album: #{tag.album}"
39
40 product_page_url = results_page_match_data[1]
41 product_page = ''
42 open(product_page_url) { |s| product_page = s.read }
43
44 product_page_match_data = /registerImage\(\"original_image\",.\"(.+?)"/.match(product_page) if product_page.length > 0
45 if product_page_match_data then
46 image_url = product_page_match_data[1]
47 if /\.jpe?g$/.match(image_url) then
48 tag << {
49 :id => :APIC,
50 :mimetype => 'image/jpeg',
51 :picturetype => 3,
52 :data => open(image_url).read
53 }
54 tag.update!
55
56 puts "Image URL: #{image_url}"
57 end
58 end
59 end
60
61 FileUtils.mv(file_path, save_dir, {:verbose => true})
62 end
63 end


I run StreamRipper all the time in a screen session and crontab this script to tag and move files once a day. I'll build up a nice collection in no time. The only annoyance is that StreamRipper seems to overshoot the end of the file sometimes. So many of the files start a few seconds into the song and likewise others play a few seconds of the next song that was played. However, this isn't that big of an issue because StreamRipper at least tags a sequence number in the "track number" frame of the MP3, so if you play them in order, it just melds together (and you can also appreciate Bill Goldsmith's artistic mixing). Also, there's probably some options to tune the StreamRipper configs to fix this.

Now I just need to get me one of them fancy new iPods that shows the album art, color and all.