Protos' Musings

"In the long run men hit only what they aim at" — Thoreau

Archive for the ‘football’ Category

How to be a better programmer – the redux

with 6 comments

"Software development productivity would skyrocket if the least effective 30% were fired tomorrow" — Neal Ford

It was in the December of 2005 that I first wrote about how to be a better programmer. At that time I was into my fifth year as a programmer, and though I wanted to write what I am writing today, I decided to narrow down my scope to non-technical issues. I wrote about code readability and code maintainability that day. As important as these issues were (are), I guess there is a larger issue that must be addressed — the technical skill set of the programmers. Then I wrote about (nay, linked to) the fatherly advice to new programmers by Chuck Jazdzewski.

I am now into my eighth year as a programmer, and unfortunately, the rate at which the industry has understood the importance of the quality of code or for that matter about issues like code readability or code maintainability is pretty dismal. This might be justified by arguments like "in service industry, deadline is more important". But people just don’t understand that in the rush to push the software out of the door, the quality of the code suffers, which directly affects how quickly you can ship the second or later versions. To make matters worse, people who can really understand the code at a deep level, and who are really interested in programming, is a minority, and I guess it would remain that way for the foreseeable future.

The triggering point for writing that piece three years ago was a mail from my counterpart in UK, who wanted the team to ensure that they are putting comments properly, and (though he didn’t explicitly mention the words, he provided an example that pointed to writing) comment at the level of intent. I am not sure how many people read that post (considering that I find it difficult to tell people that I blog; except to my close friends and family), but at least from that day, I made it a point to tell my team members the importance of writing code the proper way, and when required, show them how it is done. The triggering point for writing this has been yet another series of events. I thought it was time I write this down, so that a) I can refer back when I want to, and, b) pass this on to anyone to whom I feel like preaching in the future :).

The first and the most important aspect to become a better programmer is to have something called interest or involvement. Half the crowd I meet are programming just for the sake of doing some work. Programming, unfortunately, is not similar to doing most other jobs where you learn and master something once, and you can carry on without learning anything new for quite some time, and in some cases, for years altogether (or for life). Careers that spring to my mind include Government Service, Accountancy, Banking, Teaching, and certain professions like certain streams of Engineering and Law. Of course, in each of these cases, there is something new to learn every year (or every few years), but compared to the frequency at which things change, and the effort involved to keep ahead of the curve, they do appear trivial and manageable. [I know this is going to be a controversial perspective, but being a Mechanical Engineer and being someone who has a passion for teaching, and who dreamt about doing M.Tech and becoming a professor, I hope I know what I am talking about here]. Anyways, I don’t mean any kind of disrespect to any of the professions. I am just pointing out the fact that you don’t have to explicitly sit down and read a few books on your subject to remain good in many a profession out there.

In programming, what you know today is of little or no use two years down the line. I remember reading way back in 2002 about an interesting incident narrated by David Chappell in his book, Understanding Dotnet, First Edition. Chappell was taking a session on DCOM (if I remember right) at Moscow, when someone in the crowd got up and asked him why is that Microsoft is changing the technology every few years, and how he is finding it difficult to cope up with that. Chappell told him, as a matter of fact, that if he finds the change difficult to cope with, he is perhaps in the wrong profession. I wish we could make more programmers understand this simple fact – the fact that in this profession one can’t stop learning. In fact the number of programmers who have read any of the top 25 books on programming or software would be less than 10%. This might be an example of the Sturgeon’s Law (that 90% of people will never care and 10% of people would cover up for them in most professions).

To make matters interesting the IT industry doesn’t quite teach them that programming is important, and I live in a society, where if I tell them I am programming in the eighth year of my career, people think I am a (lowly) programmer still, perhaps because I don’t have what it takes to be a manager or a team leader who mostly takes care of team management related activities. The trend is to learn programming at the level of writing if..else, and yes, playing around a bit with something called objects (without really understanding what they actually are and what they are meant to be), and do programming for four or five years, all the while remaining at that basic level, never bothering to go out of the way to improve oneself, and jump on the management related bandwagon at the first possible instance.

