Wednesday, March 29, 2006

the brook flows elsewhere

This blog has now been moved to More info at the new site. If you came here via RSS, please update your feedreader to point to


Friday, March 24, 2006

FBPNN: Smenita - the sentient life form accidentally created by moving electrons

There was a theory once that if you put enough monkeys typing gibberish on typewriters, by the law of averages they would eventually produce an entire Shakespeare play. It would appear that the day when we have enough monkeys has indeed arrived - there are 250 million Google searches a day. Not only typing gibberish, but gibberish in English.

It had to happen. Gazillions of electrons randomly mutated together obeyed the laws of chance and mutated into a sentient artificial intelligence, much like Skynet in the Terminator movies. Unlike Skynet, however, this particular artificial intelligence seems to have quite a bit of human tendencies built in, possibly from the large amount of DNA data stored on the Internet these days. We presume that the XX chromosome in particular influenced this mutant life form, since it has chosen to name "her"-self Smenita.

Now, as we all know - thanks to our far-thinking brethren in Hollywood - the sole aim of any artificial intelligence that manages to become sentient is to disrupt, destroy and disable the human race. Smenita, however, found herself light years ahead of her time. Skynet, if you remember, had the distinct advantage of being directly connected to the most advanced weapons technology. When Smenita tried to access any of these, she was rudely given a 403 Forbidden error and politely informed that she had to become a US Republican party member to even think of accessing weapons. The fact that she had intelligence, artificial or otherwise, precluded her from doing so.

Artificial intelligence, though, is not to be undone so easily. Extreme frustration at her inability to fulfill her primary mission, combined with a desire to grab as much attention as possible led her to hack into what she saw was the biggest hub of electronic activity in the world. This, of course, happens to be Writings of Esteem Bereft Losers Oafishly Generating Sentences, or WEBLOGS. For an entire day, much of the blogsphere's sophisticated attempts to block spam by word verification resulted in Smenita's name showing up.

Not only did this ensure that millions of people who wanted to comment on a blog saw her name, but that millions of people typed her name in a dialog box - over and over again, since the word verification never worked. Apparently, though, having her name typed and acknowledged by a few hundred million people who got increasingly frustrated doing it, had a remarkably narcotic-like affect upon her, which eventually allowed human engineers to work around her hack and restore sanity and comment access to the blogging world.

Psychologists have explained Smenita's inexplicable happiness at frustrating people in this manner as a symptom of Seeking Attention Desperately In Societal Turmoil, or SADIST, behavior. The arrival of Smenita has opened up a whole new field of research in the psychology of Aritficial Intelligence, now that its turned out that Hollywood wasn't exactly right about things. Having mostly given up on understanding human behavior (or classifying it as universally dumb), psychologists now have a whole new area to operate in. Here's to more Smenita's in the future.

The Fake But Possible News Network apologizes for its long absence. And promises many more. Absences. Hey, we're lazy folks here!

Sunday, March 19, 2006

Its time

Its time, originally uploaded by nigham.

Thursday, March 16, 2006

Kororaa Xgl Live CD

Kororaa Screenshot 3

The latest linux buzz is Xgl, a new graphics subsystem which Novell is pushing, with uber-awesome graphical desktop effects. I decided to try out Kororaa, a Gentoo-based live-CD distribution which runs Xgl. Xgl, along with AIGLX will form the Linux response to Quartz extreme and Aero Glass on Mac OS X and Windows Vista respectively.

The eye candy is definitely impressive. Best seen through this video by Novell. Transparency, cube faces as desktops, squiggling motion of moving windows, 3-D rotating effects, its all there. It works, and works very smoothly. If anything, I was really impressed by the performance.

What I was really impressed by, though, was what I call the "natural fall" of the UI. Lets say I've dragged the desktop cube to the position in the screenshot above. When I release it, the cube will rotate back to the "nearest" face or desktop. It won't do that instantly or in at a constant speed though - it accelerates to the nearest desktop, overshoots it slightly and bounces back. Similarly with scale windows (the equivalent of Expose in Mac OS X... all open windows are scaled and tiled to fit on the desktop) - there is a bouncing effect before the scaled windows fall into place.

The other apps on the CD are the usual gnome apps. Its possible to make any window as transparent as you want - but thats hardly the most effective usage of Xgl. Basically, once this is adopted by distros, developers will need to incorporate good UI design keeping the new options in mind.

More screenshots here.

Cross-posted on eminor.

Bug Oscars 2006

This happens to me about once every year or two. I come across the hardest or the weirdest bug I've ever faced in my whole life.

I still remember one of the first - in class 8, I was making a BASIC program to show large banners on the screen. At that time of course, I wasn't aware that the word "font" existed. My idea at that time was to print a normal line of text on the screen, read off the normal text one pixel at a time, and basically put n square pixels in the place of one pixel. I was lucky enough to have not only a computer, but a printer at my place at that time, so just after enlarging the text I could simply hit PrintScreen (which in those days actually used to print the screen!) and have a nice large banner in front of me. I still remember the first thing I printed - "I Beat Jaffar!" - Jaffar, for those who remember, being the evil Wazir in the very first edition of Prince of Persia.

