Thursday, July 19, 2007

Harry is comming..

July 21, The day I was waiting for the past two years. For all the sane people out there who have no clue what I am talking about, Harry Potter and the Deathly Hallows, the supposedly last Harry Potter book is hitting the book stores on July 21.

The world looks very different now if you see it from the eyes of a Harry Potter fan. All I can see everywhere is the mention of this book and discussion of possible endings. Just yesterday while having lunch at a deli(not a regular one, this one is in the middle of IT campus and the customers are generally just IT guys), a group of 50+ year old people were discussing Horcruxes and Harry's quest in the last book... shattered my colleague's belief that Harry Potter books are for kids :P. Today Cecelia(of PhD comics fame) wrote about it too.

I will be quarantining myself for the weekend. That means no blogs, no mails, no IMs and no calls. Basically am just trying to avoid all the channels that can ruin the ending for me, especially I'll block out all the people who are Harry Potter fans.. I know they'll do the same.

I have never gone ballistic over a book before.. not for a movie, not even for the iPhone :P. J.K.Rowling.. you rock.

Saturday, July 14, 2007

Vim-blogger and Markdown

This guy blogged about posting blogs from emacs, and for reason unknown to me it stirred my old itch to post blogs within the VI editor... with complete support for different teeny nifty features that I have built into my template over the years, without using html(that just breaks the thought process and I can never get it just right). I also needed the dynamic spell check support in firefox2 that I've gotten so used to.
A bit of googling revealed that there was already a vim-blogger plugin!! Some guy known as The Geek Wannabe already had everything in place. The only thing I had to do was follow the steps. The guy did it using GData API. Markdown was included in it, which mean that I can do all the occasional formatting like this code:

#include<iostream>
#include<string>
int main()
{
std::cout<<"Hello World\n";
}

without sweating about replacing the < like signs with & lt; or adding quoted text like this:

Yeehaw.. I am in quotes.

Adding spell check support was a simple matter of invoking :setlocal spell spelllang=en_us.
This post is written and posted completely within *vim*..so all the emac guys out there.. up yours :P. Geek Wannabe, you should run for President's position.


PS: Ah.. bit of rough around the edges indeed.. but all for vim-love.

Sunday, July 01, 2007

Whistling at your computer

Those of you following Slashdot would have noticed the IBM's article to provide commands to your computer by whistling at it. I decided to give it a shot on Ubuntu7.04. Follow these steps to get it working flawlessly on Ubuntu:
  • $sudo apt-get install libsndfile1 libsndfile1-dev libglut libglut-dev
  • Follow the instructions in the linked article and download the file cmdWhistle.pl
  • Replace the functions getEpochSeconds and getEpochMicroseconds in cmdWhistle.pl with this code:

    use Time::HiRes qw(gettimeofday); #Add at the beginning of the file

    sub getEpochMicroSeconds {
    my $seconds=0;
    my $microseconds=0;
    my $timeVal;
    ($seconds, $microseconds) = gettimeofday;
    $timeVal = $seconds.$microseconds;
    $timeVal = substr( $timeVal, 6);

    my $padLen = 10 - length($timeVal);
    $timeVal = $timeVal . "0" x $padLen;

    return($timeVal);
    }#getEpochMicroSeconds

    sub getEpochSeconds {
    my $seconds=0;
    my $microseconds=0;
    ($seconds, $microseconds) = gettimeofday;
    return $seconds
    }#getEpochSeconds

  • After this you can pretty much follow the same instructions that the article explains.
