Monday, January 30, 2006

Physics of 15 Park Avenue

The title is a little misleading. I have little to offer on the physics of 15 Park Avenue. But I have some observations. For those not in the know, 15 Park Avenue is a new movie by Aparna Sen -- the director of the amazing Mr. and Mrs. Iyer.

I saw this movie a few weeks ago, and we weren't prepared for the grim mood of the movie. Nevertheless, we came away impressed with the movie. Before you read any further, there are spoilers below -- so if you haven't seen the movie, you might be better off not reading ahead.

From the very beginning of the movie, it seems to have a thread running about questioning reality, and there is also a thread that keeps mentioning quantum physics. Shabana Azmi is a quantum physics professor. She befriends a neurologist who is treating her sister -- played incredibly by Konkona Sen -- of schizophrenia. Together the doctor and the sister have conversations about what is real and what is not. The movie ends where you are left wondering what it was all about -- and it kind of ties these odd ends about quantum physics and reality and alternate worlds, though still leaves a lot of questions.

The other interesting aspect about the movie was how all the characters revolved around Mithi the schizophrenic. Everyone brought their perspective -- the educated sister treats her like a project and a responsibility, the old mother just looks on helplessly, the maid treats her like a pain she has to endure, the deserting lover looks at her with guilt and seeks redemption in trying to help her.

In one of the conversations in the movie, they discuss a sadhu who "hears voices in his head." The mother is an instant believer who thinks this can happen. The scientists are all non-believers and think he is a charlatan. The doctor brings his perspective -- maybe the sadhu is schizophrenic? And this ties the conversation with Mithi, who talks and lives in a world different than the one others around her are living in.

--

I saw Rang De Basanti last night -- another patriotic themed film by Aamir Khan. It was many times better than the damp affair called Mangal Pandey, of course. The movie had its flaws but I thought the movie was quite well done.

Teaching myself Lisp

Whenever I can make some time these days, I try and make progress with learning Lisp. To begin with, I started with a refresher on Lambda. I remembered some of the lambda calculus stuff, but not a whole lot. Google search pointed me to Wikipedia entries, so that's where I went.

Next I searched for some basic tutorials on Lisp that could get me started. This is the one I ended up using: http://www.notam02.no/internt/cm-sys/cm-2.2/doc/clt.html
Once I was through with this tutorial, I started looking for good books. I found the Common Lisp: The Language book online. I've now downloaded it on my powerbook (which is running for hours on battery now!)

I always felt I could learn better if I had programming problems to work through. They make you wade through some basic concepts that elude you when you are simply reading tutorials etc. After I looked around a bit, I picked up the class assignments from a course at Georgia Tech (where I actually had spent 2 years, without taking this course -- what a waste!): Class CS 2360.

I am almost done with the second assingment now. They weren't very tough, but I couldn't stop myself from smiling when I solved some simple problems like swapping the first and the fourth elements of a list, or implementing simple set operations.

I also bought a copy of Structure and Interpretation of Computer Programs. It's been a great read so far -- I am still in the first chapter.

Monday, January 23, 2006

Of soundtracks, Korean movies and Indian copies...

I saw the Sajay Dutt starrer, Zinda, this weekend. I thought the movie was a far superior product than what one would have expected. I think it's also largely due to the ability of the lead actors being able to carry off their roles. There were all kinds of goofs and letdowns, but nevertheless this is a good product from Bollywood.
One of the funny goofs was when a guy whose both hands have been cut off is asked where the girl is, points using what must have been his third hand, "upstairs."

Now, one of the reasons, I am sure, this movie appeals to me is that it is remake of the Korean movie Oldboy. I have a weak spot for Korean and Thai movies, and I end up watching a lot of junk from them just because I want to not miss out on a rare gem somehow. That's how I got to see Attack the Gas Station, Jakarta, The Eye, One Missed Call and so many other very good movies (imho). In any case, Zinda did a good job with the production though they could have easily done with someone better than the leading ladies they actually hired -- one thinks of Shilpa Shetty.

One or two movies every couple of months seem to have really good soundtracks. Bluffmaster did it with its hip hop tracks a month or so ago, and now Zinda with its tracks by Strings. Pakistani bands seem to be the flavor du jour, and fully deserved too. Jal, Fuzon, Strings -- all these guys rock!

Lisp..

I met Ranjit for lunch a couple of days back, and naturally there were plenty of geeky things to talk about. He had made references to Lisp related blogs recently, and conversation steered towards functional programming and like for a bit.

About a year and a half ago, when I started working on a brand new product, the nature of the product naturally lent itself to be implemented in a functional programming langauage -- or so I believe. Unfortunately I can't talk about it in detail, but I was very excited that I might get to tinker in Lisp or ML once again. But it wasn't to be. This time, however, I am a little bit more determined to just work in Lisp for fun, if nothing else.

