Sunday, July 29, 2007

Last Sequel: Mutually Exclusive Radiobuttons in INamingContainer

If you are still bitten by the non-mutually exclusive radiobutton bug; and don't want to go the long way of creating your own custom radiobutton class, here is a quick and dirty way of achieving the same result by some simple javascript. The idea is to walk up the DOM chain on click of the radiobutton and uncheck the other radio buttons. The javascript works great for DataGrid, DataList and GridView controls, controls which spit out the final html as a table; and as with any javascript code, will only work if javascript is enabled; here's a working example and below is the page's source:

Thursday, July 26, 2007

Joke of the day

Once, there was a competition between the police departments of all countries to find out which country's department is the most efficient, the deal was that each police dept goes to the forest and tries to catch a lion, whoever catches the lion in shortest period of time; is the most efficient department of all. First, it's russian police's turn; 2 officers go into the forest and return after 5 mins with a lion tied; everyone is impressed by their efficiency...many other police departments try their luck but none is able to beat the 5 minutes record set by the Russians. Finally, it's the turn of LAPD; LAPD's officers go into the forest in search of the lion; tournament officials wait for their return; first minutes,than hours pass by, but the LAPD officers don't return. The tournament officials start getting worried and they go into the forest in search of the officers, hoping for the best but expecting the worst. Finally, they arrive at the scene where LAPD officers were beating a now half-dead bear; and shouting: "accept, you are lion!".
What's a joke, without any moral? Moral of the joke: You can't fit a square where a circle should be (not unless you are a policeman)! Guess, I would have learnt from this moral, but this has been my problem off-late, I am trying to push myself to start taking interest in things, which I know are not that important to me; trying to convince myself that this is the right thing to do, when I myself know that I am no policeman!

Sunday, July 22, 2007

We never stop working for you

I recently got my Verizon phone a/c disconnected, the customer support rep asked me if I wanted the a/c to be X'fred to somebody else instead of canceling it? And I told her smilingly, was that this number has been really "unlucky", so I don't think anybody would be interested. I remember when I came to the states couple of years back, I blindly chose Verizon as my service provider; not because of their exemplary service but because the in-network calls are free! Now that I think about it, I find it kind of funny how at times: our mind has its own reasoning and rationale behind everything that we do; we don't put any conscious effort in reasoning such things out, they just operate within the realms of our subconscious mind...perhaps, our subconscious mind knows a lot more about what we really yearn for inside.

Wednesday, July 18, 2007

Download Audio from esnips Bookmarklet

In case you are not interested in running a Process Monitor Tool and copying the media file from the temporary internet cache, I wrote a quick and dirty bookmarklet to download the media from within the browser itself. Installation of the bookmarklet is quite easy, make sure that the Bookmarks Toolbar is visible, drag the (below) link to the bookmark toolbar or right click on the link and select "Bookmark This Link" and select "Bookmark Toolbar" in the "Create In" dropdown. Once installed, once you are on a particular media file page on esnips; which you would like to download, just click on the bookmark link.

Fine Print: The bookmarklet is only meant for esnips.com and has only been tested on Firefox, I will try to test it out on IE7; once I log on to Vista sometime tomorrow morning.

The Bookmarklet:
(esnips)Download Media

Edit 7/19:
Tested it out on Vista using both Fx and IE7 and realized that due to the plugin, the media will start playing within the browser itself after using the bookmarklet. You can then either, use "Save Page As" from the file menu or use the below bookmarklet. This bookmarklet will add a "Download Media" link to the page just below the "Tags"; right click on this link and select "Save Target As..." on IE7 or "Save Link As" on Fx.



Doing a "Save Target As.."


The In-Place Bookmarklet:
(esnips)Add Download Link

Tuesday, July 17, 2007

Junk Muzica

You know you have lotsa junk songs on your portable music player, when you delete few of them by mistake and don't remember which ones you deleted. This is what happened to me today, I wanted to delete a playlist which had around 10 songs from my Zune, so I clicked on the playlist in the Zune Player and hit the delete button; the player was "smart" enough to figure out that if you want to delete a playlist, you would also want to delete the songs that are in the playlist and without any confirmation or message of any sorts, it went ahead and even removed the songs from the Zune and also removed the playlist from both my system and the Zune. I still have those songs on my system, but I don't think; I'll be able to figure out which songs were those unless one day I feel like listening to a particular only find it gone missing. I really hate it when software try to outsmart the user, a good software in my mind, is a software which doesn't try to "out-think" the end-user and perform (unwanted) actions on his behalf!

Morning Another Morning