This is where some of the most successful companies around the world stand out, and it is not a coincidence that most of them are run by people who were great programmers, and who still love and do programming. The best example would be Google and I can never forget the beauty of this story and what it tells you about the company (or the story of how Sergey Brin wrote an application to test Android, and the application was about using the accelerometer in the device to determine the time an Android phone was in the air when it is tossed up; the point is there are very talented programmers at the top who are really interested in coding in spite of being so successful), though there are quite a few others like Microsoft, Martin Fowler’s ThoughtWorks, Joel Spolsky’s Fog Creek Software, and Steve McConnell’s Construx Software. Construx has published the Construx Professional Ladder for its employees who aspire to move up the corporate heirarchy (the ladder), and the best part is that it ensures that those who grow to be the Team Leads or Managers, are people who are widely read, and who have understood the nuances of programming, and can still solve the problem, if the programmers are not able to solve it.

To put matters in perspective, check this recommended reading list for a Level 10 programmer at Construx. Please note that Level 10 is not the Architect or the Technical Leader. It is the programmer with some experience ("College graduates will generally start at Level 9. Experienced developers may start at Level 10"). That might appear a bit over the top by your or my standards, but that tells you what separates the great companies from the merely good or average ones — it is the quality of the people. I think it was Kent Beck (in Extreme Programming Explained, Second Edition) who said something along the lines of "a more talented team will almost always beat an average or less talented team, no matter how disciplined and process oriented the average or less talented team is, and you can’t do much about it". A cruel (for me, at least) example of that in the wild is watching the Germans end up as the runners up (or loosing semi finalists) at the World Cups in 2002 and 2006, and in Euro 2008. With a bit more talent (or a bit more botch-up by the opposition, they could have won any of those events).

To be a good programmer, one needs to have a good grasp of the fundamentals of programming (and there is no better language to learn this than C followed by C++, though that unfortunately is out of fashion these days). This must be followed by learning a modern mainstream programming language like Java or C#. But if you start with either Java or C#, you would miss quite a bit on really understanding pointers and objects at a fundamental level. This must be followed by learning, reading and eventually mastering OOAD, UML, Refactoring and Design Patterns. It will be really useful if one can find the time to explore and learn dynamic programming languages like Python or Ruby, as they bring a different perspective to programming, thus enriching one’s knowledge and understanding.

Yet another mandatory aspect going forward would be exposure to Agile methodologies (don’t think I am crazy, but there is a big crowd out there that doesn’t understand what is agile). Even if the team is not 100% agile, there is a lot to learn from the agile community. If anyone has any doubt about agile, the only thing to keep in mind that the top guys of the Design Patterns movement are also the people who were the forefathers of the Agile movement — people like Ward Cunningham, Kent Beck, Eric Gamma, Martin Fowler, Alistair Cockburn, Dave Thomas and Andy Hunt to name a few that I can recollect over the top of my head. Since each of them are titans in their own rights, there must be something in it for us to learn.

The best part of this learning, IMHO, is that it leaves one in such a strong position to negotiate most of the stuff that comes one’s way – a bit like how Dravid could easily and with grace negotiate the unplayable deliveries from the Donalds, McGraths, Pollocks and Waqars of this world, in his pomp, in spite of not having grown up facing them or anyone of their calibre. This was made possible by the fact that in spite of not being a genius like Sachin or Lara, he kept on working on his game, improved every day as a batsman by putting in the effort, and thinking about his game. [I wrote this without being aware of the match saving 100 he made at Mohali].

The best resource that I am aware of to learn the basics of the aforementioned stuff , that I am aware of, is listed below. These books helped me immensely in my development as a professional, and I hope at least some of you can and will find them useful.

Programming Language basics:

The C Programming Language by Kerninghan and Ritchie (the K&R book)

The C++ Programming Language by Bjarne Stroustrup (it is a tome, but worth every minute of your time)

The Java Programming Language by James Gosling et al (a beautiful book)