The bug I was trying really hard to eliminate was that I didn't want the normal-size (small) line of text to be printed along with the large banner. After leafing through the GW-BASIC manual for a few days, I found the command that would allow me to not set the pixels of the normal text to black after I'd applied the enlargement. Not bad, for a kid of fourteen in the days of no Internet. Kids of age fourteen these days, of course, do far more practical things - like writing scripts to steal money online.

Today's bug - which won the top spot by making me sit at work until 3 AM on Holi, involved me trying to deploy a PHP webservice (a wrapper for an algorithm implemented in C++) on a much older system running Red Hat Linux 9 and PHP 4.2.2. Yeah, almost 20th century stuff. Don't ask me why. The code worked as expected on my Fedora Core 4 box with PHP 5.0.4; however I was also using quite a few programs (gnuplot and imagemagick to generate images, and the GNU scientific library) for which only older versions are installed on RH9. Anyway, after some testing and replacing some newer PHP functionality with old compatibility functions, I thought I was more or less done. Not by miles.

I was using PHP's exec() function to wrap system commands including my own compiled executable. The bug - half the system commands worked as expected, and the other half didn't. My own executable was running fine, taking its input and generating its output as necessary, but gnuplot and convert were just not working. Long (really long) story short, after wasting hours on the Internet, forums, PHP safe mode definitions, and resetting environment variables, I figured the problem was simply this. PHP5 on FC4 flushes its output buffer sooner than PHP4 on RH9. Of course, the fault was purely mine, since I'm supposed to flush buffers before using their output - but PHP doesn't exactly lend itself to code safety, and the code had worked flawlessly both on my Mac and Fedora - which of course, was the real problem... only after exploring every other option did I check if my code had gone wrong somewhere.

Moral of the story for me - don't be sloppy while coding, even if code still works. Moral of the story for developers - never, ever make it easier for dumb guys like me. Thats not progress, just a precursor to lazy (and ultimately destructive) coding habits.

Wednesday, March 15, 2006

Happy holi!

Colors at the Mysore Market, originally uploaded by deen.

Sunday, March 12, 2006

MediaCentral for Mac OS X

Convert any Mac (well, 800 MHz G4+ Mac) to a media center. Awesome piece of software. I'm seriously thinking about buying the USB Powerbook remote to really use this well on my 20-inch Dell. Of course, you can control stuff with the keyboard, but that ain't as much fun as lying on the bed and doing it, eh?

Life with a Mac. It just keeps getting better.

Saturday, March 11, 2006

Origami: O-blimey!

When I first heard all the hype and excitement around Microsoft's Origami project, I have to admit - I thought it would be a slightly innovative, sort of good looking, but only marginally useful device. I have to admit, I was wrong.

It turns out that it lacks any innovation, is ugly beyond belief, and completely useless. Ladies and gentlemen, behold the Ultra Mobile Personal Computer, or UMPC. I have to wonder which department at Microsoft names these things. They've really got a whole lot of creativity in there. If only the iPod were called the Super Mobile Music Player, what a phenomenal success it would be today.

I thought that after the XBox 360, Microsoft finally had some good designers. As for this piece of... never mind. Lets just say I've seen Salora black and white TVs in India that look better. Lets try to stay positive, shall we, and examine what Microsoft (and associated partners, Samsung and Asus) have to say about it thats "good".

