On Programming and Craftsmanship

I’ve just finished reading the article “Programming is not Craftsmanship” and couldn’t help but share my own views on this topic. If you haven’t read the article, I urge you to do so right away.

I agree with the author’s view in summary. As a programmer, you may take pride in your knowledge and skills, but the hard truth is the real world hardly distinguishes you from a plumber(may be a more literate plumber, if I dare say). They don’t care if the pipes are laid out in an elegant manner, or not, as long as the water is running. They focus on results, neither the process nor the tools. I’ve tried to share this point of view in the feedback section of every “Why programming language X rocks and Y sucks” blog post I’ve encountered.

But let’s consider the hypothetical situation where you are an entrepreneur, who has an idea of an amazing software. You hire some smart engineers. They build it out and the sales guys close deals. Customers are satisfied, and they ask for more features. The programmers code some more, you bill your customers for their work. Everyone’s happy.

Now a few years later, you’re techies are bored. They are looking for new challenges, as any good hacker would do. You recruit some smart guys to take over their work. They enter a painful transition period. The greenhorns have to learn the intricate details of your feature bloated software their predecessors have built; so they can fix, change or add stuff as demanded by the customers.

And here’s where the architecture of the software comes into play. If your early programmers have laid out a solid groundwork, keeping in mind the readability of the code and the extensibility of the software itself, the new guys will have less of a hard time getting things done. On the other hand, if the programmers have never cared about those things, and  just produced code to meet the deadlines, the new guys will go through hell figuring out which part of the software does what and how do they all come together. You’re customers are still waiting for those bugs to be fixed, those features to be added. They get impatient at the delay, and displeased at the higher than usual billing hours upon delivery. At this point you may think having a good “Documentation” helps, but it hardly does. If the programmers never had the time or will to build the software right, odds are against the fact that would have so for documenting it.

I’ve seen(and am continuing to see) it happen. Management and customers were happy playing with the pretty UI. But when I popped the hood out of curiosity, I was surprised(to say the least) to see, along with other things, the spiderweb-like intricacies of the if-else branches, and left with sympathy for the poor soul who would have to ‘maintain’ this codebase(praying that I wouldn’t be the one).

I’ll draw my conclusion with the personal opinion, that a successful programmer(or product manager) knows how to strike a balance between the two extremes. Being the prima donna programmer who whines about the elegance of code should be discouraged by all means. But the coder who pays the slightest attention to quality, must be avoided. For a software shop whose sole business plan is to “build, ship and forget”, the later breed may prove profitable. But not for the enterprise who seeks to deliver innovative and useful products.

(Joel Spolsky, one of my favorite bloggers, gave a presentation on a similar topic. You can watch it here.)

Back in Gordon Freeman’s Suit!


I am playing PC game again!

It’s Half Life 2 Episode 1!

I know you’re rolling your eyes thinking ‘How 2004 are you? That’s an old game!”.  I know, but I haven’t been around gaming  for a long time. I think I somewhat grew bored of it as I got involved other responsibilities in my personal life.

When I recently got my hands on this game, I couldn’t resist the temptation to play the sequel to one of the best PC games of all time. I booted my PC, which I have been neglecting since the new Macbook Pro came in, installed the game from the DVD, fired it up and started another journey through Half-life’s universe.

There are some cultural changes I have noticed so far. Instead of the legendary crowbar, the game starts with the gravity gun as the first weapon at hand. The biggest change of all, is that Gordon Freeman isn’t alone this time, he has a friend! It’s Alyx Vance!  The ass-kicking chick from Half-life 2. The developers at Valve have designed a sophisticated buddy system, so Alyx is going to fight alongside Gordon throughout the whole game. AI programming in games has come a long way from Daikatana, where moronic activities of your AI controlled buddy(like coming in the line of fire, or firing at you!) made me want to chop that buddy into pieces!


I’m enjoying the game experience so far. And I’m quite glad that Alyx is with me. I’ve always felt a sense of desperation and fear, as I went through Half Life’s cinematic thrilling environment. That’s why it’s really good that I have Alyx by my side!

Update Finished playing Episode 1 few nights back. It was shorter than I expected but satisfying. Just started to play Episode Two!

Google Chrome OS – Lets try to be positive


Google’s announcement of stepping into the OS market with Google Chrome has generated quite a stir in the Net. While many have welcomed Google’s new venture, others have been busy with making absurd predictions. Some are talking about what current operating system it’s going to kill? Some saying they don’t need a new OS because they already have one they like. This fellow got more creative and ranted about ‘features’ of the OS before it’s even released! It’s like blaming an unborn baby for being bad in sports?

