Monday, February 19, 2007

Yahoo! Pipes

I'd been using doggdot.us feeds to get one consolidated feed for slashdot, digg and del.icio.us popular bookmarks, one of the main usp of doggdot.us feeds being direct link for digg stories instead of the landing page of digg (I'd consider digg's page to be a landing page given the very poor signal to noise ratio of the comments on digg). But since all good things must come to an end, doggdot.us decided to drop direct links and started using digg's landing page as RSS url. I couldn't find anything on their site which suggested this change and I hope it's something temporary. Anyway, now that doggdot.us feed is broken, and that I hate subscribing to digg's own feed, I searched for a feed which would provide a digg feed with direct links, a simple google search and I found a customized feed for digg with direct links to the story dugg. Using Yahoo! Pipes, combining the three feeds to get doggdot.us functionality was easy, all I had to use was the union and the sort operator.

The big small thing...

Last weekend on my way back from Long Island, the TSA agent asked me to throw away all the liquid that was carrying in my carry-on (quite crazy as nobody asked me anything on my way to Long Island), which included one more than half empty Adidas perfume and another small Vaseline moisturizer. I didn't care about the perfume but I felt kind of sad that I had to let go of the moisturizer bottle (not the moisturizer), it was the bottle that had been with me for more than 4 years, I'd always fill it and carry it with me on short trips and though quite silly, I'd become attached to it. I tried my best trying to convince the TSA agents so that I don't have to throw it away but then I let it go. I felt strange inside, as if the bottle meant a world to me, there are so many small things that make such a big difference in our lives, we wait for big things to happen though it's the things that we do everyday and the small but precious (at least to us) things that happen around us that make all the difference.

Thursday, February 15, 2007

Piping the output to a variable in cmd

Some time back I had written that in Batch Files on XP there is no way to assign a variable to the output of some program/batch file, I was incorrect...there is a very convoluted way of doing it using FOR.
Let's say we want to get the names of all services hosted by svchost which has a memory usage of more than some MB:

FOR /F "tokens=*" %i IN ('tasklist /nh /FI "Memusage ge 10000"^|gawk "/svchost.exe/ {print $2}"') DO @echo %i| tasklist /nh /SVC /FI "PID eq %i"

The pipe needs to be escaped by ^; tokens=* means get the entire line and gawk is from unxutils. Before you start thinking how cool this particular example is or how dumb I am, you might want to know that this could have been achieved by just using one command (the example was just to show that you can pipe an output to a variable):

tasklist /SVC /FI "Memusage ge 10000"

Wednesday, February 14, 2007

The theory of reincarnation

Preamble: Most of this post is from the comments that I wrote on Sumit's review on the book "Coming Back: The Science of Reincarnation". Since, I kind of liked the comments that I wrote, I decided to string them together as a post.

The question that I asked was how do you define reincarnation, if soul and mind are indestructible, how can they be reincarnated (be born again)? Isn’t time and our three-dimensional linear perception of time (present, past and future) an illusion? Since there is no way to differentiate "past life (lives)" and "future life" without having a reference point of time to begin with, doesn’t the theory of reincarnation itself stand moot? Classical science is all about experimentation and observation in the space-time continuum and hence it can't explain something that is not bound by that. Re-incarnation or for that matter most of meta physics operate on the ketheric plane (a.k.a. the sahasrara/crown chakra or the higher mind) which is outside the physical body. The only thing that is destroyed with our linear perception of time is the physical plane that we live in(or the chakras that operate within our body), the point of reincarnation doesn’t even arise; you can’t reincarnate something which was never destroyed to begin with.