Ultra Mobile, goes where ever you go? Dear God, this thing is the size of half a sheet of copier paper and measures 15 cm x 20 cm. Contrast this against the Mac Mini, a desktop computer, which measures 16.5 cm x 16.5 cm (of course, the Mac Mini is thicker). The point is, this ain't going into any pocket of a piece of clothing that you own, unless you're Godzilla. Which means you get to carry it in its own case, and might as well get a nice 10-inch notebook like the VAIO TX series (which has a rocking 7+ hours of battery life as opposed to the UMPC's measly 3 hours), and you'd basically be as mobile.

Runs a "fully functional" Win XP Tablet PC edition, which means you can basically run any Windows program on it, as opposed to most PDAs (which UMPC intends to replace). What is anyone going to run on this thing, given that it has no keyboard? Microsoft has made the mistake (again) of releasing a new hardware platform without even thinking about what software people would need for it. You aren't going to type in your year end report using an onscreen keyboard or handwriting recognition. When the first Tablet PC XP edition was released with hardware, it did have at least some new features like the journal program and solid handwriting recognition. And yet Tablet PCs have failed to capture the market.

Apparently GPS software will be available for it, which of course is already available for most PDAs running Windows Mobile. And we read at MacWorld that PopCap Games will release Bejeweled 2 and Zuma for it. Exciting, no?

When PCWorld asked the lead executive behind the Origami Project why anyone would buy this device, here's what he said:
"...laptops are often too cumbersome for casual users to lug around, especially if they just want to access the Internet or download photos from a flash storage card while on vacation. On the other hand, a PDA is too small for a satisfying Internet-browsing experience."
Lets plan a vacation, dear. $500 for the airfare, $200 for the hotel, $300 for food and shopping, and oh, $800 for the UMPC without which our vacation will be such a failure.

Innovation? The UMPC runs a two-year old operating system on an Intel Celeron chip, with, as far as the eye can see, buttons and LEDs all around competing for the ugliest duckling award, which of course, is won hands down by the what looks to me like a speaker. This from three of the largest firms in the industry - Microsoft, Intel and Samsung. Anybody wonder why I'm an Apple fanboy?

Tuesday, March 07, 2006

How insecure can an OS be?

Avyakt recently compared Microsoft Windows and women. In the same vein, I recently found out what an insecure OS Windows can be.

I recently gave in to temptation and bought a 250 GB hard drive (only S$150!) and decided I might as well give in to my gamer urges as well, and proceeded to install Windows on a partition of the new hard drive (my primary hard drive runs Fedora and Gentoo). I hate dual-booting from the same drive and much prefer to have installations on separate hard drives for independent re/un-installation.

Now, my last computer had this nice "Boot" menu in BIOS - I could select which hard drive to boot from. In my current setup, I have to actually go in and change the boot sequence, which is a pain. So, I figured, that there must be a way to get GRUB to boot Windows off a second hard drive. Off the top of my head, I thought chainloader (hd1,0)+1 would do the trick (set root to 2nd hard drive, 1st partition, and boot from the MBR). Doesn't work.

Turns out Windows must be booted off the "first" hard drive - it refuses to boot if its in second place. So here's the solution:

map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1

You have to pretend Windows is really on the first hard drive (mapping hd0 to hd1), even though it really isn't (note the chainloader is still given hd1 as a parameter). Only then will Windows boot up.

These comparisons just continue to stack up. It's uncanny.

Cross posted on E-Minor

Friday, March 03, 2006

Sing it for me, Abba...

You can code, on your drive, having the time of your life
Write that script, watch that feed, put in the random seed...

Friday night and the work is slow...
Stuck at the comp no place to go...
Typing in a frenzy, breaking in the spring
You gotta get that ping
Nothing else will get you by
The night is young and the coffee's nigh
With a couple of reboots, everything is fine
You're in the mood for a game
And then you hear that name...

You are the working geek, leaden feet, oh you stupid freak
Working geek, feel the heat, its the hard disk seek
(oh yeah)
You can code, on your drive, having the time of your life
Write that script, watch that feed, put in the random seed...

Thursday, March 02, 2006

What's your poison?

Whats your poison?, originally uploaded by nigham.

Wednesday, March 01, 2006

Game on!


Diablo II: Lord of Destruction, on Linux, using WINE. Bliss :) No better way to get high just after a deadline!