I tried running the few commands(did not try the windowing commands using xwit though) after which my mouth started to hurt and I could not whistle a consistent tune afterwards :( It's a good piece of software, and the sndpeek program that it uses is really awesome and feature rich but I think using whistle as an input is totally infeasible for me.
On the other hand, if you know how to play any kind of wind instrument(like flute, clarinet etc) you can easily write a superkewl password login utility that takes a particular tune as an input... sounds right out of a hollywood movie, doesn't it :)

Sunday, June 24, 2007

Apple: fishy fishy...

Earlier this month Apple released Safari for Windows. Why this sudden generosity from Apple? Why did Apple suddenly jump into the browser market.. I mean sure Apple had its browser on the market for a long time but it was more of a passive player. Even the most ardent apple fanboys used firefox on Macs. The great Stevo himself confessed that he used firefox, so why put all the time and effort porting the browser to a different platform??

At the WWDC Steve Jobs mentioned that they would like to have a sizable market share in the browser market. In fact he predicts that IE7 and Safari would be the only two browsers left in the market. Call me a conspiracy theorist.. but I think thats a load of crap. Knowing Mr Jobs, I don't think he had the browser market on his mind. If you have a Windows installation, give safari a shot and you'll know what am talking about.

Safari on Windows is definitely faster than Firefox and IE. I am a huge Firefox fan but the superkewl interface of Safari makes me wanna boot into Windows. Although the font rendering is not crisp, just the speed and Apple's zen like interface designing approach makes browsing a totally different experience. To top it all, apple went through all the trouble of retaining the tiny special effects like rollover in their browser. I have a big appetite for effects and beryl on Ubuntu takes care of that pretty well but you gotta give Apple the credit for putting those effects where its least intrusive and least expected.

90%(maybe more) of the Windows crowd do not have access to a Mac and have never heard of Linux. By providing a windows app, Apple is using Microsoft to advertise its technology. These simple effects are enough to blow the socks off any casual Windows user. Most computer users just want an eye candy pc for browsing or word processing... Apple computers do that and look good too. An app as simple as a browser showcases Apple's technology and their capability. Its a perfect setup to woo Windows users. In my opinion Apple's not eying the browser market.. but the OS market. The timing couldn't be better.. MS is trying to change its product line and challenge Google. We are witnessing a clash of titans, Google, MS and Apple. The evil geniuses of Bill Gates and Jobs, and the combined minds of thousands of geniuses employed by Google makes the outcome totally unpredictable.

I guess we can grab our bag of popcorns and watch the show.

Wednesday, June 20, 2007

American Television...

After 6 years of spartan college life, I finally have a television set in my room. Now torrents and few online video websites are all that I need to cure my video itch, but I decided to give this hassle free medium a shot. I have been watching television for about 20 days now and I get about 75 channel. Here's my analysis:
  • 25% of the channels are in languages that I don't understand.
  • There is a 99.9% probability that Discovery channel will show either the Mythbusters  or Man Vs Wild
  • FOX and TBS will only show reruns of popular old sitcoms.
  • Rest of the channels will air some sort reality shows.
What irritates me the most is the sheer volume of Apprentice type shows. In the past 3 weeks I have seen numerous shows; 3 of them with cooking theme (Hell's kitchen, Top Chef and some stuff on the Food channel), one to select a hair dresser (Sheer genius), one with movie direction as a theme (the contestants make their own short movies), yet another one shows a contest between two set of ladies in their 20s and 40s to win a guy in his 30s.. the list is endless. Another show (America's got talent) takes stupidity to a whole new level by allowing the contestants to do anything they like.. how one can compare a song, a dance and a standup is beyond me.. they lie on a argand plane, they are too complex disciplines to be compared. Just today on the same show, an old lady in her 80s sang a classical song and a guy from Pakistan danced to bollywood tunes.. how do you compare them??

And what's with the advertisements!! they are almost as long as the show itself and the amount of bullshit in the ads needs another blog entry altogether. Hybrids are shown as if they are going to solve all the world's pollution problem in a jiffy.. no mention of the pollution caused by the manufacture and disposal of the Li-ion batteries, Ask.com has its own stupid "The Algorithm" advertisement... let the app speak for itself, Home Depot encouraging minors to gift their dads on father's day!! take a look at their inventory. How is a 10 year old supposed to get money to buy his dad a GPS device or a gift card to buy it??

For the past six years, I have been watching pure, unadulterated, pirated video.. I guess this is the reason why most people pirate media even after being able to afford it. I hope the Cable TV folks learn their lessons fast, the end user now is not as stupid as he used to be...