So then what is reincarnation? Reincarnation is the manifestation of the higher mind by (re)connecting with the lower mind (physical plane). Actually, the connection always happens the other way round, the lower mind has to (re)connect with the higher mind.
Reincarnation (based on above definition) in some form or the other does happen and we all go through it (it’s just that most of us don’t experience it as we are disconnected from our higher mind). Our life learnings (we are all here to learn) can be broken into two categories: 1) Growth, 2) Evolution.
We grow by learning something new everyday or learning the same thing in a new way, this learning lasts a lifetime and is associated with lower mind. But then, there are certain pieces of puzzle that we just can’t solve no matter how much we try, dots that we just can’t connect, wounds that we just can’t heal, this is the learning process of our higher mind and this is how our higher mind evolves and since the higher mind is not bound by space-time, it can obviously span lifetimes.

Trivia: astrologically, the evolution process is associated with the Moon’s Node (Rahu and Ketu). Looking at the moon’s node placement (by house and by sign) one can find the lessons that we need to learn in this life-time...more on that later.

Monday, February 12, 2007

as the hair fell down...

You know that you've long hair when strangers start looking at your not-so-old pictures and comment that you don't look the same, this has happened to me twice recently: once I was told by my old Apartment manager when I'd managed to lock myself out and then by a TSA agent. I indeed have quite long hair these days, it's been more than a year since I got them chopped; I don't know why I have been growing them though, perhaps one more of the silly things that I do so often.

Thursday, February 08, 2007

Vista Experience - II


[Contd from here...]The first thing that I noticed after installing Vista on my laptop was that it was hot (no, not Vista but the laptop), the hard disk seemed to always spin and a quick temperature check with SpeedFan showed my hard disk was running at around 55o C (generally hdds are rated to operate between 40-55 C). I checked with someone who has been running Vista on a "high-end" laptop and found out that his disk's temperature was around 43, so it was definitely something to do with my system, first I felt it was maybe due to the Search indexer trying to index the existing data (I had around 20 GB worth) or because the disk itself was brand new, anyway, since I had no inclination to either fry eggs on my laptop or fry my hard disk, I got myself a cooling pad and since then the temperature hovers around 43-47, which I guess is acceptable. Anyway, back to my impression of Vista, the UI is really polished even without the Aero interface, the new icons are a welcome change and quite a few small niceties thrown in here and there, looks like the attention was indeed on getting the small things right. Two big features touted in Vista (apart from the eye candy) are the Instant Search and the Side bar gadgets, honestly, I've never found any use for gadgets on desktops, how many times do you look at the desktop while you're at your system?
During XP days the only Konfabulator gadget (widget) that I would run was the "Calendar", since on Limited User Account the date time widget on XP doesn't even display the calendar, since, that's been done away with in Vista, the first thing that I did was turn off side bar and gadgets. Search is definitely good and quite responsive, though again I don't have much use for it, I tend to remember where I file stuff and generally find them without much hassle. Other things that have improved quite a bit are task manager, the ActiveSync (a.k.a. Mobile Sync center).



All hasn't been that rosy though with Vista for me, firstly the external hard disk enclosure that I got for my internal hard disk doesn't seem to work with Vista, it's detected but well no drive letters show up in explorer for the drive (it does work with XP still, I tried on some other system just to make sure that I didn't get the connector wrong again!). The other thing was after getting the cooling pad, I wanted to see how my hard disk behaves under process intensive applications, so I popped in a DVD of The Moody Blues, CyberLink PowerDVD auto-started and well, crashed with a very helpful OK button and no error message, tried playing the DVD in Win Media Player, and it refused to play the DVD suggesting that I reduce my system resolution and/or Color Depth, changing either of them didn't have any effect whatsoever: Media Player kept on refusing and PowerDVD kept on insisting that I decipher the error with just a OK button and no message (to be just to PowerDVD, the version that I was using was one which came with XP and was retained during the upgrade). Couple of google searches later, I figured out that Vista Business along with Home Basic don't come with DVD codecs (neither did any versions of XP for that matter), so that's my Media Player wasn't able to play the DVD (again the different error would have helped a lot) and CyberLink had released a Vista version of PowerDVD for which you are supposed to contact customer support, anyway, one good thing about Vista (and for that matter even XP) is they allow you to run misbehaving applications by running them under compatibility mode; just right click on the app, select compatibility tab and choose Run Under XP (SP 2) to run in compatibility mode, at least that fixed my PowerDVD and DVD played without any jitters after that.