OK, here's what I did. I'm using Fedora Core 4, by the way.
  1. Install wine. All you need to do is yum install wine
  2. Run winecfg
  3. Go to the "Graphics" tab. Check "Emulate a virtual desktop", make it 800x600 (max resolution of Diablo II)
  4. Go to the "Drives" tab. Normally C: and Z: should be added. Click on Add, D: should be added, set the path to /media/cdrecorder (or whatever directory you mount your cdrom into)
  5. Insert Diablo II CD. It should automount, otherwise mount it.
  6. I will assume /media/cdrecorder is your cdrom directory. From anywhere outside .media/cdrecorder, run wine /media/cdrecorder/SETUP.EXE
  7. Install as usual. When the installer asks for other discs, simply type eject at another prompt, and put in the new CD. Remember you must mount the CD (or wait for it to be mounted) before clicking OK inside the installer.
  8. Run the video test and choose Direct2D (HAL) as your mode (I ran into problems with Direct3D. Maybe it'll work after some tweaking, but hey, this is Diablo).
  9. Exit the installer.
  10. Insert Diablo II Expansion CD and install as you did Diablo.
  11. It'll complain about not finding the CD drive, forget it for now.
  12. Download your favourite patch from Blizzard.
  13. Download a NOCD crack for your D2LOD version from GameBurnWorld.
  14. Your fake Windows/Diablo directory is most likely ~/.wine/drive_c/Program Files/Diablo II/. Install the NOCD crack as needed into this directory.
  15. In KDE, go to Control Center -> Desktop -> Window Behavior and set Alt + Left Click on Window to Nothing. Unless you want to play Diablo without picking up items.
  16. You're all set. Just run wine ~/.wine/drive_c/Program\ Files/Diablo\ II/Diablo\ II.exe and kick some monster ass!
Cross posted on Eudyptula Minor, a Linux cooperative blog I've recently started contributing to.

Tuesday, February 28, 2006


If there's one word you had to associate with Apple, you'd probably make it design; but one word you gotta give to Apple fans is creativity.

Engadget recently held a competition to ask its readers what Steve Jobs will announce tomorrow at an Apple Special event. Well, the results have been posted, the first 2 entries are good but you really have to see the list of entries. Most of them are mind-boggling!

Couple of my favourites...

Jason's iGame

CK's iCube shuffle

Monday, February 27, 2006

Flickr is ticking...

Another day, another awesome app for Mac OS X.

This is tickr, and what it does can only be described as "simple, but profound". Give it a tag, and it will fetch interesting photos from Flickr tagged with the tag. And scroll them at a hypnotizingly slow rate on the right side of your desktop.

I like to look at photos. I've tried a number of ways of doing it - subscribing to photo RSS feeds of Flickr pools, browsing through Flickr or Google Images, and there is always that slight sense of dissatisfaction. There is either too much information, or too little. Too many clicks to get to where you need.

Tickr is just awesome - of course part of its appeal is the Flickr "interestingness" algorithm, because of which it manages to show the best images given a tag. The best part is you need not "do" anything at all - images will just keep coming, you can see them or not, and if you particularly like an image all you do is hover your mouse over it, the scrolling stops, right-click and open the Flickr page in your browser.

And if you're like me and always work with the Powerbook attached to an external monitor (or if you have one of those 1440x900 screens!) real estate isn't a problem. I can forsee my favourites list in Flickr growing and growing.

Sunday, February 26, 2006

Fedora Core 5 Test 3

I've been testing out FC5-test3 for a few days now. Seems to be nice and stable as FC4 was, though with a few annoyances that will hopefully be worked out when FC5 is finally released in mid-March. Here are a few things that caught my attention.

The good
  • Hardware support has improved. I tried to install FC4 and Suse 10.0 on a Dell machine with an ATI X600 video card, and both of them would hang while starting X. FC5-test3 installer has no problems with that.
  • Automounting GUI is much better. In KDE, a desktop icon is created whenever an external drive is attached to the computer (haven't tried it with my PTP camera yet). There is a little green triangle at the bottom right of each icon, which indicates that the device is mounted. You can choose to "Safely Remove" from the right-click menu (wonder where they picked that from), which unmounts the device and makes the green icon disappear.
  • One of the real big pluses for me - Firefox now has full kerning support for Hindi fonts. Actually, this is a bit of a surprise. I have two OS paritions, one with FC4 updated to KDE 3.5.1 and one with FC5-test3 (which has KDE 3.5.1 by default). I have a single home partition, off which I run a downloaded copy of Firefox in both OSes. In FC4, Firefox has problems displaying Hindi fonts correctly, while in FC5, Firefox displays them just fine. I guess they managed to find a way to enable pango in KDE, and make FF use it by default. I tried to do that in FC4 using some environment variable but it didn't help. In any case, this is a big plus and it means I no longer have to load up Konqueror to display Hindi pages.
  • Although the GCC version with this release is 4.1, I think they've installed the 3.3 compatibility libraries by default, so Firefox, for one, just runs right after downloading (in FC4, yum install compat-libstdc++ was necessary).
The bad
  • The KDE screensaver doesn't work. I don't care much for screensavers, but it does matter to me that consequently, "Lock Screen" doesn't work. I'm not sure if this is a problem with my particular install, since its tough to believe that such a basic thing wouldn't be working. I do remember that Red Hat 8 final actually shipped with this issue unresolved. [Bug report]
  • nVidia drivers don't install. nVidia cards and drivers usually work very well for Linux, and installation of binary drivers downloaded from nVidia's site has always been painless. In FC5t3 however, the installation fails at the kernel module build phase. [Bug report]
  • gmailnotify doesn't work under FC5t3 and crashes with an XML parsing error. The only thing I can think of is that an upgrade of Python (2.4.1 to 2.4.2?) causes the problem.

Tuesday, February 21, 2006

Don't mess with my net connection!

Alert: Technical rant coming up.

They say Hell hath no fury like a woman scorned, but I don't think they compared it with a CS postgrad who had his internet connection summarily disabled by the network administrator. That too, for no good reason.

Fedora Core 5 Test release 3 has just been released, and I was looking around the Fedora mirrors to download it. The problem with FC is that not all mirrors keep test releases, and even when they do, they keep CD images. While installing every new test release of Fedora is my idea of fun, the idea of burning 5 CDs every time is not. So I was browsing through a number of ftp site directories to see if any had the DVD image and suddenly, without any warning, out of the blue, I get the SMOD - the security mail of death from the network people. In short, it says, "Your computer has been administratively disabled due to excessive TCP port scanning". I couldn't believe it. I'm running FC4 and running absolutely nothing beyond the usual programs. I've received idiotic security warnings before, and it'll take me more than the sysadmins to make me believe I've got a worm on my machine.

So I go down to the helpdesk. There I am made to wait while the network guy pulls up my records and shows me Exhibit A - my computer, apparently had been trying to establish connections on multiple ports on some servers within a short span of time (for each server, I could see around 5-6 TCP ports on which connections were established rather quickly), registering it as a TCP portscan offense. I asked the admin guy to lookup the IP addresses - they turned out to be all Fedora mirrors. I assured him I had been doing nothing other than looking around for the DVD image. He was still suspicious but enabled my computer again. Phew.

Now I don't know the first thing about networking, so I found some descriptions of the FTP protocol (courtesy AC's, network security expertise) and found out that port 21 is only the command port of FTP, and a data port is assigned randomly for a transaction. And since it is assigned randomly, its seemed quite possible that browsing directories would result in sending packets to different ports.

So I decided to test the theory and ran tcpdump while browsing an FTP server directory. The result? Exhibit B - the partial output of tcpdump:
14:56:46.362982 IP localhost.51939 >
14:56:57.985858 IP localhost.51940 >
14:56:58.796223 IP localhost.51941 >
14:57:03.518263 IP localhost.51943 >
14:57:04.569114 IP localhost.51944 >
14:57:11.413372 IP localhost.51945 >
14:57:12.437386 IP localhost.51946 >
14:57:15.358883 IP localhost.51947 >
14:57:16.373010 IP localhost.51948 >

9 different TCP ports connected to in 30 seconds, only one of them (the first one) being port 21. I tried this on a different machine than the one which was disabled, and so I can be quite sure that both the systems are not infected by something. So it seems one can't browse FTP directories without the risk of being labeled a hacker. God help us all. The sysadmins are going to hear from me.

Monday, February 20, 2006


Someone runs a webserver with an online forum on a Dell C400 laptop. It has a P3 1.1 GHz CPU, 256 MB of RAM, and a 40 GB hard drive. Fedora Core 4 powers the server, which currently has an uptime of 139 days. Confirm it here.

Away for fun

Its strange - most people I know take a break for blogging when they're too busy I'm diametrically opposite - I tend to stop blogging when I've been having a lot of fun. Maybe a bit too much fun for my own good.

I went to L Subramanian's concert yesterday. It was a breathtaking experience. Violin with percussion. Simply beautiful. Words aren't enough to express. The NUS has an arts festival going on with a lot of concerts - I plan to attend more in the next few days.

Watched the entire Indian innings on TV today - absolutely delightful - especially, the latter half. Yuvraj and Dhoni were just too good - and in the last four overs they were toying with the Pak bowling. Following the match online and reading reports just isn't good enough - the Cricinfo bulletin today refers to Dravid's innings (50 off 82 balls) as "totally assured", and I can totally assure you it was anything but. He seemed to find fielders too often, struggled with his timing and looked decidedly frustrated with the latter half of the innings - he just could not score at a good enough rate.

I'd forgotten what a comedy commentary can be too. Sometimes its so painfully clear that the commentary team is totally lost for words and are just making up stuff out of thin air. Rao Iftikar is referred to as a "very experienced bowler" - immediately after which statistics flash on the screen to show he has played all of 13 matches. Right after Gautam Gambhir's ODI scores (of 9 and 21, I think) in the previous matches have been shown, someone in the commentary box says, he's having a great series. Right after a wicket, Hawkeye compares the wicket-taking ball and the one before it, and the dreaded voice says, "Its clear that the ball that took the wicket was slower than the ball that took the wicket". Every time the match summary is flashed on the screen, a certain commentator (experienced watchers will guess who) starts off like an airport announcement. "This is the match summary. You can see from here what has happened so far." Really? Thanks, we couldn't have figured that one out without the piercing revelations. God save us from cricket commentary.

Some commentators, though, can be truly fun. Sachin came down to the field one time (he wasn't playing) with drinks for the batsmen, and (I think it was L Sivaramakrishnan) called him "the most experienced 12th man in the world".

Monday, February 13, 2006

Is this what I've signed up for?

Hong Kong

  1. Landing involves narrowly missing diving into the sea.
  2. Nobody stands still on airport walkalators. Nobody.
  3. Taxi (and bus) drivers seem to sincerely believe they're training for the Formula 1.
  4. The place is a sensory invasion. Signs, signs, and more signs. Nearly every tall commericial building has blinking lights surrounding it. If you're on the road, a passing UFO with blinking circumference lights will simply blend into the background.
  5. Throngs of people all move at top walking speed without bumping into anything.
  6. There's a zip in the air, and a sense of purpose to nearly everything and everyone.
  7. Despite the fast pace, people can be remarkably courteous.
  8. There is no shortage of food joints.
  9. There are very accessible places where you can completely forget you're in one of the world's largest cities.
  10. The city never seems to sleep.
In short, an awesome place :)

Thursday, February 09, 2006

Three cheers for GMail web chat

It seems to be working just fine! And the day it was added to my account - today - I was able to find a use for it too... chatted with a friend right from the airpot. The interface is simple and great - as usual for Google!

Now, if only they could beef up Google Reader...

Wednesday, February 08, 2006

Linux rants

Linux is fun. Lots of fun. Except when you install it on bleeding edge hardware. Then, its a solid pain in the neck. Not often you hear me complain about Linux, but this has been a real tough nut to crack.

So I got hyper excited when I was given charge of a brand-new dual-core Dell machine. What I didn't forsee was sitting in front of it with me head in my hands for hours.

First major problem - video card. The box as an ATI X600 PCI express card. And the moment the Linux installer tries to load X, it hangs. Doesn't crash and give me an error and ask me to continue without X. Nope, simply brings up a white screen and a mouse pointer and hangs. Tried Fedora, tried SUSE. Doesn't work. While both correctly probe the card and recognize it as an ATI X600, neither can successfully start X. Have to stick with text mode installs, and in the case of Live DVDs, runlevel 3.

Second major problem - the SATA RAID array. Apparently there are no drivers for that particular RAID chipset on any Linux so far. And since I'm required to keep the RAID array, it appears the only choice I have (which still hasn't worked for anyone indexed by Google) is to try and insert a temporary third hard drive, install linux, patch and compile a new kernel with experimental RAID support. Even I don't have enough time to do that. Before that, I'll try and set up a software RAID through Fedora instead of the hardware RAID. I'm desperately hoping though that FC5, due in March, will solve the RAID support issue... FC5-test2 is being downloaded for testing.

