*** MOVED ***

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

2006-06-23

Calculating EMIs

Most of the software engineers I know here in Bangalore have either already bought a house or are planning to buy one. The biggest incentives are perhaps the easy availability of home loans at interest rates far lower than that available to the previous generation and the tax-breaks one gets here in India on the principal and the interest paid on home loans. Our generation is also not averse to taking on a debt unlike the previous generation. In addition, many of us feel that it is better to take the plunge now and enjoy the comforts of your own house than to diligently save all the required money for years and then buy a house, only to find out that the dream was realised a bit too late in your life.

2006-06-22

Libraries

I really miss having access to a well-stocked and conveniently accessible library of books here in Bangalore. I really like reading books and it is not possible for me to buy all the books I fancy reading. It is not just a question of being able to afford these books; I do not have enough space in my home to stock all such books and they are a pain when moving houses.

2006-06-20

Sports

The football world cup is messing with my sleep patterns but I do not mind it at all. It is one of the most wonderful games to watch (and play), especially at this level of competition. What is especially amazing this time round is the fact that little countries like Trinidad and Tobago, Cote d'Ivoire, Ghana, etc. are playing so well against the "big guys" of the game. (With a population of around a billion each, neither China nor India seem to be able to put together a team of just 11 men who could compete at this level.)

Unlike most of my countrymen, I do not enjoy watching cricket at all - I cannot fathom how people can spend an entire day watching a game like this (for the "shorter" one-day matches) and (even worse) how they can spend five days watching the longer test matches where most of the time the result is a frustrating draw! Do people really have so much free time on their hands? Cricket is also a frustrating game to play - if you are neither a good batsman nor a good bowler (as I was), all you can do is wait in the field for the ball to come over to your nook of the universe to brighten up your otherwise utterly dull existence. Football, Volleyball, Basketball, etc. on the other hand are such wonderfully participatory games.

By the way, even though I quite like playing Pool and Bowling myself, I cannot watch these games being played at the professional level since the players have become so perfect! Seeing one strike after another in Bowling or seeing all the target balls being pocketed perfectly and the cue ball being positioned perfectly for the next shot every time in Pool ceases to remain interesting for me after a while. Watching the Chinese or the Koreans play Table Tennis is a similar experience for me - they are so perfect. That way Tennis and Football are a long way from being perfected though the professional players are fairly good and are therefore still very exciting to watch. I hope they never perfectly play the game of Tennis (e.g. hitting an ace on every serve) or Football.

2006-06-16

Spam