It's been around a month since I left the states forever and came back, and I still haven't figured out what I need to do with my life. Sometimes, I feel I should just let it be, and let life take me where it will. I think the more important question for me is; what is that I want from my life now? What will make me feel happy and satisfied? I guess we all go through this phase in our life, where the same doubts complicate our minds; where we feel kind of run down and burned out...a phase when time flies but life stands still! Maybe, as of now there's nothing that I really love doing (lack of motivation plays a big part in that), and I'll end up bitching irrespective but then, life is not about what should be, or what could be. Sometimes, I wish I could fast forward my life by 10-20 years just to see where I'm headed. At least, one thing I am very sure about, I am gonna get there...where? Who knows, who cares, anyway?

Wednesday, July 11, 2007

Download audio from esnips

Without getting into the moral question about why would you want to download audio from esnips, here's how I've been doing, it's kind of crude but it works.

Tools required:

  • Windows Vista (or any other windows OS).
  • Firefox (or any other browser).
  • Windows Media Player 11 Plugin for Firefox (I guess any browser+plugin combination will work).
  • SysInternal's Microsoft's Process Monitor (or FileMon, if you are using Win XP).

    Steps:

  • Search for the audio on esnips, and click the preferred search result, the song should automatically start playing within the browser.


  • Once the song is being played in the browser via the plugin, start ProcessMonitor (or FileMon).
  • Set the filter in ProcMon to include the browser in the filtered list.


  • Voila! the path to the cached mp3 is there in list, browse to the temporary folder and copy the mp3 to a desired location on your system.

Friday, June 29, 2007

A Question of Balance

Quite a few people; including the ones who care, to the ones who really don't or shouldn't; have asked me what next i.e. what I'm gonna do from now on (this is one question that I've asked myself so often over the last years that I even thought of buying whatnext.com)? I still haven't figured out yet, and I don't want to jump into something in haste which doesn't interest me. All these years, relationship and sustaining the relationship was something which I was (the past tense is not by choice) passionate about, every decision of my life was filtered through my relationship and every thing which didn't matter to the relationship (including my day job) didn't matter to me; I was doing them just because I had to. Now that I have this window period, I want to make sure that I get involved in something which I can feel passionate about, something where I am not just doing it but also enjoying it....hopefully, I will figure out something soon enough.

Tuesday, June 26, 2007

Hot Indian Summer