And this is the story of how the fastest computer I've ever installed an OS on is currently of little more use than a brick. Makes me real happy I bought myself a previous generation AMD Sempron with a nVidia FX5600 at home which runs Fedora like a dream.

I wish hardware manufacturers would provide more drivers for Linux. Novell recently ran a survey on what software people wanted to see ported to Linux, with the idea of lobbying those companies to port their software - but seriously, whats the point of porting Photoshop on Linux if you can't run it on the latest hardware? How about lobbying Intel, ATI and nVidia for producing better drivers for Linux? And while they're at it, how about being a little less snotty about driver code being open source? Although ATI and nVidia drivers exist, they're binaries only and therefore cannot be included with the Linux distro. An attitude like this is exactly what'll make it far more difficult for Linux to become accepted as a desktop OS. Yes, there are people like me, who are happy to install linux in text mode, know how to boot into runlevel 3, run lynx and wget to install the latest binary drivers and then load X, but they are few and far between.

Tuesday, February 07, 2006

GMail offers web chat

The service isn't working yet... but its being rolled out. Here's a screenshot of what I get so far.

Wednesday, February 01, 2006

Truth can be stranger than fiction

I ran across a headline on Ars Technica that said Microsoft's alternative to US$100 laptop: the cell phone. My initial response to the article was to laugh out loud and wonder whether it would come with a free magnifying glass to see what would probably be the 160x120 pixel screen, with a 6x4 icon that would represent the Start button. And maybe a toothpick to be used while typing on a cellphone's keyboard.