Final words: Vista is a positive move forward by Microsoft and has some nice stuff; would I recommend buying a Vista off the shelf? no, I guess the best time to get Vista is when you're planning to buy a new system (or maybe if you have a relatively new system with good horse-power, you might want to wait for sometime and get a Vista upgrade after Vista SP1 is released), XP, even though not as polished as Vista gets the job done and I don't think it makes much sense to shell out some hard earned cash just to get bleeding/cutting edge technology, well that is, unless you're a hard core tech who loves playing with technology.

Tuesday, February 06, 2007

Vista Experience


I recently participated in the Microsoft's Viral Marketing campaign: Power Together, which got me a free DVD of Vista Business Edition. Honestly, I wouldn't have bought Vista and installed it on my system as I was quite happy with XP but given that I got the free DVD made me feel a lot more tempted, so I finally decided to install Vista as a weekend project. Unfortunately, my laptop was bought about 1.5 years back and came shipped with a 40 GB hard-disk and a built in (*gasp*) 32 MB ATI Radeon Graphic card (along with a 1 GB RAM and 1.8 Intel Dothan M Processor), given that Vista requires at least 128 MB of dedicated VRAM for its Aero interface, I had no choice but to live without it. The other issue that my laptop had was; I have a tri-partitioned (actually 4) hard disk with a dual boot between XP and Linux, with a 27 GB (about 6 GB free space) NTFS partition, a 6 GB EX3 partition and a 3 GB Fat32 Dell System Restore partition. Since Vista requires a minimum of 40 GB hard disk and 15 GB of free space for installation, I figured out I can't install Vista without upgrading my hard disk.
I searched around the net for some decent and *cheap* hard disks and finally settled on a 40 GB, 5400 RPM Samsung, since the biggest pain with upgrading your hard disks is having to re-install every program again on the new hard disk (and in my case even Linux), I felt the easiest that I could do would be to ghost my existing hard disk onto the new one and then do a upgrade on XP to Vista (even though every one whom I talked to suggested that a clean install is recommended, I just didn't have that much patience). I searched for some ghosting/cloning tools, I even created a wiki for changing the hard disk and cloning (update: links removed to the wiki; unfortunately the free phpnet.us wiki that I was using seems to have been deleted & the links were redirecting to a parked page), so that I don't miss any of the steps involved (different story I still missed one of the steps, more on that later). With the new hard disk and a USB enclosure in my hand, I started with the cloning business using Partition Magic, and after about 3 hours of frustration, I gave up on Partition Magic which for some reason would crash while trying to copy my ex3 partition with a very helpful error message: "#21, Invalid Handle or out of handles" (which is kinda ironic given that I'd created the ex3 partition using the same tool)! So, I only could copy my NTFS partition and expand it to 44 GB. Then, I used GParted's live CD to copy over my other 2 partitions and that went like a charm. I also, deleted my Dell's hidden partition and created a fresh 4 GB Fat32 partition so that I can use that to access files from both Vista and Linux. After the cloning was over, I swapped my hard disks, just took me around 5 minutes and I booted up my system, which gave me a message saying no bootable devices found. I thought that maybe copying over the hard disk doesn't copy the MBR, so I inserted the GParted to see whether that detects my new hard disk and well, neither did it...I take out the hard disk again, check the screws and put it back in bay and power it on again and well still no luck! Just then a thought struck me as to how dumb I'd been, I didn't remove the connector from my older hard disk and put it on the newer one (even though I've that step bolded!), put the connector on the new hard disk and booted again and viola it booted right into XP (which makes me believe that Partition Magic does some kinda jugglery and writes to the MBR if you're trying to clone a bootable partition).

Next step: I uninstalled the applications on my XP that are not compatible with Vista (Norton AV, Private Folder), pop in the Vista Install DVD and couple of hassle-less hours and reboots later I have the shiny new Vista (well again, without the Aero) installed. So definitely a plus point to Vista for having a near flawless install, I'll sum up my experience with the new OS in some other post but at least till date I've found Vista to be more responsive and faster on my laptop than XP.

Tuesday, January 30, 2007

29 Day after

I'll turn 29 day after, well that means one more year left before I touch 30; the year at which I feel you can no longer call yourself young. Looking back at the last year, it was a forgettable year, maybe even more than 2005. I realize that I have lots of questions to answer to myself, lots of decisions to make (given the state of my current life I don't think there are too many choices when it comes to making decisions), off-late I've been letting my life drift away, allowing it to make all the decisions for me and I've been just meandering along. Sometimes the harder we try to hold on to something, the more it eludes us, it reminds me of that saying about trying to hold the sand in our palm; the tighter we close our fists, the more we try not letting it go, the more it slips through the cracks. Maybe, we are just not supposed to hold on to something as if it was ours, maybe we are not supposed to live our life knowing that there's always someone whom we can run to when we are feeling burnt out and outright dejected, maybe we are not supposed to take someone's material presence for granted, heck, we are not supposed to take anything for granted. Isn't life all about sharing? Isn't it all about sharing your ups and downs with someone who understands what it means to be you, and why you chose to be the person you are? Would you rather have someone with whom you can share your dreams with, someone who will put up with you and your eccentric ways and still love you or would you rather have all the riches and fame of the world? I know we draw people in our lives and at times when we need to learn something and they go away once our learning is complete, but what's the point of learning when you can't run to the person who taught you and tell them victoriously that you've learnt and learnt well? If you are reading this post and have someone who's been with you through your thick and thins, give them a hug and tell them how much it means to you to have them in your life, do it tonight cause tomorrow might just be too late.

Friday, January 19, 2007

Zune: A Review


Now that I've played around with Zune long enough, I think I can write about its virtues & vices quite confidently. While reading this please keep in mind that the review is written from my perspective, things that I *think* are must-haves for a PMP v/s things that I think are *nice-to-haves*. Anyway, without any further ado here it comes:

I don't care too much about how something is boxed, so I won't delve into that at all. The s/w installation was pretty much painless though I did find it rather weird that the first thing the installer did was to check for updates and download them! As a general rule of thumb if I get something new, I want to use it now (and I guess that's pretty much true for almost everyone), so having to wait till a 30MB something patch is downloaded is definitely not on. Zune doesn't have the shiny look like the iPod and looks a lot more retro, so if you really care about how your player looks like and that's the must-have for you, iPod is a better pick, I'm in no way implying that Zune looks ugly (even the brown one for that matter) but iPod with it's shiny metallic sheen wins over Zune in aesthetics and looks (when the players are switched off). Now comes the fun part, once you power on Zune, the large screen grows on you, and Zune comes with some pre-loaded indie content which you can play without having to sync' it to your system library. And that brings us to the most painful experience of mine with Zune but I guess I'd quite a uncommon setup: installation of Zune requires admin privileges (quite obvious) but I run my Windows under a Limited User Account, so to install Zune I had to login as an admin and during the process it asked me to connect the Zune and asked me some questions about setting up a MarketPlace (online store) account etc. Once the installation was complete and I logged in back as the normal user and plugged in Zune, it told me that I've already associated my player with another system (basically another user account on the same system) so I had two choices (if you can call them choices, btw, can you just have one choice?), either connect as a guest or remove the existing media from Zune and create a new partnership, since I had to create the new partnership, I deleted the existing media and in the process lost all the pre-loaded content. Now, to the synchronization bit: another one of my peculiar situation, I've a dual partitioned 40GB HDD on my system; so I only keep a subset of my music on the hard-disk, the rest is on my iRiver. I plugged in my iRiver and added the root folder(my iRiver is a UMS drive, which basically means it acts as an external drive when you plug it in) to my Zune library (which automatically picked *My Music* folder on my local disk); and any attempts to remove the local *My Music* folder from the library proved to be futile, Zune s/w would keep on adding the folder behind my back! The syncing was quite fast which you would expect given both of my external drives were connected via USB 2.0. So once the player was loaded with my library, I gave it a whirl and that's where Zune is at its best, playing media on the device. The screen is large and vibrant, the firmware pretty slick and responsive and quite crisp and loud music. I think the biggest usp for the Zune is its large display and the prominent album-art. Another nice-to-have is the built in FM receiver, I've read a lot of people online talking about who needs a FM anyway? well, maybe I'm from old school but barring the commercials; FM channels are generally nice way of discovering new music and the surprise element about which song's gonna be played next adds even more to the fun. The good bit about Zune FM receiver is it also displays the artist/song information that is being played (provided the channel is broadcasting those information) so you are not left wondering about the song that you just listened to. I can't write much about the video capabilities of the player as I haven't watched any video on it! Most of the videos are on my iRiver PMP which supports a much higher resolution than the iPod or the Zune and suppots xvid/divx codecs. The picture viewer is quite nice and it automatically flips the screen orienation to landscape giving you a bigger real-estate. By the way, MS touted wireless as their usp for Zune, if you're planning to get Zune because of its wireless capabilities don't even think about it, the wireless is useless in its current avatar and most probs you will turn it off permanently to save some battery juice. All in all, I guess Zune s/w has quite a few rough edges (minor quirks albeit sometimes frustrating ones) but the player is really nice! Accessories wise even though iPod has more partners than Zune, Zune almost has all the accessories you would really care about (for me the biggest pet peeve with my iRiver was the lack of a wireless remote!)
So would I recommend Zune to someone over iPod? Well, if I am not desperate to get a media player I would rather wait for Zune 2.0 or the next-gen (touch?) iPod. Zune also lacks quite a few additional frills that are part of iPod (which don't matter to me) like a clock, a contact list, an alarm and direct podcast support (if you're into podcasting you can try the freebie called FeedYourZune) etc etc., in its current state Zune does best at what it is supposed to do: playing media (audio, FM).

Sunday, January 14, 2007

Popping the first line from a file

Another trivial issue, how do you remove the first line (pop) of a file and read it's contents in a variable. Here's what I did:

head -1 somefile > sometempfile
set /p var=<sometempfile
echo %var%
tail +2 somefile > sometempfile
mv -f sometempfile somefile

I could have also used sed instead of head & tail, it would have been something like:

sed -n "1,1p" somefile (instead of head -1)
sed "1,1d" somefile > somotherfile (instead of tail +2)

The temporary file is required in XP for setting the variable value, cause XP batch files don't allow setting the variable to the output of another command, which is kind of lame!

Saturday, January 13, 2007

Getting contents of a file till some text

Some time back, I wanted to parse a web page to get some images from it (as part of my album art fixer), instead of writing a full blown c# application for it I decided I'll use do some QnD hack using linux shell commands (I use unxutils on windows). Retrieving the web page was easy using wget, I'd already done it for retrieving "A Brief History on Time". The problem was that I was only interested in parsing the file till some particular text, i.e. I wanted to ignore nearly half of the file. I tried sed but couldn't find anything working, so ended up doing it the long way by using grep, cut and head, something like:
<snip>

set var=
fgrep -i -n "ignore from here onwards" file.htm | cut -d: -f1 > rm.txt
set /p var=<rm.txt
head -%var% file.htm
</snip>

Does anyone know of a better way of doing this?

Thursday, January 04, 2007

Once upon a time...time-line tags


From the desk of "Because I have nothing better to do".

Another one of the mindless exercise that I did last night...I recently was reading on /. about the Microsoft-Speak time-line over last 30 years, in a nutshell it uses a php script tagline which generates a chronological tag-cloud of the words and helps you visualize the change in priorities/feelings as you grow and evolve. Well, I just thought off running it on my blogs to see which words I've used a lot over the time (it's been nearly 3 years since I've been blogging and though I'm quite irregular at updating the blog, I still have managed to do 100+ posts) and which words have dropped off. The only requirement for the tagline generator is that you need to organize your data in a xml format and feed it to the php file which does all the grunt work for you. To get the data in the required format, I first used Blogger Backup to get the local copy of my posts, then I wrote a QnD C# app which stripped the escaped html entities like < etc and collated all the posts into the required xml file. I generated tagline first by post and then one by month where I clubbed all the posts for a given month. I found it quite interesting to notice that in the beginning of my blogging most of my posts touched upon my personal life, sometime mid last year I started ranting a lot more about technology (check the words with large fonts) and from late last year I've once again started blogging about my personal experiences more often, anyway, without further ado here's how the time-line tag cloud looks for my blog:
  1. Per Post
  2. Monthly

Monday, January 01, 2007

Updated Blogroll

Here's the updated blogroll, ideally I should have it somewhere on the side-bar but the template that I use doesn't provide that much real-estate. I'll see if I can pin this post somewhere in the side bar. There are quite a few feeds that I don't read that often including BBC World News, Dilbert and Scoble Shared Items but they are there in case I've nothing better to do.

Saturday, December 30, 2006

Blogger Tag Cloud

One good thing about the blogger beta is that it supports Labels a.k.a. Categories/Tags (at last!), so one can categorize his posts. Blogger also allows showing the list of labels from your blogs and allows user to filter posts based on the labels. The problem is that the layout of labels is not customizable or is it? Actually, with some (not so elegant) lines of javascript and css, we can make these labels display as a tag-cloud pretty much what other blog platforms support. Here's what we need to do:
Preamble: Edit 2: Edit the template to give the ul tag (which displays the labels) an Id (for e.g. labelUl), this can be done by clicking on "Expand Widget Template" checkbox and scrolling to the code in template which has a div with ID: "Label1". The UL would be contained within this. Enclose the (<data:label.count/>) within a span and save the template.

1) Firstly we'll make the list appear horizontally instead of vertically, that way we can free up some screen real-estate. So we add the respective styles for the ul and li elements within the style tag under head:
#Label1 {display:none;word-wrap:break-word;}
#labelUL {list-style:none;margin:0px;padding:0px;}
#labelUL li{padding:0px 3px 0px 0px;margin:0px;display:inline;}
Add the noscript tag to display the label div, in case user has js turned off
<noscript>
<style type='text/css'>
#Label1 {display:block;}
</style&g;
</noscript>
So at least we've got the list to display horizontally instead of vertically.
2) Now we need to change the font sizes of the labels based on their weights (i.e. the larger the number of posts tagged to a label, the bigger the text size for that).
For that we hook our DOM walk-through javascript to window.load, this is what I've done:


<script type='text/javascript'>
window.onload = function(){
var labelDiv = document.getElementById("Label1");
var ul= document.getElementById("labelUL");

try{
if(ul.childNodes.length>=0)
{
var weights = new Array();
//should be a div
var li,text, re;
var textNode;

var lis = ul.getElementsByTagName("li");
for(var i=0;i<lis.length;i++)
{
li = lis[i];
textNode = li.getElementsByTagName('span')[0];
text = textNode.innerHTML;
re = new RegExp("[^0-9]", "g");
text = text.replace(re,"");
li.title = text + " posts";
weights.push(new category(text,li));
textNode.innerHTML = "";
}
weights.sort(sortNumber);
var mean = Math.floor((parseInt(weights[0].weight)+parseInt(weights[weights.length-1].weight))/2);
//lets go
var weightFactor = 1;
for(i=0;i<weights.length;i++)
{
weightFactor = parseInt(weights[i].weight)*100/mean;
if(weightFactor<80)
weightFactor = 80 + weightFactor*.1;
else if(weightFactor>250)
weightFactor = 250;

weights[i].li.style.fontSize = weightFactor + "%";
}
weights = null;
labelDiv.style.display = "block";
};
}
catch(e){
if(labelDiv!=null)
labelDiv.style.display = "block";
}
}

