*** MOVED ***

NOTE: I have merged the contents of this blog with my web-site. I will not be updating this blog any more.

2009-01-01

Hampi

Anusha and I recently visited Hampi to take a short break. Hampi is what remains of Vijayanagara, the capital of the Vijayanagara empire. It is about 350 kms north of Bangalore and is famous for its splendid ruins. Many of these ruins are very well-preserved and are made of granite that is found in abundance in the surrounding hills.

2008-12-25

"Dimensions"

I came across the "Dimensions" video via Reddit. It tries to help you visualise four-dimensional objects via their projections onto ordinary three-dimensional space. If you have even the slightest interest in mathematics, you should check it out. You can either view it on-line or order a reasonably-priced DVD. The video is about two hours long.

2008-12-20

Decision Tables

I still see a lot of code with complicated if-then-else conditions that can be simplified quite a bit by the simple technique of using decision tables. A decision table is a compact yet exhaustive way of encoding conditions and the actions to be taken under those conditions. The rows and columns of a decision table denote the conditions and the cells denote the actions. Since it simplifies complicated conditional logic, it can make your code a lot easier to maintain and a lot less error-prone.

2008-12-14

"You Can Leave Any Feedback You Want..."

"...as long as it is good." This seems to be the unwritten instruction on feedback forms handed out to diners by many restaurants in the city. If you thought that such forms help a restaurant to improve itself by taking the feedback of its customers into account, you are apparently mistaken. Such forms are seemingly designed only to stoke the egos of the restaurants' owners and managers. A couple of recent incidents have led me to this conclusion.

2008-10-16

EOF on the DDJ Subscription

I have let my subscription to Dr Dobb's Journal (DDJ) expire, even though I liked the magazine a lot.

2008-10-13

Indian Edition of the Purple Dragon Book

After a long wait, the low-priced Indian edition of the Purple Dragon Book ("Compilers: Principles, Techniques and Tools", 2nd Edition, by Alfred Aho and others) is finally available in bookshops. The ISBN for this edition of the book is 9788131721018.

2008-08-19

Investment Basics for Indians

My colleague Ryan stumbled upon a nice guide that explains the basics of equity and debt investment for Indians. It is available via the web-site for the National Stock Exchange (NSE) as the study material for the "Financial Markets (Beginners)" module of its certification programme.

2008-07-17

ICFPC 2008

I participated in the ICFP contest again this year. The task this year was to write a programme that guides a rover on the planet Mars towards its home base within a time-limit of 30 seconds, while avoiding boulders, craters and hostile Martians. The rover would get telemetry data from its sensors (which could see over a very limited portion of the terrain at a time) roughly every 100 milliseconds. As usual, we were given 72 hours to solve this problem. As it turned out, I encountered an unexpected problem during the contest and my final submission turned the rover into a "buggy", if you get the drift.

2008-07-02

Major Programming Contests This Month

There are a couple of major programming contests coming up this month. The first one is the ICFP Programming Contest 2008 (11-14 July). The second one is the Google Code Jam 2008 (qualification round on 16 July).

There was also an article in DDJ about programming contests a couple of months back. It is an interesting read, but there is nothing new in there for those who are already familiar with TopCoder.

2008-06-15

Firefox 3

I have been using the release candidates of Firefox 3 on Linux for some time now. The experience has been quite good so far. I would encourage you to try it out for yourself - in fact, download it on the 17th of June and help Mozilla set a world record.

Firefox 3 comes with quite a lot of fixes and improvements. The "Field Guide to Firefox 3" is a nice page summarising the more important improvements. It seems to have improved a lot in terms of memory usage and speed. You just have to use Gmail to see the difference in speed for yourself. Since I never open too many tabs, use too many extensions or keep the browser open for too long, I have never personally run into memory-usage issues with previous releases of Firefox and I can't really say if the improvements in this area are that drastic.


One of the more important fixes for Indian users of Firefox on Linux is its improved support for complex text layout, which is used in quite a few Indic scripts. I have complained about it before and I am happy to report that it now seems to work fairly well:



Devanagari Text Rendering on Linux: Firefox 2 (left) v/s Firefox 3 (right)


The composite screen-shot above shows the difference between Firefox 2 and Firefox 3 when rendering Devanagari text (from Josh18) under Linux. I have circled some of the words that were rendered incorrectly by Firefox 2 and correctly by Firefox 3. (Click on the image above to see a larger version.)

It has not been all wonderful though. There are still some issues that make my experience with Firefox 3 less than ideal. The most egregious of these is how some web pages using Flash either cause Firefox 3 to freeze up or just crash with a segmentation fault (of course, this could be due to a badly-written Flash Player plug-in). The other issue that has persisted from Firefox 2 but now seems to have become worse for me is how Firefox would just freeze for a second or so every now and then, especially noticeable while scrolling up and down large web pages. This might be related to garbage-collection cycles, but I am not sure about it.

Incidentally while Firefox 3 itself mercifully does not require GNOME (I am a happy KDE-only user), its new crash-reporting tool does need a few of the GNOME libraries. This tool is now based on Google Breakpad. I found that the crash reporting tool itself would crash while trying to send a crash report to Mozilla. That was fixed only after I installed GConf, ORBit, libIDL, D-Bus and dbus-glib. It still failed to send the crash reports and it turned out that I must also install and configure Curl. Of course, ordinary Linux users with a typically-bloated Linux distribution would not run into such issues.

By the way, there is now a new pseudo-URL named "about:crashes" that would let you to lovingly admire the crash reports that your instance of Firefox has generated and submitted to Mozilla.