Gmail is pretty good at detecting and filtering out spam, but these days a lot of spam is making its way past Gmail's filters. Spammers have started sending emails where images show the text of the email, leaving no hope for Gmail's filters to process the text to determine if its spam or not (unless of course they use an OCR software, in which case the spammers might resort to using captcha-like text in the images, ad nauseum). I have also started receiving a lot of spam in languages like Chinese and Spanish (perhaps Portuguese, I can't tell), again something that Gmail's filters apparently can't process.

A big irritant on Gmail is its single biggest misfeature (in my opinion) - mails delivered to, say, "r.mathew" are delivered to me ("rmathew"), filling my inbox with random (sometimes personal) mails. They try to justify it as a feature, but since they let people register usernames with a period for a while, this can either get very amusing or very irritating for a lot of people depending on their disposition. Why can't they just stop implementing this "feature"?

Anyway, I have now become used to quickly scanning the subjects and senders of the mails in my inbox to select and "Report Spam" the ones that are obviously spam and then proceeding to read the mails in my inbox.

2006-06-15

Driving In India

This video shows an example of how people drive in Indian cities. This is unfortunately not an exaggeration - for example, the junction of Taverekere Main Road and Hosur Road near my office building has a traffic pattern very similar to the one shown by this video. I come to work every day driving through such traffic. No wonder foreigners find it very difficult to drive in Indian cities and Indians find it very difficult to control their urges in foreign cities.

2006-06-12

GCJ for MinGW

I have updated my article "Building GCJ for Windows" and the associated scripts to work with the current SVN mainline sources of GCC (to be released as GCC 4.2). They might also work with GCC 4.1 sources, but I have not checked it myself. The article also has some tips for building GCC natively on Windows using the MSYS toolkit, especially to make the built and installed GCC relocatable (see below).

A major portion of the effort went in to ensure that the resultant toolchain was actually relocatable (that is, the installation can be archived and then extracted elsewhere, possibly on a different machine, and everything can still be expected to be working). The proper locations of the Windows headers and runtime libraries and the flags to pass to the GCC configuration scripts were something that took a lot of trial and error (and a lot of help from Mark Mitchell and Danny Smith) to get right, since I was trying to do something less common (building cross and crossed-native compilers) for a platform that gets the attention of very few GCC hackers as such, if at all.

I had stopped working on GCJ for Windows quite a while back and the reason I had to update my article and scripts was that there seemed to be a lot of people trying to build GCJ for Windows themselves using the latest released or in-trunk sources (and my instructions and scripts) and they were running into all sorts of issues. Unfortunately, GCJ on Windows has become worse than it used to be which is understandable since there is no one who is actively working on it to improve it. It is also a shame since even though it is a closed platform with an ugly design it appears to have the most number of users enthusiastically willing to try out GCJ.

We must do something about this situation.

QEMU
For a fan of Linux trying to make GCJ for Windows work, a very useful property of GCC is that it can be built on Linux as a cross compiler or as a crossed-native compiler targetting Windows. For a person with a relatively old machine and limited free time to hack on GCJ, this is also important since the build on Linux is way faster and far more reliable than that on Windows itself using MSYS. Equally important is the ability to test out the binaries created in this process without having to reboot the machine into Windows or having access over the network to another machine running Windows. Wine doesn't quite help since I need an environment that is as faithful to the real thing as possible.

QEMU running Windows on Linux comes to my rescue here. When run with the -kernel-kqemu option using the QEMU Accelerator ("kqemu"), the guest OS runs at very close to native speeds without adversely affecting the performance of the host OS. It has a built-in TFTP server that allows you to easily transfer files from the host machine into the guest system (there are also other ways of achieving this using QEMU, but this is the simplest). It's almost magical and is immensely useful. It's no wonder that virtualisation is becoming so popular these days and every developer who has tried it out sings its praises. If you are an "enterprise software" developer, you should already know what I am talking about. If you haven't tried it out yet, you really should. Virtualisation offers you the freedom and the flexibility to play around that is very useful and quite addictive.

2006-06-07

"W", "A" and "D"

Tarandeep gave a short presentation on JavaServer Faces the other day and I couldn't help but wonder how similar it was to the "W" web-application development framework that we had developed about seven years ago when I used to work for "T".

"W" was an MVC-based framework written in Java that encouraged you to build your web-applications as a composition of reusable components rather than as monolithic one-time efforts. Since "T" used to build a lot of web-applications for its clients, we found ourselves doing some things over and over again, with only slight changes in look-and-feel and functionality for different applications. To save ourselves time and effort (which meant you could do the same stuff for lesser money - a big advantage over your competitors in the cut-throat software services industry), we developed the "W" framework and used it in our work.

"A" was a similar framework developed around the same time to provide a set of services that were needed by almost all the Java web-applications we were developing (user management, security, licensing, accounting, logging, caching, etc.). This framework provided the infrastructure that an Application Service Provider (ASP) could utilise to quickly build and deploy web-applications, provide detailed reports on their usage by its customers and create invoices based on the pricing scheme applicable to a customer. Its name however was an unfortunate misnomer since most of the framework was useful for almost all Java web application developers, not just ASPs. ASPs also quickly went out of fashion and many people didn't want to touch anything related to ASPs with a barge pole.

"D" was yet another Java application framework we had developed for implementing simple distributed workflows. Once again, it was born out of a necessity to reliably and quickly implement workflows that were a part of many web-applications we developed for our clients. It supported a simple and straightforward XML-based format for defining workflows, several out-of-box actions, a graphical workflow designer application, etc.

The sad thing is that none of this really went anywhere. We tried to turn "A" and "D" into products ("W" was deemed "too fundamental"), but being a company primarily focussed on software services and struggling to survive in the post-dot-com-boom era and the havoc caused by the events of 11 September 2001, we just couldn't devote enough resources to polish these and effectively market them. We also tried to donate "A" to the Apache Jakarta project (yes, the approach was extremely naive of us) with disastrous results. "A" was used by one ASP. These frameworks were used in a few applications for the company intranet and in a few applications developed for its clients, but as far as I can tell, they are no longer in use. In fact, I couldn't even locate the blurb on these frameworks and the associated white-papers on the website for "T". I think they are dead for all practical purposes.

R.I.P.

I am not saying that any of this was insanely great and necessarily deserved to succeed. In fact some of the aspects of the design of these frameworks reflected the naivete of its inexperienced designers (yours truly being one of the prime culprits) that can only be cured by years of experience with solving hard problems in real applications. I am also not saying that no one else had thought of these things at that time or had built frameworks or products around these ideas. What I am saying is that there were aspects of these frameworks that could have helped a lot of people save time and effort on building Java-based web-applications, much before the tools that are now available made their appearance, if only we had created a better awareness of these frameworks and promoted them differently.

There were several good things that did come out of these frameworks though. I learnt a lot about proper object-oriented design and architecture by working on them. I found out just how completely different creating a software product is compared to providing turnkey solutions for your clients. While promoting "A", I got a chance to experience the wonderful city of Amsterdam for over a week. Most of the people in the team that created "A" have become some of the best friends I've ever had - one of them, Anusha, is now my wife. There is a silver lining to every dark cloud in life.

Update (2007-08-06): Replaced the actual names of the products and the company with their initials on a request from "T" - Google was ranking this page too highly for their comfort.

2006-06-06

Graphic Novels

I am quite intrigued by graphic novels and look forward to reading some of them, especially those by Alan Moore. I was therefore very happy when I spotted some graphic novels in Landmark, Blossoms and Crossword here in Bangalore. The happiness was rather short-lived as I discovered that they were quite expensive. There is no way I am going to shell out 800 rupees for such a thing when I don't even know if I am going to like it and especially since many of them are in a rather battered condition probably caused by many people browsing through them but then deciding to not buy them.

2006-06-03

GCJ and ECJ

RMS has finallly agreed to using ECJ to generate bytecode for GCJ!

That sound you hear is the huge collective sigh of relief heaved by Free Java hackers everywhere.

2006-06-02

I Blog in Your General Direction

Yumpee considers blogging an act of vanity and inanity. Of course, he doesn't actually refrain from reading such blogs himself and would sometimes tell you a couple of things based on one of your posts accompanied by his trademark smirk.

Steve Yegge has a very nice writeup on why one should blog and I will not repeat here what he says there - it is a must-read for all people who think blogging is a completely wasteful activity. I would just add that I personally use my blogs and website as a sort of a Pensieve (what Dumbledore uses to store some of his memories in the Harry Potter series of books), except that I like to record my thoughts too instead of just memories. Sometimes I look at what I wrote a few years ago to see what I was intrigued by or interested in back then and occasionally I can't help but be embarrassed or amused by what I see. It still does not stop me from blogging though, mostly for the reasons that Steve points out in his article.

I have found out that blogs tell me a lot more about a person beyond what I can learn from everyday interactions with him or her. For example, Vikgup, Arpana, Anupama and Mridula have blogs that showed me aspects of their personality and areas of their interest that I had absolutely no inkling about from my conversations with them. If you do not blog yet, go forth and blog (and send me the URL for your blog).

By the way, despite my (admittedly mild) pleas to the contrary, Mark has added this blog to Planet Classpath as well. If you see posts in Planet Classpath via this blog about stuff not related to GCJ or GNU Classpath or Free Software or even technology, you now know who to blame for it.