Saturday, November 20, 2010

Scrobbling now from Kobol :)

In case you know about scrobbling and wondering what the hell is Kobol, well its a app that I created over the last weekend and named it such 'coz it just has such a nice ring to it. :) In case you are not familiar with BSG, its a planet in BSG world, so its something like saying 'scrobbling now from Krypton/Moon etc' :)

Its a rare thing for the lazy me to go create stuff like this, mainly 'coz -
  1. I'm lazy
  2. It should excite me a lot or should be a really very serious itch to overcome 1.
Last time it happened was while scratching my support for pidgin itch. In this case, it wasn't exactly my itch but rather my friend's itch that began it all.

Now my friend is what you call as a 'purist' and considers me as some sort of expert(mainly 'coz I introduced it to him I think). And so a month or two back he asks me -
'Playing your own library is fine but the songs get repetitive after a while, so how do I get to play more songs from the same artists and not any others'.
If you are not a subscriber, then you would know that there is very limited radios that you can listen to. You can listen to your library radio or similar artists radio etc but there is no way you can just listen to a selected artist radio i.e songs from only that artist and not from any other. And since my purist friend didn't want to corrupt his library by listening to other radios, I suggested to use we7 or spotify which have scrobbling integrated. But they turned out to be UK only services, some consolation win for us UK folks denied of Pandora! :)

Well anyway it was then that the evil idea stuck me, 'All you need to get songs in your library is to just scrobble them and to scrobble all you need is artist and track name, so effectively all you need is a program that scrobbles from such a file'. Sadly my friend didn't want to code and so I forgot all about it, as it wasn't my itch after all!

Which made me revisit that idea. One of the unpleasant tasks involved in the above idea is in creating the actual tracks file, where to get the data, who will copy paste etc. But then I saw Google Refine videos and I was like 'wow'! And I thought with the freebase integration it just takes matter of few clicks to create the artist-tracks file you want! Since I wanted to try out Google Refine, thought why not go ahead and implement that program after all, that way I too can get new artists that I wanted to listen to into my library ;) And while I was at it thought why not learn some basic python as well and thats how it started!

Soon after I started, I hit limitations in freebase, for one thing the artist names in Freebase weren't a perfect match with ones in Also I couldn't figure out a way to get albums by an artist and tracks in that album, which was what had excited me in first place. Maybe I just needed to dig into the refine documentation a bit more but I was already bored.

So I just created a script that fetches the top tracks of a given artist from and writes to a csv. And you feed this csv to the other script which scrobbles the tracks in the csv. Now if anyone can find a good way to fetch the albums of an artist as well and the tracks in that album that will be brilliant!

If you are interested in scrobbling from a file, to listen to new artists or just to increase your scrobble count, then you can get the scripts here and . Only thing you need to do is obtain your own unique API_KEY and API_SECRET values from and replace the sample values in the script.

Since its from Kobol, this post has to end with

'so say we all'

Tuesday, September 21, 2010

Importance of being (Computer)Earnest

Now its been more than 2yrs since i posted something on this blog and sometime since i blogged, so to say I've forgotten how to write may not be too much off the mark, not that I knew how to write/blog in first place! :)