Thinking in Java by Bruce Eckel (or the unpublished C# version freely available on the net)

Design basics:

UML Distilled by Martin Fowler

Refactoring by Martin Fowler

Applying UML and Patterns by Craig Larman

Object Oriented Analysis by Peter Coad and Edward Yourdon

Object Oriented Design by Peter Coad and Edward Yourdon

Design Patterns:

Design Patterns by Gamma et al. [the GoF book; I am yet to read this as it is in C++]

Head First Design Patterns by Eric Freeman, Elisabeth Freeman, Kathy Sierra, Bert Bates

Design Patterns Explained by Alan Shalloway and James R. Trott

Taking the skills to the next level:

Code Complete by Steve McConnell, Second Edition

The Pragmatic Programmer by Andy Hunt and Dave Thomas

Software Craftsmanship: The New Imperative by Pete McBreen

Books on Agile:

Extreme Programming Explained: Embrace Change, Second Edition, by Kent Beck (there are two editions and it is fascinating to read both back to back :)

Agile Software Development: The Cooperative Game, Second Edition, by Alistair Cockburn

There are no shortcuts to mastery in any field, and software is no different. Unless you read some of the above books, you wouldn’t even know what all you miss (in terms of knowledge and skills missing from your toolbox). Again, this must be supplemented by some real hard work at the PC — programming, trying to implement and refine what one has learned. As the old saying goes, there is no substitute for practice.

Next, since we live in a society, we do need to work upon our soft skills, and people interaction skills come right at the top of the skills to acquire. One of the best resource to learn from this would be How to win friends and influence people by Dale Carnegie, as attested by both Jeff Atwood and Steve McConnell. In fact, if I remember right, McConnell writes something along the lines of "it must be made a mandatory book for every member of the team". How true!

Internet is such a free and ever available source to learn new stuff. In addition to reading MSDN or other technology oriented sites, read the great programmer’s blogs and learn from the masters. Let Google Reader be your best friend in this attempt. It has been for me, for three years now.

Update [14-Jan-09]: cleaned up the essay a bit and included a few more links in the story.


Written by Proto

December 22, 2008 at 18:15 hrs

The Harishs at Chennai

leave a comment »

The Harishs were in Chennai to spend 12 hours in the searing heat as they were getting bored of the Bangalore weather. Ok, I change that. The Harishs were in Chennai to visit Vidya’s grandmother, who wanted to see the kiddie. They came home in the evening, after spending the day with her relatives.

Ramesh and Raghu also came to meet Nano and the Harishs and to be with us for the dinner. Subru was the surprise package. He had informed no one that he is coming down to Chennai. This weekend Preethi’s parents are also here and so in all it turned out to be a memorable evening for all of us.

Nano (Vivek Krishnan) has grown up since I saw him last, and he was busy trying to learn how to turn around and lie on his stomach, though he couldn’t quite get his right hand out of the way. We all took turns to spend some quality time with him, though he kept going back to Vidya.

Preethi prepared yummy Pulav and Raitha for dinner and Harish had picked up a tin of Rasgullas. The best part of the evening was Subru joining us at the dinner table. I think this was the first time he had said no to eat something, anything!

We also witnessed the kick off of Euro 2008. I would love to see the mighty Germans win their first match at the Euro since 1996, and then go on to win the coveted Cup. But let us see whether someone again manages to refuse them the title.

I also used the occassion to fire up Preethi’s k550i and here is a collection of pix from the evening. Be warned though that the pix are a bit grainy thanks to k550i being not a very great camera phone, especially in the absence of very strong light.

Harish was returning by the 1130 train in the evening and since Raghu offered to drop them, Ramesh and myself managed to join the gang to see them off at the station.

On the way back we took the beautiful Beach Road (you were so right, Raghu. Vidhya and Harish would have loved the view and the well maintained road instead of the usual Royapettah route), and since Ramesh and Raghu were discussing about Dhoni’s new Chennai flat (though Dhoni himself has refused it as rumour), I took them inside MRC Nagar so that they could see the flat from outside. Not too sure whether they were impressed or not with what they saw.

Thus ended a wonderful day for all of us, and looking forward to the next meeting of RiceBowl Avenue kids, though when it is gonna happen, I don’t know now.

Written by Proto

June 8, 2008 at 14:35 hrs

The Months That Were – July/Aug ’06

with 3 comments

July 2006 was a month of very less activity, lots of reading, some great moments, and some heartbreaks. The heartbreaks started with the German team loosing out to the eventual champions Italy, and the final twist came when Italy managed to steal the World Cup. If ever there was a Champion unworthy of the title (when teams like Argentina, Germany and France were around), it was Italy! Of course, they won and they are the champions, and I better keep my mouth shut! :)

As I was saying in the first para, during this month and the next, I managed to read quite a bit (compared to my recent book reading trends). The best of the lot must be the works of Robert M Pirsigthe Zen book (Zen and the Art of Motorcycle Maintenance) and the not-so-famous, but equally good (if not better) second part — Lila. Both have had tremendous influence in my life, and I would advice anyone to give the books a go when they get the chance! The depth and breadth of coverage is quite remarkable.