It's been a week since I came back and since then have been experiencing the North Indian Summer at its peak; the last time I visited this part of my world during the summertime was about 4-5 years back, and the summers over here can be really hot and humid; with frequent power cuts adding to the woes. Anyway, am not complaining…it's an experience of its own kind! I want this window period where I am so called between jobs (in true sense, I am not between jobs as I don't have a job to move on to) to do some introspection and figure out what I really wanted to do with my life all along, I know the easiest way out is to do what I've been doing for past 6 years and find another "IT" job but then for past 2 years; I've been getting bored with my job very fast, either the quality of work has not been great or it's just me who isn't interested in doing the same stuff over and over again…but then, the biggest "issue" for now seems to be figuring out what I want to do.

Friday, June 22, 2007

Look Ma, no sound!

Ever since I upgraded Dapper to Edgy, I have this weird issue of no sound in Vista (yeah, I know it sounds kinda unrelated but this is what I've zeroed in on). The problem is if I boot into Vista after a previous session in Edgy, there's no sound in Vista at all and the only way to restore the sound back is to reboot the system, looks like Edgy updates certain register values of the sound card which Vista is not able to understand. I don't know whether the bug is with Vista or Edgy; but given how fast MS folks are at fixing the "bugs" due to incompatibility with other OS, I'll most probs submit a bug with Ubuntu folks. Edit: Submitted the bug on Launchpad, here is the bug link; in case you're interested: https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/121674

In other news, Vista also doesn't recognize my Pan-digital photo-frame; and I don't see any drivers for Vista on their site either.

Monday, June 18, 2007

June 18th, 5:30 PM

Sitting at the airport, about to board the flight to Delhi; listening to "Nights In White Satin" by Moody Blues and thinking about the last 3 years; it's been nearly 3 years since we met last; did I then think that it for next 3 years we won't even meet once? I don't know, maybe I did…today, are things according to my plans? Well, no…that's why I have stopped planning, things never go according to the plans, so the best is not to plan, at least that way you can blame yourself for not planning anything! Sometimes, I wonder is this a quarter-life crisis (I am not (maybe) old enough to have a mid life crisis, yet)? At times, I really am not sure where I want to head, what I want to do and I have no motivation to find out what is that I need at this point of time…at times, I feel I just letting my life drift away, and have this urgency to sort out things within myself and then at times, I feel life's gonna take me where it has to go, so there is no point in fighting it, let's just go with the flow. I guess too much thinking has really cluttered my mind, too much thinking about things that don't matter any longer to the ones who matter to me. Anyway, got to board in next 15 minutes; am I leaving nothing behind or am I leaving everything that defines me, behind?

A Sort Of Homecoming

Finally, I wound up everything and in another 6 hours will be catching a one-way flight back to India. It's been more than 2 years since I came to this country, hoping for the best; but expecting the worst and I can say now, that expectations always win over hope. Almost everyone has told me that it's a "bold/strong" decision or that I've lost my mind and other blahs but I don't really care: what's a rhyme or a reason; to a fool or a dreamer? I still haven't really figured out what I want to do once I go back, since I am going to be "jobless" and have no inclination as of now to find a new job in India, I know I need to think about something soon, you just can't sit at home and do nothing, when you are not sitting pretty on 1 million dollars in your bank account. Anyway, I remember somebody telling that I should save 5 grands and I made sure that in these two years I do save that much...money, never interested me anyway; perhaps, it has something to do with having Neptune in the second house in my birth chart! Lot of people also asked me, how do I feel about it? Honestly, I don't feel anything, maybe; the feeling is yet to sink in or maybe; I have spent so much of feelings/energies in the past; that I have run out of them. Will I ever return back? I will return no more; I will take my heart and let it fly....but then, if "somebody" needs me; I am with her, for her, always....

Wednesday, June 06, 2007

flickr & Popfly

I played a little with popfly to create a carousel stack of my images based on tag(s) from flickr, and well, had quite a few issues...firstly, the built in flickr block doesn't allow returning user images based on tag, so I ripped the flickr block and created mine. Had some issues with the block not allowing me to enter the flickr key for this block, so I hard-coded the key in the js file itself! The other thing is you can't pass querystrings to your mashup; so there is no way you can customize the mashup at runtime (well, in a way you can by using the user-input block; but that doesn't solve my problem). Anyway, creating the mashup was really straight-forward and given that popfly is in early alpha stages, I guess it will only get better.

Update 6/12: Played around with popfly a bit more and learnt quite a few things, which you might want to know:

  • There is no way to pass querystring parameters to a mashup currently, this means that the mashup cannot be dynamic w.o. requiring user input: this will be implemented in next release.

  • Some blocks like Carousel and Photo Sphere have rendering issues in fx and don't display at all on that browser: again something which will be fixed in next release

  • You cannot really "rip" a block which requires a developer key and extend it, or more generically, you cannot create a block which requires a developer key unless you are willing to hard-code your key in the javascript itself.


Here's the link to the mashup.

Tuesday, May 29, 2007

Weather update

Since past 3 years; I'd been thinking that one day I will write a post titled above, it's just that this post is going to be very different than what I'd hoped for then. Well, so the weather update is that I quit my job today; I had already decided and given hints on that couple of weeks back and this morning; I officially resigned. Now, that means I am going to be jobless as I don't have any other job opportunity; in fact I wasn't even looking for a new job. I have been feeling so burned out and run over that I think this break is something that I really need. These 3 years have left me emotionally and mentally drained off; where now; I don't have any motivation to achieve anything with my life. So, where I am headed? I wish I had the answer to such questions; there are few things that I always wished I could do; but responsibilities and living on the "materialistic" plane made sure that I was always skeptical to try them out. Now that I have nothing (left) to lose, I should very well give them a full go. Firstly, I have to write the book I promised Chhavi that I'll write, long time back: the book on us and our relationship. I don't know how many people will be interested in reading such a book; well; I don't even know whether she'll be interested in reading it now but I am still going to write it for whatever it's worth. Secondly, we always wanted to open a charitable organization for homeless children; I need to figure out the logistics for opening one: I know it's not easy to do fund-raising and sustaining such a organization but at least I can give it my best.
When I look back at the last 3 years that I've spent of my life; I have no regrets that I tried so much; that I spent all my energy on just one person; in having her back in my life; she deserved every little thing that I did for her if not more. Ever since I was a kid, I always dreamed about having that one person in my life; who understood what it means to be me; for whom I didn't have to change myself, in front of whom; I was equally comfortable laughing and crying. One person, in whom I saw a part of me: a part of me that was always missing in my life, a part which made me complete. I don't care who was right or wrong, in a relationship it doesn't matter who was right; it's just whether you're together or not; whether you get to share your dreams and pains with each other or not. I know all through my life, she will be the missing bit in me; a part which will again make me whole but then somethings are not meant to be...

Friday, May 25, 2007

Lightbox and google maps

I've been very infrequent in updating my Google Maps prototype; had been thinking of improving the image transitions that I use on the slideshow for a long time, but lack of motivation ensured that I only updated it last weekend. Rather than writing something on my own, I updated the Phatfusion's version of slimbox to play well with my code. Next set of "upgrade" includes, adding a location search box and restoring the randomness of flickr images. In case you are interested with how the prototype was implemented, most of the grunt work is done in two js files: functions.js and images.js; & I guess they are easy enough to follow; the only server side code is for MapPoint and wrappers around flickr and fotolia to avoid xss issues.

Wednesday, May 23, 2007

Y! Mail

In my last post, I mentioned how spam is ending up in my Y! Inbox and though; no matter how much it sucks; I prefer that over false positives (where legit mails end up in your bulk folder). Well, just couple of days back; I had a legit mail delivered to my Bulk Folder and today, somebody told me that he didn't reply back to my mail earlier because it was delivered to his bulk folder! Now, this is something which is completely unacceptable (yes, I know I get what I pay for but remember, free email is a very competitive area with gmail, aol, live mail and yahoo! fighting it out); it's unacceptable because it creates doubt in the mind of sender; I don't know for sure whether the mail that I just sent will be delivered to the recipient where he has a chance to read it. Remember, mails delivered to bulk folder don't bounce back to the sender; so there is no way for sender to know what happened to his mail once he hits the "send" button; and I am not going to call every person whom I mailed asking for an ACK (well, that very much defeats the purpose of emails anyway). Maybe, I am tech-savvy enough not to rely on Yahoo! Spam filters and check my bulk folder regularly; but how many of my recipients check their bulk folders? So, one thing's for sure, every time I send an email, I would always wonder; did it get to the recipient? A not so pleasant situation to be in! Yahoo, please get your act together, you've been my primary email provider for last 12 years and I don't want to change that!

Thursday, May 17, 2007

Liar! Liar!

Disclaimer: This post is another one about life and the way we live it and there is tons of unstrung thoughts of asymptotic nature. If you're not interested in reading philosophical musings of a 29 year old, you might want to stop reading now.

There are so many times when we lie about something, either we lie to somebody or unfortunately, we lie to ourselves. The lies could be as small as lying to our parents about how the toy was broken when we were kids or as profound as lying to make someone else's day; and then there are lies; which we tell ourselves; so that we can convince ourselves that the decision that we don't want to make but have to make; is what makes sense. We come up with so many "practical reasons" just to convince ourselves, even though those "practical reasons" don't actually mean anything to us; we try to validate our new found "practical reasoning" abilities by throwing our reasons at different people; where all the while we are only interested in finding one listener, who tells us that no your "reasons" don't make any sense; then we can do what we really wanted to do, deep inside. Sometimes, we lie to others about why we took a particular decision, we again come up with those "practical reasons" which don't mean anything to us; so that people cannot find "flaws" with our decisions cause we know that they can't understand what it means to be us.


Y! Mail Spam

I am just about done with the amount of spams that is slipping through the Y! Mail Spam System. I get around 5-6 spams in my Inbox every day (given that I only get about 10 mails in a day, the signal to noise ratio is really poor), I do agree that this is a lot better than what used to happen with Y! Mail earlier; when even legit emails would end up in Bulk folder but still Yahoo! needs to get its act together. I don't want to win Million Dollar lotteries every day!

Sunday, May 13, 2007

Smoking kills...

Whenever someone asks me why don't I quit smoking, I just tell them:

Once upon a time; I had a reason to smoke,
today; I don't have a reason to quit.

Past perfect, future tense

Almost everyone knows how much I love The Moody Blues; and when someone told me that they will be touring in July; they expected it's one show that I won't miss. The fact is; Moody Blues is a band, I won't even mind traveling miles; just to see them live. But then I said no; I've come to realize that in life it's not the activity that matters but the person who you can share it with; that matters. Once upon a time, I would just be at home and talk on phone for hours and still find that life is so beautiful and now even doing things that I "love" doesn't get me involved. Sometimes, I wonder can people really forget their past; a past that they only created, a past that was so beautiful; if they can; then why can't I? If no, then why do they pretend that there is no one they left behind? Someone; who you would like to share all the beautiful moments of your life with, wasn't it the same "someone"; who made the life beautiful at first place? Perhaps, I'm too old to search for answers to such jigsaw puzzles of life...and yes, I will never see Moody Blues live ever.