Well the ground-moving event that made me blog is something that happened today, that made me thankful for the first time for being a slightly knowledgeable person about computers. :)
The ubiquitous net decided to make a rare disappearing act today morning. And I had somehow associated such things to happen only in Third World countries, where I had lived all my life and to find such a thing happening in the First World was very surprising indeed! It got more surprising when i saw that Skype alone seemed to work, when all else was failing. That led me to conclude the problem was with BT's DNS servers. After the quick diagnosis, i knew i could vpn and use company's DNS servers and get connected to the net. So i get the vpn ip address from colleague via 'Skype - The Life Savior!' but for some reason my ipsec vpn decides to stop working then! :( So there i was still without connection to net.

Then /me thinks, this is 1st world after all, BT customer care should resolve this soon enough, so I get google IP from colleague, search for the BT customer support number and give them a call. And then i go through the longest call I've ever been put on hold - a record 30mins! even ICICIBank never did that to me back home! Well anyways as expected the call didn't yield much results, i was told many others are also seeing the same problem and it would be resolved in 24Hrs!

So i was back to square one. Then i ping another colleague, get the DNS server's ip directly, which i put in resolv.conf and lo internet works again! Its a wonderful feeling when you know only you have the net working when others don't just because you happen to have slightly more computer knowledge than the normal people. My Doctor hubby was suitably impressed when he couldn't connect to net from his laptop, when i could from mine. :D

Anyways that led me to start wondering why we don't have a on-disk DNS cache. I know its a very remote chance of my kind of scenario happening, plus it doesn't make any sense for mobile users, where the nearest DNS keeps changing. But for a home-desktop user wouldn't this make sense? Imagine if there was some option to cache the most used DNS entries, I wouldn't even have noticed that net was down. And by the way thats what happened with my iPhone, where i could access gmail, facebook everything, as it was using the cached DNS resolutions to connect.
So thats about it, until another such ground-moving event happens,

Wednesday, July 02, 2008


UI = (you) Vs (i)

Its pretty obvious ain't it? All the times it ends up being what design 'you' the developer thinks of(if at all one bothers to think, as there are many UI examples out there pointing to the contrary) Vs what 'i' the user needs. And when both coincide, you get some amazing products. Example that immediately comes to mind when you say good UI?
Apple of course. iPod, you notice the 'i' there? its no coincidence, its there to show that emphasis is on 'i' the user. (Ok, i just made up that last part, but i think the Apple guys did name it, with that in mind ;) ).

Other good UI examples would be Google(gmail, gtalk, reader), Gnome's SLAB Menu, Flock al.
And bad UI examples...well here's a nice comic which gives you an idea. :)

Beauty in simplicity. We know that. But still many of us choose to ignore the KISS principle! Why? Maybe that, all those years of education, robbed us of the ability to think simple. Or as they say, maybe its the case of being afflicted with 'improve beyond use' syndrome.

On a side note: was searching for a Blogger link in Gmail in the quick links section at top left corner in Gmail and found a 'Blogs' in the more section but surprise!surprise! it leads to Blog Search and not blogger! When Photos,Reader,Orkut links take me to my Picasa,Google Reader and Orkut page respectively, isn't it reasonable to expect Blogs to take me to my blogger page?
Wonder when Google will correct this.

Sunday, June 08, 2008


He he, this basically nullifies my previous post. :)
Slam No. 4 for Rafa and man did he make it look like a cake walk! :D
Before the start of the match i was feeling sad that i wouldn't be able to watch the entire match as i had to attend 10 'o clock show of '21' @ Inox. But then quickly realized i didn't have any cause for it. Thanks to Rafa, no its more thanks to Federer for finishing it in just 108 minutes. :) So all those people who were just waiting to proclaim Federer as the greatest ever, wait for one more year at least, if not forever... :P

'21' was not as good as i thought it would be. Come on you can depict Vegas much better than that! . And you can so do away with all that hollywoodization, the cliched 'best friends ignored' track, soppy romantic track, jealousy...i mean why introduce a 5-10min plot line just for heck of it? Well don't mind, it was quite an enjoyable movie, but the problem for me was that there was no freshness about it, apart from the basic plot.

As result of watching '21', i missed F1 :( I reached home just when press conference had started and to see Kubica, Heidfield and Coultard was shocking to say the least. I did see the pit-lane mishap recap but somehow can't help feeling that i missed out on some good live action.

'n yea, now Germany beat Poland. :)

On a side-note i finally managed to read 'Hobbit' today. :) The decision to read it was rekindled by the LOTR dvds 've been watching these days. Its this boxed set, with 4 dvd's per each part so 12 in all. Any serious LoTR fan should possess this. :)
The making i.e the Appendices part though long(2 dvds per each part) is amazing. While watching that today morning, my Dad remarked if i was planning to go into film-making and man do i wish that i was part of it! :)

Anyways sleep beckons,

Friday, May 23, 2008

tough draw?

Youzhny, Nalbandian, Djokovic and Federer.
Thats how Nadal's route to French Open title will look, i.e of course if others mentioned don't lose before.

But not much of that happening to Federer who has been blessed with almost a free ride to the final, with only worthwhile opponents he may meet before being David Ferrer in Semi-finals. Actually even his is slightly better compared to Djokovic, who has a walk in the park.