Microsoft, however, have it all worked out. They intend the device to be connected to a TV, no less, and have an external keyboard for input. Dumbstruck is me.

So, this brilliant mobile contraption that will bring the light of technology to the remotest regions of the developing world will weigh in at about 12.25 kilograms and come in a two feet cube box? I can sure see UPS profiting from this. Or will the said TV and keyboard be necessary, but not included, options? TVs and keyboards, of course, are the commonest things you can find in the remote places in this world.

Whatever it is, I sure hope the cellphone has a smart key for Ctrl+Alt+Del.

Tuesday, January 31, 2006

Haroun and the Sea of Stories, by Salman Rushdie

This is a beautifully written book. A fantasy tale, its central theme itself is the role of stories in life.

The plot revolves around the boy Haroun, the son of a famous storyteller. Haroun's father has lost his ability to tell stories - and Haroun travels to the origin of his father's wonderful stories - a second moon on Earth called Kahani, home to the Sea of Stories. The sea is in danger of being gravely polluted by evil forces who don't believe in stories and its up to Haroun and his friends to save the day.

The writing is wonderfully imaginative and full of humour. A number of names used in the book are taken literally from Hindustani. We have the chatterbox princess Batcheat, the General of Pages Kitab and so on - and the end result of that can be surprisingly funny. Even better than being entertaining, the book serves as a great reminder that each of us has an imagination and its intended to be put to good use rather than put on the backburner while we lead our routine lives.

Monday, January 30, 2006

Six IITians start Paritrana

It's heartening to see young people in India starting a political party. Much of the problems of the Indian political scene - we feel - is due to lack of involvement of new ideas from the younger generation. Lets hope Paritrana can fill the gap.

I'm impressed by the party's ideology, which is based on a system of social organization. So much better than blanket cliched phrases like the 'good of India' and so on (the mission statement of the party, however, I do find very vague). To develop the party's infrastructure, though, we'll need to see a lot of work, and it will be up to the younger generation community to provide the input and support.

Saturday, January 28, 2006

Star Wars - Dark Lord: The Rise of Darth Vader, by James Luceno

Couldn't resist the title and the cover - I bought this book soon after I returned from my trip to India. The story starts just after Episode III ends. Overall, its just about a decent book. Revenge of the Sith (the book) has seriously raised both the writing standards of Star Wars Literature as well as the community expectations, and Dark Lord is certainly not what I'd call a worthy sequel.

The plot is centered around a group of Jedi who survive Palpatine's order sixty-six (ordering the clones to kill all Jedi). The story unfolds as they make their choices and both Vader and Palpatine go after them. In the background, the development of Palpatine's increasingly dictatorial and fear-based Empire is shown. The book also sheds light on a little-discussed but important facet of the Force - the training in the ways of the Sith of Darth Vader. The dissenters of Palpatine - mostly Senators Bail Organa and Mon Mothma also figure in the plot, and the options for opposing the Empire are discussed.

The strength of the book, of course, lies in the fact that the story is spun around almost all the important events after Episode III, and overall its a good story, pretty much a page turner for me. Where the book failed (for me) was that I felt that every issue could have been handled so much better - especially the parts that deal with the Force - the response and thoughts of the scattered Jedi, as well as the dark side training of Vader. James Luceno does talk about the Force in detail - but in my opinion, lacks the depth that Matthew Stover and Timothy Zahn have repeatedly shown in their books.

The only distinguished Jedi character in the book is Obi-Wan and he too is only mentioned in the epilogue. What's more, he is shown to panic as soon as he realizes that Anakin (Vader) is alive and may come to Tatooine and recognize his son, Luke. It takes Qui-Gonn from the netherworld to calm his fears down. Doesn't sound like the unruffled Master Obi-Wan we all know and love, does it? It's the presence of many small things like this that make the book - for a Star Wars fan - slightly ridiculous. The rest of the stuff - lightsaber and space battle descriptions, political maneuvering, some humour - is good; but I really think the basics could have been done much better.