Personally, I don’t understand the motive behind this kind of negative thinking. Why not think about what new things Chomre might offer, rather than which popular OS it’s going to kill? Let Bill worry about possible market threat of Windows, we should worry about how to use Chrome. You already have the perfect desktop? May be that’s what you think and may be you are right. But should that stop others from trying to innovate, seek answers to problems you never realized you had? Google’s new browser introduced radical concepts in terms  of usability, may be the OS will do the same.

As developers we should be more open minded towards innovations, and throw away this die hard slash fanboy culture.  Technology isn’t religion, you won’t be denied entry to heaven for switching to a newOS/programming language. If nothing else, competition is good. It brings the best out of people. Let’s hope it’ll force Microsoft to make a more secure Windows, or inspire Linux people to create much user friendly desktop systems.

A farewell note

This week I said good bye to a couple of things.

The first was my old job at Evoknow Inc. It was my first job. I joined as a trainee developer right after my graduation. I was eventually promoted to a full-time developer, and then to team leader within a year.  I had a really great time there. My teammates were the friendliest and whackiest people on earth. I learned a lot from them, and I tried to contribute as much as possible.

My new job is just a stone’s throw from the old one.  While the actual distance is small, in terms of technical demands it is a giant leap. From a seasoned PHP developer I have become a Python newbie. From a Linux/Windows user, I have turned into a Mac user+admirer. I hope to learn some really great stuff from here.


The second goodbye was to our trusty old Toyota Starlet 1996. We traded it for a brand new Toyota Corolla G 2004.  We had so many memories in it. It had been through some serious accidents. But it gave us a happy ride. I hope its new owner would be nice to it.


I am enjoying the smooth ride on the new car though!

I have a dream : Programmer’s edition

Here are a few things that I would like to see happen in the next few years:

1. Internet Explorer will cease to be the number one browser in the world wide web.

2. Ubuntu will surpass Windows as the most used desktop system.

3. A cease fire will be declared on the Prgramming Language Wars. Java and PHP guys will respect each other and live in harmony.

4. The JavaScript language and its programmers will recieve their true recognition.

To be continued…

Michael Crichton’s death : A loss for modern science


Michael Crichton, one of the most popular science fiction novelists of our time, died of cancer on November 4, 2008 at Los Angeles. He was aged 66.

I see Michael Crichton more as an educator than a novelist. He made scientific research thrilling and interesting. Each of his novel revolves around a particular field of modern science. He covered artificial intelligence in ‘Prey’, evolution in ‘Jurassic Park’, quantum physics in ‘Timeline’, aerospace engineering in ‘Airframe’ and so on. He conducted extensive research for each his books, going through a long list of scientific documents and research papers, and he included that list at the bibliography of his book. Reading a Michael Crichton book means having a sound understanding in a specific field of science.

His most prominent work was ‘Jurassic Park’ which was adopted as a Hollywood blockbuster by Steven Spielberg. Michael’s idea of bringing back the pre-historic dinosaurs by genetic engineering made scientists wonder. Perhaps his most controversial creation was ‘State of Fear’. Environmentalists condemned it for hurting efforts to reduce carbon dioxide emission. For me this book was his best work. I would urge to read it. If you think you know everything you have to know about ‘Global Warming’ from the media, you are wrong. ‘State of Fear’ will change the way you think about environment. It will truly enlighten you.

Crichton also made his opinions on other non-science issues in our society. He questioned the ethics of electronic journalism in ‘Airframe’. He provoked a debated on reverse sexual discrimination on ‘Disclosure’.

His death is loss of modern science as it has lost its biggest popularizer. Quoting from his family statement:

[Michael Crichton] served as an inspiration to student of all ages, challenged scientists in many fields, and illuminated mysteries of the world in a way we all could understand.

May his soul rest in peace.

Silly SQL query, not-so silly thoughts

I noticed a silly query written by a member of my team today. I was done for the day at work, and got tired of poking my friends on Facebook after a while. So out of boredom, I started going through the log which keeps project-wise record of SQL queries written by the developers, along with their names. And I stumbled upon the following

SELECT username FROM user WHERE username = ?

I couldn’t think of any situation where this query will be of any real use. Then I found another one

SELECT email FROM user WHERE email = ?

I couldn’t help but the ask the writer of these hilarious pair of queries, about their real purpose. Apparently he was involved in building a User Registration system for the project, and these queries were written to check if a user record with a certain username/email already exists in the database. We are writing the software on an MVC framework, so he could simply try loading a Model using the username/email, returned true if it loaded, and false otherwise! The guy wasn’t a newbie programmer, he has been in the company for over a year. This reminded me of a blog post I read very recently. Is the ridiculous simplicity of PHP is a curse rather than gift, as it attracts mostly average level programmers, thus creating a bad reputation for the language itself?