This led to an exercise of installing CLISP on my powerbook. I have Panther (10.3), and the majority of my pain in getting CLISP installed was in finding how to get the Xcode developer tools installed. It turned out that the whole thing was incredibly simple once you knew where to install from. In any case, as of this morning, I have CLISP on my laptop, and I feel like child again, eager to get back home from work and play!

Saturday, January 21, 2006

Bringing the powerbook battery back to life

For some time now, the battery on my 12-inch powerbook had been behaving erratically. I noticed it first some 4 months ago, when the battery went from 100% charge to dead in about 10 minutes. Initially I thought the battery must be close to dying (it has been close to two years of usage). Last week, I decided to at least tamper with it a little bit. With only a little bit of internet research, I figured that the problem is probably related to the memory problem, and I found two ways people have fixed similar problems. I narrowed down the possible things I could try to fix the laptop to these two: boot up open firmware, and try to reset nvram; and try and completely discharge and recharge the battery a few times.

I didn't know how to boot up in open firmware, and this place had some good information to get me started. Other people had written about how they had fixed battery problems in open firmware too.

Once my powerbook was in open firmware, i reset-nvram, and reset-all -- resulting in the latop restarting. There didn't seem to be any effect. The battery was still draining pretty quickly.

Then I started the process of draining the battery completely. In order to do this quickly, I downloaded BatteryAmnesia, but it didn't work -- it kept reporting that the AC adapter is connected when it wasn't. It probably did its best and there was a problem with the battery I needed to fix, but I was a little disappointed with the software -- as a programmer myself, I expect programs to work when users use them.

So I began the process of letting the battery drain off completely, and then recharging it again. After a couple of these sessions I noticed that the powerbook would start reporting only 1% charge left after about 20 minutes of work, but then would stay on for another hour or so at that level. In some ways, the problem was fixed -- my battery was lasting much longer now than it was earlier.

After a few more sessions of fully draining the battery and recharging it, the battery seems much healthier. It is charging and draining at a much lower rate -- which does seem to indicate a "memory problem" as the root cause.

Kumarakom and Allepey

A couple of weeks ago Pooja and I went to Kerala. We planned it at a very short notice, but we managed to still get to do what we wanted to -- which was a day at a lakeside resort in Kumarakom, and a houseboat cruise. We were initially trying to book it online, but decided to go through a travel agent, in the hope of getting better rates. It turned out the buggers charged us the rates we saw online, and added their own margins on top of it. I've seen the same thing now with just about everything in India -- flights, hotels, holiday packages. Probably the best rates you want are already available online now.

I wholly recommend Kerala visit to everyone -- it is indeed a place out of this world. Sitting by the water in Kumarakom in the evening was probably one of most pleasant memories in India. The day and night in the houseboat was great as well. We travelled from Kumarakom to Allepey, but I believe most of the cruises are from Allepey to Kollam.

Thursday, January 05, 2006

Hampi

We went to Hampi on the new years' weekend. It was a very quiet new years, but great nevertheless. The city of Hampi was a part of the old Vijayanagar empire till the 15th century, when it was brought to ruins by invaders. This was the first time I saw preserved ruins of a whole city. Cities like Delhi, Udaipur, Mysore, Hyderabad have their own (and even longer) history, but there are layers of cultures that have hidden, or completely erased what existed centuries ago. In most of these cities you can still see the more magnificient pieces of architecture -- the palaces, the forts -- but in Hampi you can look over what used to be an entire city, complete with markets, temples, festival grounds, drainage and drinking water aqua ducts and more.

The city has boundary walls that have gates to come in and go out -- large enough that elephants used to come in years ago, and buses make it through easily now. The moment you enter Hampi, you immediately feel as though you've been transported to a different time. On barren rocks you see beauty in the form of architecture of old everywhere. I found it fascinating to see what seemed like resting places for trekkers in several places -- in the middle of what seemed like nowhere.

The most majestic and impressive of the temples was defintiely the Vithala temple. This temple has "musical" pillars. It is difficult to describe but there are actually different instruments that you can hear when you play on different pillars. Besides this, the Queen's bath was interesting -- one of the times when the good old phrase comes to mind: "It's good to be King!"

We stayed across the river, and getting there by car was quite an adventure. The village across the river from Hampi is now just a row of guest houses and garden restaurants, all catering to mostly foreigners and hippies. Nevertheless, it was not very expensive. I recommend though that you stay in Hampi, preferrably in a guest house or in the Hotel Mayur Bhuvaneshvari that's run by the Karnataka government. You have to take a boat to go across the river, and it stops running at 8pm, and doesn't start till 6am. We were planning to leave Hampi very early morning on Monday, to get back to work in Bangalore, and had to drive some 40 km on very bad roads to get across.