29 Mar 2009

Accidents can be scary

Excerpt from California Driver Handbook's Seatbelt section:
 
The pictures illustrate what can happen in an accident. Your car stops, but you keep on going at the same speed you were traveling until you hit the dashboard or windshield. At 30 mph this is like hitting the ground from the top of a three-story building.
When I jumped off my bike, I was going at about 30 or 40kmph speed.  No wonder I broke my leg so badly!

23 Mar 2009

On being good

I saw Dead Poets Society over the weekend.  Not a great movie, in my opinion.  Long after the movie was over, I remembered a trainer called Balu.

During the first 2 years of my computer science (my 11th and 12th standard) I had a good teacher to teach me programming.  (Mr Moorthy, without him I don't think I would be what I am now.)  After that I have seen dozens of computer science teachers and I didn't find any one of them good.  They all suck, big time.

I joined IBM right after I finished college and IBM sent me to a mandatory computer science training, along with other fresh grads joined with me.  It was pretty much like a classroom training I had been having for the past 6 years.  I didn't expect any trainer to be good, and most of them were indeed bad.

Of the lot, there was one trainer called Balu.  He was good.  At least he knew what education is.  He didn't try to repeat whatever the book says.  While all other trainers tried to repeat exactly what the books said, he tried to make us understand how to approach programming and how to approach learning a new language.  Like in the old saying he tried to teach us fishing instead of giving us a few fishes.

I liked his classes, but no one else did.  When IBM came to us asking for trainer feedback everyone said Balu was bad.  I don't know if they cut his pay for his sessions, but I am pretty sure they didn't hire him anymore.

Several proverbs and sayings come to my mind.  I'd write down only one -- life is just unfair.

22 Mar 2009

MP3s with incorrect track length

An MP3 file may be broken for many reasons.  A very common error in MP3 files is incorrect track length.  Some CD ripping software, maybe due to a bug, occasionally produce MP3 files with incorrect length.  Such a file would show as having, say 2:35 as its length when opened in a media player.  But the actual length of the track might be more, say 3:15 or something.  Most modern media players like iTunes, WinAmp, Amarok, etc. handle such tracks gracefully.  However, my iPod seems to have trouble playing such files.

A quick Google search for fixing this problem doesn't show any Linux-based tool.  But the good news is that we don't need any special software for fixing this problem!  Any sound converting software would do the job.

I used soundKonverter for this.  I added the files that had this problem and converted them to same MP3 format with same bit-rate.  This forces the converting software to fully re-read the track and freshly write one.  That solves the track length issue.

If you know how audio encoding/decoding works, you might think now that this is not the correct solution for this problem.  You're right.  We might lose some audio clarity in the decoding/encoding.  If we only measure the length and fix the existing MP3 file itself it will be a lot faster.  But I don't know of any tool that does exactly this.  My approach seems to work anyway, I don't care much as long as the work is being done :)

PS: A friend suggested using a hex editor and manually writing the track length in the file.  While the idea is really interesting, I'm not doing it right now, mainly because I have several such corrupt files and I don't have the patience to fix them all by hand.

I don't understand

"Why?" I asked god.
      "You chose it," he said.

"I understand why I chose her.
But why is she leaving?
Why would I choose that?
I don't understand."
      "You chose not to understand."

And I hate him for that.

Butterflies

The sincere kid was drawing butterflies.
He had already drawn thousands of them.
I was silently watching him draw.
He smiled at me and said,
"When I have drawn enough, they will turn real."

21 Mar 2009

Sticky mind

A sticky mind leads to misery.  That's what I understand from a little bit of my own experience and from what people like Osho and Alan Watts say.  First, let me tell you what I mean by the phrase "sticky mind".

Rani and Selva are friends.  He likes her very much, but he's never told this girl that he had feelings for her fearing that he might lose the friendship.  Now and then she says some good things about him and he believes that someday he will have her in his life.  So it goes on.  One fine day Rani tells Selva that she is getting married to someone else.

After about 2 weeks, heartbroken Selva is sitting at home listening to sad songs.  After a song his iPod Shuffle automatically plays a nice happy fast-beat song.  That song is one of his favourites and he keeps on listening to it unconsciously for about 2 minutes.  Suddenly he finds that he is listening to a happy song, and presses Next button until he finds another sad song sung by a heartbroken hero.

This is what I call as a sticky mind.  You know your mind is moving to other things than your sad or happy experience.  But you don't let it move on -- you force your mind to live a particular moment again and again.

Alan Watts says that by nature human mind is not sticky.  If only you let it wander wherever it wants to, it will just go around everywhere and your life won't be half as miserable as this.  (In the same way, a sticky mind relives happy moments too; but the enlightened people say that happiness and misery are one and the same, like two sides of a coin.  That's subject for another post later sometime, after I understand it enough.)

17 Mar 2009

Am I happy now?

I was a kid then.  Very young.  Diwali was about a month or so away.  We had bought new clothes.  My mom said we'd buy fire crackers in a few days.  We would make sweets and special food for eating on the day of Diwali.  So many new and exciting things for Diwali!  I was keenly awaiting the day of celebration, when we would be spending the day gloriously and having a lot of fun.  The day before Diwali I was extremely happy since my wait was approaching an end.

I woke up on the Diwali day and looked around.  Everything was just as normal as it had always been.  I wore new clothes, ate good food, burst crackers.  I did it all, but it wasn't half as fun as waiting for this day.  This is when I found that most celebrations are over-hyped.

Today as I was taking a bath I realised something.  I found that there's no happiness or worries, good or bad about the present -- all these classifications make sense only for the past and the future.  In Tamil movie Virumaandi, the hero says this dialogue "when man experiences happiness he doesn't know what happiness is" (சந்தோஷம்னா என்னன்னு அதை அனுபவிக்கும்போது மனுஷனுக்கு தெரியறதில்லை).

"When I had just broken my leg and this kind person was taking me to the hospital, the pain was a terrible experience," I told a friend sometime back.  As I was saying this I knew I was lying.  Because it wasn't such a bad experience.  We realise pain and pleasure only later, after that moment has passed away.  Or in advance, when we're expecting it to happen in the future.  Things are just what they are, they are neither good nor bad. When we think about them we label them for whatsoever reason I don't understand.

I only wanted to record what I found today.  This post is incomplete now, and I don't know how to complete it.  For now I'll just leave it here and move on.  Maybe I'd complete it later, if I find how to do it.

12 Mar 2009

Acceptance

What is acceptance? When you get something you don't like, you can accept it though you don't really like it. Or, you can accept yourself as you are, and say No to the things you don't like. Which of these two is true acceptance?

5 Mar 2009

Google search experiments

I am a big fan of command line and keyboard shortcuts.  I have been using an experimental feature of Google Search that adds keyboard shortcuts to search results page, and totally loving it.  There is a few other experiments too, if you are not too keen about keyboard shortcuts.

You can enable an experimental feature for your account from http://www.google.co.in/experimental/.  You may want to change the URL to match your country (google.co.uk if you're from UK, google.com if you're from US, etc.)