I should also stress upon the fact that they are not the usual fiction or the fad books, but are categorized under “Philosophy” by the publisher. They are a bit heavy (in terms of pages and theme wise), but are well worth the time invested. I would try to post more about them later on, but for now these two links would do. But suffice to say that the concept of the Metaphysics of Quality (which is explored in the Zen book and given a firm shape in Lila) are simply the best thing I have ever read! But I am sure I wouldn’t mind reading both the books a few more times, time permitting!

In fact, if you are still having a doubt, this is what Joel Spolsky has to say about the book in his famous Book Reviews post:

“Some people’s attitude towards programming is that it’s a nifty way to
pay the bills. For others, that’s not enough… our work is a
significant a part of our lives, and we need a philosophical
understanding to make sense of it. This book goes a long way towards
relating engineering and philosophy”

I am deeply indebted to Joel for making me aware of this book (in 2002), Jiju for referring these gems way back in 2003-04 when I was out to purchase a gift for a friend, and to Raghu, who gave me the thing I appreciate the most as gift: Vouchers to buy books (at my engagement) :). In fact, when I left my previous work, I was asked what I wanted as a parting gift. I told them, I am planning to buy a book. Give me your contribution in cash, I will contribute the rest to pay the bill for some book I had on my mind. Probably, I am just crazy! ;)

Apart from these two seminal works, I also managed to read two more great books: Tuesdays with Morrie and The Alchemist. I also enjoyed the Dan Brown novel Angels and Demons. I recommend A&D to anyone who thought The Da Vinci Code was good! This is the novel in which Brown introduces the character of Robert Langdon, and is quite absorbing in itself. I heard that the movie will be out in 2007.

Apart from this, I had been to Trivandrum and Mahabalipuram during this period, and there were lots of team-treats at work as well. So, in all, I was having a nice time.

The lows during this period include a few days I was not well, Mom suffering from fever and being down for more than 30 days (in three slots of 10 days each over a period of 40 days starting in May and ending in Aug), the countless visits to the Doc and the Apollo for treatment. Mom is doing fine, except for muscle pain in her right leg, that makes her limp while she is walking these days. Docs say that it will take at least couple of months for the muscle pain (induced by Chikungunya that spread like wild fire down south of India during summer) to go away!

Thanks for reading thus far. Have a great week ahead.

powered by performancing firefox

Written by Proto

September 3, 2006 at 21:39 hrs

The Month That Was – June ’06

leave a comment »

June is a month that I would like to forget for I was sick for most of this period. The running around for the engagement preparation and the countless hours at work and outside had taken its toll on my body, immediately after the engagement. In fact, looking back at the engagement snaps taken during the late evening, I can see that I was visibly tired!

But I would like to remember this month for the first week of June, when Preethi was around in Chennai, and we managed to go watch Fanaa (a waste of a movie except for a couple of good songs) at my weekly outing place (Satyam Theatres), and got to visit the Besant Nagar beach twice.

Apart from that all I remember is the countless tablets I gulped down and the countless glasses of the thing I hate most — Kurumulagu Rasam — that I drank to ward off the seemingly invincible cold and throat pain that just refused to go away! By the end of the month I had conquered the worst cold I had ever experienced, but my system had taken quite a knock, forcing me to loose some weight (at last)!

Of course, I also remember this month for the great German run at the Fifa World Cup! To me, they along with Argentina were the teams of the World Cup, though France sprang back to life late in the competition.

powered by performancing firefox

Written by Proto

September 3, 2006 at 20:48 hrs

We won!

with 5 comments

“Football is a game played by 22 players. And then Germany win.” — Gary Linekar, England Football Team, 1984 – 1992

We won! Germany beat Argentina 4-2 on penalties to enter their 11th FIFA World Cup Semi-final, a record Brazil would equalize if they end Zidane’s career later today.

I guess we can attribute the above Linekar comment to the outgoing Argentine coach Jose Pekerman as well, after his bitter experience earlier in the day. I will try to update this post over the weekend, but for now, don’t miss this piece on how the Argentines masterfully [pun intended] dug their own grave!

Btw, Apple has something to say on this, and I came up with the title for this post inspired by it.

Go Germany, Go! All the way back to Berlin and lift the Cup!

Written by Proto

July 1, 2006 at 03:07 hrs