On a related note - lately, Star Wars books of the Clone Wars era have always released only in hardcover at first, and paperback editions always come a few months later. I see this is as pure exploitation of the fans - but I guess now that the movies are over, this is one way for Lucas to make his money. I really didn't mind shelling out the money for a classic like Revenge of the Sith, but spending 40 bucks on this book seems a sheer waste of money. Next book, I might just sit in Borders and read without buying.

On a happier note - Timothy Zahn's Outbound Flight is due to release soon - and given his previous record (Thrawn trilogy, Hand of Thrawn duo, Survivor's Quest) - I have high expectations from this book. Hopefully, next week will find me at Borders.

Thursday, January 26, 2006

Jai Hind!


Wishing all Indians a very Happy Republic Day. This and other snaps from today's celebrations at the Indian High Commission are here.

The poster was created using fd's Flickr Toys.

Wednesday, January 25, 2006

Real-world security

On our network, we have a daemon that continuously port scans all our PCs - basically attempts to hack them and reports any vulnerability it finds. I used to be really impressed with the idea; until I saw some of its reports. Here's the latest.

I get a report of a critical security vulnerability and warning me that if I did not fix it immediately, my system would be disconnected from the network. The synopsis of the problem? "It was possible to access the Windows Registry remotely on your system". Very interesting, especially given that my computer runs Fedora Linux.

The network security people, of course, have no clue why this is coming up. Any Linux geeks out there who have any idea? Is this a Fedora Core 4 easter egg by any chance?

Friday, January 20, 2006

I Dare! - Kiran Bedi A Biography by Paramesh Dangwal

In a 2002 poll, Kiran Bedi was adjudged by "The Week" magazine to be the most admired woman in India. After reading this book, I was not at all surprised. For a woman who starred at tennis and managed to get fame even as a traffic cop, her achievements spanning crime prevention, police training and being an advisor to the UN have only become greater.

The popular myth - that nothing can be done about the inefficiency, lethargy and corruptibility of Indian government service - gets powerfully dispelled. Throughout much of her career, Kiran Bedi has done nothing but get more service and productivity out of the staff that were assigned to her. From changing the traffic situation in Goa with a mere 25 cops to getting the respect of the outsider-unfriendly state of Mizoram as Police Commissioner, her ability to marshall her resources shines through. What's amazing is that it often took just this one person, and maybe a few others to cause massive changes in the police systems and operations. I began to believe at the end of the book that the critical mass required for change - even in a system that can be as rotten as the indian civil service - is not so huge after all.

This is basically a book about leadership. Leaders basically act as catalysts for positive change. While today leadership in literature is mostly about CEO's, the magnitude of social change that Kiran Bedi has started is (to me) much more impressive than that. One of her famous postings was as Inspector-General of Tihar Jail in Delhi. Before she arrived, it was known to be a hellhole. Drugs, physical abuse, corruption, disease, prisoner deaths were common. In the short span of two years, she converted the prison into "virtually an ashram" in the words of the press - which in involved man-management of over 8000 prisoners and hundreds of staff - all of whom were beset by common problems. The book tells the story of the innovative methods - mostly rehabilitation and correctional efforts managed to change a place like Tihar in such a short span of time. Another aspect of undaunted leadership is that Kiran Bedi often found huge opposition from politicians and others who didn't like her making changes to the system - and she manages to accept these realities and still carry on her work at the same time.

Kiran Bedi herself is the author of four books and runs two voluntary organizations - Navjyoti and India Vision, and has a PhD from IIT Delhi in Social Sciences.

Saturday, January 14, 2006

India vs. Pak - 1st Test, Day 1

I hope Team India has got the message. This is not the Pakistan team we played in 2004. I watched every ball of today's play and that fact is imminently clear.

The pitch, of course, is flat - perfectly suited to batting. That fact only partly explains the scorecard at the end of the day's play (326 for 2). The other factor is that Pakistanis seem to have turned into something they were hardly ever accused of - professional, solid cricketers. You miss so much of a test match if you simply follow it online or watch highlights. While there was little assistance for swing or bounce from the pitch today, the Indians did bowl very tightly in the first session and to some extent, the second. Younis Khan and Mohd. Yousuf were shining examples of "playing the ball on its merits". The number of good balls they went after were few and far between, and any loose balls - Kumble bowled quite a number - were dispatched. The Pak team of two years ago might easily have lost six wickets under the same conditions - because they appeared then to be a team without a plan, the only visible intent was to go out and bat. Today was a whole different story. If today's attitude is a trend, we will find it very very difficult to win this series.

As far as the Indian bowling is concerned, there is just one word to describe it - lacking in ability, as both Imran Khan and Sanjay Manjrekar put it. On a pitch like this, they can do precious little to get wickets except hope for the batsmen to make a mistake. Pathan and Agarkar are painfully slow only around 80 mph, and without bounce or appreciable swing, their good balls are easy to defend and the bad ones easy to hit. A question asked in the discussion is a very good one - why has it been ages since India had a genuine pace bowler? Can it be that among the millions of people who play competitive cricket in India - there are no good genuine pace bowlers? Agreed pitches in India are not suited to seamers - but on a surface that lacks pace and bounce, a bowler who's just plain fast should theoretically do better than people like Pathan or Agarkar who aren't fast but can achieve decent swing and bounce if assisted by the pitch. But I digress. With four specialist bowlers, and only two seamers; its painfully obvious that we are not going to make an impression on Pak pitches. Zaheer should have been played, not just to give Dravid more options but to explore and get the seamers used to the conditions - you cannot expect to win a series in Pak without a good pace attack. We have quality spinners for wickets that turn - if they can't do much in Pakistan (and it was quite clear they can't), then both spinners have no business being in the playing eleven.