Contrast that with Nadal's, tough draw gets a whole new meaning. Murray, Youzhny, Nalbandian! So even if Djokovic doesn't finish him off in semi-finals, he will ensure Federer will have a complete worn-out Nadal to pick off. Unless of course Nadal plays exceptionally brilliant to win all the before matches in 3 sets. In which case one may say he still has a chance. But what are the chances of that happening? What with he not being at his physical best, suffering from a hamstring injury that he got while defeating Federer at Hamburg last week.

But wouldn't it be just brilliant if with all that somehow he manages to retain the title? And stay undefeated at the Roland Garros. That i think would be amazing, if through the entire career one can stay undefeated at a Grand Slam. I'm not aware if anyone has done it before?

Anyways thats a dream, what with fate almost conspiring that it never happens, with the draw and the injury.

Friday, May 16, 2008

few linux pains....

Yesterday i was trying to get microphone working on my opensuse 10.3 box, with Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller soundcard. And this post is about the pains i encountered during it.
After running alsaconf, 'n messing around with alsamixer settings for some time, realized it wasn't going to be such an easy job. Then tried the YaST sound, but even after much permutations/combinations with soundcard parameters that google threw up, it failed to configure. So after some more googling, failed to give any concrete solution, thought let me upgrade alsa.
And thats when my troubles started or so i think it did, since 'm not still aware what is the root cause.
> downloaded all the alsa-10.6 packages from the website.
> configure, make and install goes through without an itch
> reboot
> I try logging in and lo it throws up the usual gnome error box of 'your session lasted less than 10s, if you haven't logged out yourself...blah...blah'.

Clicking on the details, gave me some sabayon failures in the log which didn't make any sense to me. So after googling and asking around few colleagues, came to know sabayon can be safely removed without doing much harm. Wait i forgot to mention, before you think that i was stuck to command line, there is a surprise, when i tried root or any other user, the log-in went through just fine. So me was left scratching my head, as what could be the problem, since if it was alsa, i think everything should've cribbed right?
Well anyways so removed sabayon 'n the gnome_admin which depended on sabayon, (btw its interesting what all you learn, 'coz of this i came to know there's something called these two, 'n they take care of user profiles 'n such). And anyone would be forgiven to think it would work after this, but life is never so it? So the sabayon errors go, but the log-in still fails. And now 'm at wits end, as it doesn't even hint at whats the problem.
And this is the account which had all my development environment, music, mail, browser, compiz fusion settings...everything. Now importing all those profiles into a new user acc...not a job one would fancy.
So was trying to think of easier way out, so then since it looked like some issue with user profile, thought if i create a new user and point the home directory to this, it should work. Wishful thinking. :( Didn't make any difference except waste my time. And all this happened yesterday night, so today morning thought no point wasting more of my time, so did what i should've done longtime back, copied the data, profiles etc.

But the issue still remains and can't even file a bug, as i don't know what to file against. Not knowing whats the issue seriously pains. So now 'm throwing it up as an open challenge, so if there is someone who can't resist such a puzzling one - solution, pointers to solution, debugging...nething is most welcome :).

'n here's the very detailed informative message i get -
/etc/X11/xim: Checking whether an input method should be started.
/etc/X11/xim: user environment variable LANG=en_US.UTF-8
sourcing /etc/sysconfig/language to get the value of INPUT_METHOD
INPUT_METHOD is not set or empty (no user selected input method).
Trying to start a default input method for the locale en_US.UTF-8 ...
There is no default input method for the current locale.

'n btw before there used to be sabayon error messages between the default input and SESSION_MANAGER lines.

'n yea, the whole reason this whole thing started - microphone, i just checked it is working. But it hadn't when i checked last night, life mysteries what can i say...

Tuesday, May 06, 2008

Share with a note

what a nice surprise i had just a few minutes back!
I finally get to see the feature i wanted since i started using google reader! :)
more specifically just beside the 'Share', you now see a 'Share with note'. Ain't that cool?
Whenever i shared an item before, I always wished there was a way to share my views/thoughts on it...ain't that the whole point of sharing? :)
But yea now you can! :D

Pls: Whats pending is the ability to have discussions, which i believe is coming soon. :)