Wednesday, September 27, 2006

A blog that inspires...

I have been reading/writing blogs for quite sometime now. Never has any blog awed and inspired me like Anoushes Ansari's blog...
All the paleolithic(stone age) people, who have never heard her name before, should definitely read her wikipedia page before reading her blog. For the lazy souls, she wanted to be an astronaut but couldn't get into NASA. She ended up starting her own firm, a bit of this a bit of that, saved around $20 million and went to international space station. She will be returning to earth soon.

Friday, September 22, 2006

Tech update

Here's a list of subtle tech tools and products that have escaped public limelight, that I have grown to appreciate and love:

  1. Ubuntu Bash: The bash is now context sensitive. In layman's language it knows which file you are going to open based on the program you are going to run. Suppose you are using latex. The folder is littered with file.tex, file.aux, file.dvi, and file.pdf. Normally bash auto completion would auto complete till file. and wait for you to type the rest. Now it just completes the command line depending on the program, i.e. if you have $latex, the bash automatically place file.tex in front of it when you type f and press tab.
  2. Vim7 time line: I haven't used this feature much but it looks very promising. If you pass the command :earlier 5m the editor presents you with a 5 minutes earlier screen. Neat damage control mechanism.
  3. Cscope: Something like ctags but more robust and flexible. Better vim integration.
  4. Vim autocmd: Ok.. this is pretty old but I discovered it quite recently in one of the forums. I use it to generate broiler plate for my programs.
  5. Ruby: Well I know its an awesome programming tool. I love it because its a programming language for non-programmers. I taught my flatmate, MS in Biotech, ruby in half an hour, who now uses it for analysing his data (he was using excel to do that before...eech).
  6. Billmonk: Amazing website that makes money transaction between friends less awkward and hassle free.
  7. Prosper in LaTeX: SuperHot package for creating presentations in LateX.
  8. Launchy: Its a windows based program that indexes your start menu and makes them available in a command line like run app. In short, it cuts down the trips to your mouse.
  9. Avast and Zone Alarm: I must say hundred time faster, leaner and better than Norton Antivirus.. what more; its free.
  10. mp3info: Cute little command line tool to dump the ID3 tag information of a MP3 file.
11. Synergy: How can I forget Synergy? Its a cross platform keyboard and mouse sharing software and comes in handy when you are working on multiple computers. The best part is that it also enables clipboard sharing, so you can cut from one computer and paste in another.

Tuesday, September 19, 2006


I had been working on SQL Injection attacks for the past couple of days. I designed a vulnerable website (I wont give the website...because its vulnerable) for the students to crack. The whole concept of introducing an undergrad to real world security threats is really awesome and I wish that I had done my undergrad here. Anyway comming to the point, Dr Du wanted me to give a presentation to the undergrads(he was not in town)... So what better way to impress a bunch of undergrads if not with a *bling* presentation made in LaTeX and shown on an Ubuntu machine with all the eye candies and a shiny ubuntu sticker on the laptop case :D.

