Flickr Badge

Thursday, June 29, 2006

Complaint of the day

After all these years of electricity why can't countries standardise on the shape of the plug point? I'm not even talking about the voltage, just the shape of the plug! *grumble, grumble*

Monday, June 26, 2006

Back from Berlin

The first thing that struck in Berlin was how few people were on the roads. I don't think I saw more than five pedestrians in the entire trip from the airport to the hotel. There was also hardly any traffic on the roads. I don't know if it was the day or time because there were more people on the other days.

Another funny thing was the subway/metro system. You need to buy a ticket, but it is not checked anywhere. It is entirely possible to ride the subway without a ticket. In all the subways that I've seen, you have to put your ticket into a machine to be able to enter the platform, but not here. The other cool thing is that you can get a 3 or 7 day pass that not only allows unlimited travel on the subway but is also valid on the buses and trams.

The difference between east and west Berlin was also clearly evident. West Berlin was a lot more crowded during the day, but the situation was the opposite at night. The trams are mostly seen on the east Berlin side, and the building architecture is noticibly different. Oh, and of course, the pedestrian lights are different (see this).

The new Berlin station (Hauptbahnof) is really pretty (More about it here).

Another concern that I had was safety. It felt pretty safe even in the metros and the streets around midnight. Maybe the extra security for the world cup helped. Roaming the east Berlin side was nice especially around Friedrichstra├če, and Unter den linden, two important roads in this part of Berlin. Kufurstendamm on the west side was also good.

Also notable was the number of cyclists. Cycling around seems to be very popular, and you can find cyclists everywhere. There is a special coach on the subway for cyclists to use. There are even some dressed in suit and tie cycling to work.

Monday, June 19, 2006

Windows and process

A former manager on the Vista team asks Are Vista-scale software projects essentially uncontrollable by nature? Or has Microsoft been beset by one too many broken windows?:

"Windows process has gone thermonuclear. Imagine each little email you send asking someone else to fill out a spreadsheet, comment on a report, sign off on a decision -- is a little neutron shooting about in space. Your innocent-seeming little neutron now causes your heretofore mostly-harmless neighbors to release neutrons of their own. Now imagine there are 9000 of you, all jammed into a tight little space called Redmond. It's Windows Gone Thermonuclear, a phenomenon by which process engenders further process, eventually becoming a self-sustaining buzz of fervent destructive activity."

Friday, June 16, 2006

Expressions UK Fashion Show

Expressions UK Fashion Show
Originally uploaded by Siddhi.
A model from the Expressions UK fashion show. The show was a part of the Singapore Fashion Week 2003.

Saturday, June 10, 2006

On program optimisations

Programs should be written for people to read, and only incidentally for machines to execute. -Abelson and Sussman, Structure and Interpretation of Computer Programs

This famous quote by Abelson and Sussman sums up what software development should be about. Computers will execute anything that you throw at them, but not everything is easy for humans to read and understand. Many bugs are caused by programmers not being able to fully understand the code and design. It is strange how many programs are written to be efficient for the computer to run, but are highly inefficient when it comes to programmer understandability. This is exactly the opposite of what it should be. If there is one principle that drives the design of a software system it is to write programs that others will find easy to read and understand. Only make optimisations where it is absolutely required, and keep these optimisations to a minimum.

Premature optimization is the root of all evil (or at least most of it) in programming. - Tony Hoare, and repeated by Donald Knuth in Computer Programming as an Art, 1974 Turing Award lecture

This post is a part of the selected archive.

Sunday, June 04, 2006

Broken binary searches

[via Ned Batchelder] It seems that Nearly All Binary Searches and Mergesorts are Broken

Fast forward to 2006. I was shocked to learn that the binary search program that Bentley proved correct and subsequently tested in Chapter 5 of Programming Pearls contains a bug. Once I tell you what the it is, you will understand why it escaped detection for two decades. Lest you think I'm picking on Bentley, let me tell you how I discovered the bug: The version of binary search that I wrote for the JDK contained the same bug. It was reported to Sun recently when it broke someone's program, after lying in wait for nine years or so.

Saturday, June 03, 2006

Whence He Came

Whence He Came
Originally uploaded by Siddhi.
The Hong Kong band Whence He Came, Baybeats 2004

On web frameworks and AJAX

I recently started working on a new project at home. Its a web application to help out with project management. The two goals were 1) to develop something that I could use for the projects at work and 2) to learn something new. This project was perfect for learning something that I had always wanted to learn more about: Web frameworks and AJAX - both hot areas of Web 2.0 (and yes, although there is a lot of hype around Web 2.0, it is clear that a new web revolution is underway, and it is not just a passing fad).

Given a choice, I prefer to work in Python, so I went around looking for web frameworks in Python (and there are a LOT of them). I finally decided upon django, having heard a lot of good things about it (the fantastic website also helped).

Having worked a bit with it, I can now say WOW. The basic framework for the site is already done and it only took two full days and two nights to get it here. Further, one of the full days was dedicated to designing the look and style of the site, so only a day and two nights were spent on programming. This includes a complete and customised administration area where you can modify any object in the system. Sure, there is still a lot to do, but to still get this far in such a short time has been amazing.

I'm now looking to refine the interface, and that means AJAX. I'm currently looking into the Dojo and Mochikit libraries. I've implemented my first drag and drop using Dojo and in-place editing with Mochikit. That has taken another day. I currently like Mochikit as it is much easier for the beginner to get started with. Dojo looks a lot richer, but its really hard to learn with very scant documentation. Of course, my lack of experience with Javascript (and especially the way OO is done in Javascript) and my familiarity with Python (which Mochikit tries to emulate) may have something to do with that.

After this preliminary experiment, I can say with some confidence that a single person working full time on an application can get a first version out within a month. Capital and resources are no longer major problems. All you need is a good idea. In other words, the next few years will be a great time to be an entrepreneur, much like the years in the late 90s.

Friday, June 02, 2006

Freshers and the "Real World"

Gaurav has a nice post on welcoming freshers to the "real world".

Bill Gates Quote

Just ran into this quote:

We always overestimate the change that will occur in the next two years and underestimate the change that will occur in the next ten.

-- Bill Gates