function category(weightParam,e)
{
this.li = e;
this.weight = weightParam;

}

function sortNumber(a,b)
{
return a.weight - b.weight;
}
<script>


I don't let any tag to be less than 80% of normal text size, you don't want any label to be illegible due to it's size. The js is simple enough to understand and as I said it isn't the most elegant piece of code that you'd come across but hey it works for me. I tested this out on IE 7 and Fx and I'd guess it should either work or downgrade silently on other browsers, worst case the Labels section would look a little whacko but I promise it wouldn't steal your credit card information or conduct any phishing attacks :-).

Edit:Just figured out that in the template if you click on "Expand Widgets.." checkbox, you can set the Id for the ul element and even perhaps write a javascript inline without having to resort to a onload function. I am too lazy to change the code on my page though (don't fix it if it ain't broke).

Tuesday, December 26, 2006

Zuned!

As I write this, the Zune Software installation is going on in the background and it has failed on me twice! Well, not really its fault, I got disconnected from my wireless connection on both occasions while it was downloading the firmware update (by the way, the error message was not at all handy, it said close all the applications and restart the system!). I don't think doing an update check the first thing during a new install is such a great idea, when people get new stuff they want to try it out as soon as they can and making them wait while a 30 MB something update is getting downloaded is definitely not on. By the way, the Circuit City guy told me that the Zune is selling quite well in these area and at times even outselling the iPod. Anyway, more on the OOBE and the Album-art fixer app that I wrote later.