The class was at 8:00 am, so I forced myself out of bed at around 6:50, organized my self and headed for my first class ever. There were just 10 students in the class!! as opposed to 30+ students i am used to seeing in a class. I booted my laptop to a shiny ubuntu screen fully loaded with the MacOSX look. I waited for the ooohs... they never came :(. I walked them through the presentation.. i was too enthusiastic about it.. come on.. I was showing them how to break into a website and not a single soul showed any interest. To top it all, the floor was not wired with wireless internet so I was not able to demo the website I had built. I finished the one hour presentation in half an hour... not a single person asked any question. Nobody was even surprised to see powerpoint like effect in the pdf I had prepared. No one had any doubts when i finished the presentation. They were all staring blankly at me, or at time staring trough me at some invisible object... or probably were sleeping open eyed. At the end they silently left the room before I could say anything. I remember someone giving me a presentation when I was a freshman and in my senior years... I and my gang of friends used to flock the speaker and talk at lengths about the machine he was using and the presentation he gave.. What has the world come to?

Saturday, September 16, 2006

Hack your audio collection

DISCLAIMER: The code shown here is purely for educational purposes. The author does not suggest anyone to use this code....he himself hasn't used it. Everything that follows in the next paragraphs is a lie. This is just to demonstrate the versatility of the Perl language. Music piracy is a heinous crime and I urge everyone to pay for all the songs you download. All stunts performed here are done by professionals, please don't try them at home.

Well since this is the first time I am using red fonts on my blog, you would have guessed that I am up to something nasty(keep the disclaimer in mind). Coming right down to business, I wrote a Perl script( with a little BASH littered around) that downloads all the songs of any bollywood movie, fix their weird names and put them nicely in a directory. Also since the id3 tags are intact, they are perfectly well suited to be played from an mp3 player as well as from your computer.

Here's the script. Currently it runs only Linux and needs mp3info and LWP module for Perl installed (which.. if you use Ubuntu/Debian is just an apt-get away). Since they both are there on windoze too, readers are encouraged to go ahead and try it on Windows. Basically what it does is, it just goes to a free mp3 site and downloads all the songs. Later it reads the songs' title on the id3 tag and renames them.
E.g $./ fanaa
this would create a directory called fanaa and download all the songs from the movie fanaa in that folder. I downloaded 1 GB of bollywood songs yesterday...

I would specifically like to draw your attention to three lines of code that can create wonders

$realname=`mp3info -p\"\%t\" \"$filename\"`;
$realname=~ tr/" "/_/;
Now simply putting it, this tiny perl script reads the mp3 title from the ID3 tag of the song. The second line replaces spaces with underscores and the last line renames the file. Imagine having gigabytes of songs with stupid names that your friend though were funny.. now you can name them automatically. You can be as creative as you like.. I had a friend who dumped all his music collection in one folder and soon had an unmanageable mammoth collection of songs, I just modified this script a bit which auto-organized the songs into folders named after the album(again from ID3 tags). Dont you love Perl and Linux after this??


Thursday, September 07, 2006

Piled Higher and Deeper...

All the graduate students (i.e. MS/PhD) would have realised by now that this post is about the famed PhD comics . For those people who claim to be mature/old/wise and think that comics is just for kids... here's a strip for all of you guys.

This is one of the few no nonsense comics that really appeal to grad students. I would count it in the league of Calvin and Hobbes. The author only focuses the content on the graduate students... so even though non-graduate students will find it amusing, they wont relate to its characters. It would be really difficult for them to separate out comedy, sarcasm, irony and truth from the content.

Recently Dr Jorge Cham, the author of PhD comics, paid a visit to SU. The topic of his presentation was: The power of procrastination...
It was incredible.. it still is.. on how someone can give an hour long presentation on something as mundane as that...

His presentation just gave a comical/ironical overview of the problems graduate students face all over the world. It was not just random stuff that he was dishing out... he supported his theories with properly researched data. One of them was a research conducted by UCB. According to the research, 95% of graduate students suffer from extreme anxiety, 65% of them suffer from depression at some point in their academic life, 10% think about committing suicide and .5% actually commit suicide. It was amusing to find how the lives of grad students, all over the world is pathetically the same...(no pun intended)

Although Dr Jorge has a PhD in Mechanical Engineering from Stanford and his research focuses on neural prosthetics (brain-machine interface in a nutshell), he is better known for his comics. He is amazingly jovial and so much unlike the regular PhD guys I have met... who either are serious about everything or pretend to be (as if the world wants the doctors to be dark natured.. immersed in thought... a total bullshit).

The comics are now his full time job... he teaches at Cal tech though(part time i guess). After 24 years of education... pushing, stamping, sweating and getting a PhD from Stanford.. this guy chooses to write comics for a living... I salute him.


Sunday, September 03, 2006

One more toy....

Well since I got an RA, I gifted myself with an mp3 player. The best part of gifting yourself is that you always get what you want :P.

Anyways its a Creative Zen Sleek Photo. All my iPod lover friends found it blasphemous that I wasn't going for an iPod. I personally find the herd mentality quite sickening. I just go to CNet's top 10 list and check out the best stuff available. I then ignore downside listed due to any usability feature... weirder the interface, more comfortable I am with the product. Then I go to Campusi to check the cheapest deal available. It worked for my laptop, for my cell phone and I guess this player is not that bad either.

Frankly speaking, anybody who used iPod would find the interface totally non intuitive. Personally I think the abstraction( both hardware and software) is crappy. You need two wires to charge, It has a proprietary usb interface.... making it work on Linux is a headache (not tried it yet... but read lots of blogs about it). Also its an MTP device and not a universal mass storage device so you cant use it for storing data (well you have to partition it to use a partition as a data drive)... so why did I buy it??
It has a FM player, FM recorder, Audio recorder, FM preset and autoscanner. It also has support for custom equalizers. iPod has none of these features... plus this costed me $185 with tax and shipping. iPod costs around $250... just for their label and brand image. So even though this piece of machine is ugly... its powerful as hell. Something like Linux... I don't care about the GUI.. I just expect it to play songs and am pretty happy with it.