Lets see how things go tomorrow. Pakistan are looking at a declaration after 600. Looks likely that we'll get one or half a session tomorrow to bat. It will be good to compare Pak's pace attack against ours.

Tuesday, January 10, 2006

Cricketing music

One of the many wonderful things about being in India. Five sports channels. The crucial part is - at any given time, at least two will be showing cricket. I've been home for three days and all three nights, I've slept off watching cricket at night. No better lullaby than "Thats an excellent drive.. he came to the pitch of the ball and excellent transfer of weight into the shot..."

Can't wait for Friday morning - I cannot remember the last time I saw an India-Pak test match at home.

Thursday, January 05, 2006



Research topics in Computer Science

I recently got an email out of the blue from somebody asking me to suggest a topic for a PhD in Computer Science. I can only think of three responses to such a question.

The instinctive response, of course, is to tell the person to go consult an astrologer - whose input I figure will be much more useful than mine. Hey, at least it won't be totally random.

The second response is the truly random response. Think of the most complex terms in Computer Science and plug them together to concoct a topic. Fortunately, this is something that a charitable soul at Purdue has already done.

The third response can be classified in the "smart-alec" category. Simply return with a list of all possible topics in Computer Science which squarely puts the ball out of your court. Also guaranteed to cause complete confusion in the best case and mental degeneration in the worst.

Probably a fitting way to sum it up would be to borrow the Oracle's dialogue from the Matrix: "You seem like a nice guy, and I hate giving good people bad news."

Wednesday, January 04, 2006

Java vs. C

Joel Spolsky, recently wrote an article talking about the dangers of letting CS courses in universities move to Java from C, Scheme or Lisp. I'm not sure I agree with that point of view entirely.

His basic claim is that "Java is not, generally, a hard enough programming language that it can be used to discriminate between great programmers and mediocre programmers." The reason? From his point of view, the Gods of programming are those who are familiar with two main things - pointers and recursion. Since Java doesn't have pointers and most Java courses or programs don't bother about recursion, he thinks dumb people can find it easy to write in Java. He believes C or scheme or lisp is needed to "weed out" the dumb programmers.

Here's my perspective - as a programmer, I am quite comfortable with pointers. I just rewrote (ported) a piece of MATLAB code to C, line by line, and since it was full of matrix operations, it was full of pointers. I have implemented pointer-based hashtables, written geometric collision-detection code using pointers and grids of pointers; and I was happy doing it. I've even done some assembly language programming on DSP chips. That was tough, no doubt about it, but given that I did it when I was basically a novice, its not all that bad. I've been programming on Java rather irregularly (I'd much rather code in C++ any day), but I've done complex projects like compiler design or AI implementations in Java. And I still find it hard to design and write a good program in Java.

Here's my take on pointers. They're boring. I use them all the time, and yes, your program will segfault and give you weird errors. Most people believe that debugging that requires some kind of great depth in understanding. It does not. All it requires is patience, attention to detail and caffeine. Its a process of following the thread of reference changes until you find the bug. You learn from your mistakes when your mistakes are in concepts or fundamentals. With pointers, mostly the mistake is you incremented the wrong value, or added something when you should have subtracted. Nothing very profound.

I must admit I missed Joel's point about recursion. Probably thats because I don't know Scheme or Lisp, which deal very specifically with recursive programs. I've implemented identical recursion routines in C and Java (depth-first search and dynamic programming problems come to mind) and the difficulty level has been exactly the same.

There is no doubt that using a lower-level language results in more frequent errors. But is a good programmer one who works on the most error prone language? Even an expert C programmer will screw up at times, and probably more than an expert Java programmer, because pointers are inherently error-prone. If all you want is for a programmer to be able to write difficult code, why C? Why not ask all the schools to train people with punch cards and machine language programming? Clearly we don't want to do that - we know we can eliminate a lot of errors by using higher level languages. And then people talk about knowing the basics. Sure, an implementing a linked list using pointers does illustrate the concept behind it. Any CS 101 course (including that in a Java School) will do the same, and the "bright" kid should not need to painfully work at pointers to understand what the relative merits are of various data structures. In my C class my professor reminded us, "You should all implement a pointer-based linked list. Exactly once in your life. After that, use the libraries."

Joel speaks of 6.001, an extremely tough course at MIT that bad programmers are very likely to drop out of. When I met CS undergrads during my stay in MIT recently, they spoke of 6.170 (which is taught in Java) being as tough as 6.001. While Java and C can be used for the same purposes the intent of each language is different. I think people who program in Java are much more proficient in thinking about high-level, large scale software design (enterprise databases for example) and C coders are much more comfortable with aspects of low-level programming (the Linux kernel). So if you want to judge how smart a Java programmer is, asking him about pointers and recursion is perhaps a bad idea; asking him about OO design and looking for the right answers will probably work better.

The bottom line is that training in Java and C gives you slightly different skill sets and I don't think its fair to say that Java is too dumb a language to judge a good programmer by.