Tuesday, December 05, 2006

The 6'O Clock Alarm

I generally hate waking up in the morning to an alarm, I believe that using alarms interrupt your sleep and if you're still sleeping during the hour when you should be "supposedly" up; it means that the body and mind needs more rest, as simple as that. I am not against using alarms as a one-off thing or using it to get up cause you have things planned for the day which you love doing, but getting up early in the morning just so that you can get to work early; please no unless you are in love with your job! I've used the alarms in the past quite often but I used it more or less to get things done which I loved doing. The last time I had to resort to alarm unwillingly was when I was in school, I had to get up like 5:30 in the morning to make it to the 7:30 assembly! I just don't understand how we expect from school children, does forcing them to get up so early make them any better? This gently reminds me of a British Airways ad from past which read something like:
It's same everywhere; children go to school (in the morning),
children run back home (after school)!
Unfortunately, these days I have to resort to alarms in the morning (not by choice) but one thing's for sure; the 6'O clock alarm would never ring...or would it?

Last.fm, Pandora or Musicmatch Jukebox Radio

Thanks to the social networking, even sharing music tastes online has these days become a fad; and all of a sudden there've been quite a few services online which provide you recommendations based on your tastes, the most popular of them being Pandora and last.fm. last.fm provides recommendations based on other listeners who share the "same" music taste as you, whereas Pandora uses some "fuzzy" logic to get it's recommendations. Before either of these services were on the scene, I would use MusicMatch Jukebox radio (due to its free CD quality streaming for one hour) and generally search for a particular artist and select "Play this and similar artists", and now after trying both Pandora and last.fm the same way, at least I've found that MusicMatch's recommendations were the best. The way I tried is quite simple; search for the same set of artists (mostly 80s bands like a-ha, Duran Duran, Cyndi Lauper, Belinda Carlisle etc.) on all the three services and see which one plays the songs you like the most and helps you in discovering new music. last.fm came with quite good recommendations but mostly songs that I'd listened to before, so not such great a thing if you're looking at finding new music matching your taste (though it did come with "Pictures of You - Cure", which I bought almost immediately!); Pandora's recommendations were beyond me but MusicMatch would per session at least play one song which I'd fall in love with: be it Afterglow by INXS, Moonlight Shadow by Mike Oldfield, The Sun Ain't Gonna Shine Anymore by Walker Brothers or numerous others. My word of advice: if you're into discovering new music give all three a spin and see which one works the best for you; I'd recommend the Jukebox the most though.
Happy listening!

Saturday, December 02, 2006

Ambitious dream

I was talking with someone over the phone the other day about something that I was kind of reluctant to do, and he finally said to me: "Hey, that was always your dream", after I hung up I could understand why he was kind of annoyed/amazed but then I thought about the statement that he made; was it really my dream? It wasn't, it was an ambition. Well, how are the two things different? I define ambition as something tangible and materialistic, something which our outer self wants to achieve; whereas a dream can be anything from one night of peaceful sleep to being able to fly, and are what our inner self needs. This by no way means that dreams are something so abstract that they cannot be lived on in this material world, all the limits of the body are the limits of your own mind; let your mind go and your body will follow. Unfortunately we drown ourselves so much into our day to day chores and try to please so many people that we stop dreaming altogether. The moment we stop dreaming or stop believing in them is when we stop being in touch with ourselves, we are just reduced to a shadow of what we really are deep inside.

I would rather chase my dreams and give up my ambitions that come in the way than the other way round, this was just one of those cases; and I've no regrets about it.

Legend of a Band

There are singers who compose music that you like, and there are singers that compose songs which you admire and then there are singers that touch your heart and soul with their soulful music, The Moody Blues is one such band, a band whose music simple mesmerizes you. They have never failed me ever since I started listening to them way back in early 90s, their music always seemed to have that profound effect on me which always seemed to re-affirm my self-belief even during my most stressful times when I'd start doubting the sanity of very principles on which I have lived my life all these years. Maybe it's got to do with Justin's haunting voice or the theme of most of their songs (separation) or simply the lyrics; they take you on a journey to a completely different place, a place where you are so much more peace with yourself, where you are just being yourself every time you play one of their song. The place is not somewhere faraway (there's no such thing as far away, every place that you ever want to be at is right there inside your own self) but it's a journey inside your own self, a place where I've always felt safe and at peace with myself. I can still remember how I got hooked on to them, Sumit had borrowed a recorded cassette which had one song from The Moody Blues: I know You're Out There Somewhere; a song which you just can't stop falling in love with. I was too young to really appreciate the meaningful lyrics then (I didn't have to deal with pain of losing someone at age of 12) but still there was something about the song which affected me somewhere deep down inside, there was something about this band which made me feel as if there's beauty around us; we just have to close our eyes, take a deep breath and liberate our souls. Ever since I've listened to almost all of their numbers but somehow I always kind of associate myself with Justin's songs, there is so many things that he says through them and then there are so many things that are left unspoken that you want to immerse yourself in those songs. If you haven't listened to Moody Blues ever; you might want to run to your nearest music store and get their CDs, believe me you won't regret your decision ever.

Tuesday, November 21, 2006

AJAX and noscript

One of the evil of AJAX sites is that if the user has javascript turned off, the site stops functioning all together. Since I use NoScript extension all the time on Firefox, I really hate sites which don't even tell you that javascript needs to be turned on for the site's functionality to work and when it takes just a <noscript> tag to display a message to the user about js bit:
<noscript>
<div>This site requires javascript to be turned on...blah blah blah.</div>
</noscript>

You can get a bit more enterprising with the noscript tag, for instance what if you don't want the user to even access the page w.o. javascript turned on? Well, in that case you can put noscript tag in the head section and do a meta refresh:
<head>
...
<noscript>
<meta equiv="Refresh" content="0; URL=nojs.html"></noscript>
...
</head>


Ok, what if you don't want to redirect the user but hide all the elements on the page except the no js error message? You can achieve that too by using CSS:
Step 1) Add this div within the body where you want the error message to show up in case the js is turned off:
<div class="ns">
Ouch! No JS
</div>
Step 2) Hide the "ns" div by default:
.ns{display:none;}
Step 3) Hide all the elements on the page and display ns div if js is turned off:
<noscript>
<style type="text/css">
* {visibility:hidden;}
.ns {visibility:visible;margin:0px auto;width:60%;display:block}
</style>
</noscript>