Protos' Musings

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

Archive for December 2008

Apple does a Kenneth Anderson — the redux

with one comment

This time he is off to Kanha, in Madhya Pradesh. The writing and the pix are superb. Go, give it a read. I just hope he wouldn’t abruptly stop, like what he did last time. I am really thinking of packing my bags and join him in one of his trips. But first I need to shed off a few kilos to be match-fit :).

Written by Proto

December 22, 2008 at 18:38 hrs

Posted in Random Ramblings

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, for..do 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

Visit to Manly Beach

leave a comment »

I had big plans for the weekend, but things didn’t go as per script. Saturday turned out to be a real dampener with Mr. Rain putting up a strong show. We went out to go eat at the Indian Restaurant and then proceed somewhere (like Manly beach or the Aquarium) from there, but strong showers and gusty wind forced us to return back from the bus stop.

On Sunday we had plans to go to the Bondi beach on the Bondi Explorer, but that too had to be cancelled since Sridhar developed a bout of diarrhoea. So, I decided to hang around and ensure that he is fine first, and then after watching him having his breakfast followed by watching TV for a couple of hours, I decided to go to Manly beach in the afternoon, as I was not sure whether I would get another chance to visit this beautiful beach on a cracker of a summer day. Today also marked the first time I managed to prepare the food end-to-end, from rice to cutting vegetables (ok, carrot and onion) and preparing the actual curry (adding masala, turmeric and chilly powders). I would normally ask Sridhar to start the cooking (adding the required oil, salt that I feel I might goof up). Today, I managed to do without his help, though I did reconfirmed the steps with him.

As always, to go somewhere in Sydney, if you are taking the bus or the ferry, going to Circular Quay is the best bet. That is the central hub from where the bus and ferry service originate. If you want to take a train to somewhere, going to the Central station would be the best bet. Manly turned out to be yet another beautiful experience on a beautiful summer day. I am just plain lucky to be in Australia when the climate is at its best — spring followed by summer. I escaped the bout of really cool climate that some of my colleagues had to endure six months back. In Sydney, temperature rarely go sub zero, and mostly might hover well over zero. But the worst part is the strong chilly wind that blows incessantly from the ocean during winter. That requires the protection of heavy clothing that you can get away without, if the same temperature persisted in say a Bangalore (can happen) or Chennai (dream).

So, to cut a long story short, I took the ferry to the Manly Wharf, enjoyed the 40 odd min trip to the hilt, walked the short distance to reach the beautiful beach, spend an hour and a half at the beach, managed to walk from one end of the beach to the other (starting from the centre of the beach going to one end, coming back and then going to the other end and walking back..so that is twice the distance), spend some time at the family/kids’ beach next to the Manly wharf, and managed to catch the ferry (whose pix I took from near the Oceanworld as it was docking at the Manly Wharf) back to Circular Quay, and thanks to day light savings, though it was closer to 2000 hrs, the setting sun formed a beautiful backdrop to the Sydney skyline on the way back. Thankfully, got a bus to go home from the Quay within two minutes, and so managed to reach home in time for dinner.

Here is the link to the pix from the trip to Manly, taken using my brand new Sony Cybershot H50. I had almost made up my mind to buy Sony Cybershot T700 or T77, but Apple made me realize that if I need a good camera, it needs to have at least 10x optical zoom, and so the T series as of today, doesn’t quite cut it. Today was the first day out for the new camera, and I hope the pix have come out well, though the Sydney Harbour is much more beautiful in the mornings (when sunlight falls on the Harbour).

And here I am jotting down the events of the day, after a rather heavy dinner. Today also marked the last weekend we will be here in Sydney. Thanks for reading thus far. Have a great week ahead.

Written by Proto

December 21, 2008 at 19:45 hrs

Second Trip to Westmead and Sydney Murugan Temple

leave a comment »

The past week has been a rather interesting one. I am working on something really interesting at work (that somehow always manage to cheer me up). Plus, we had the Secret Santa party this Friday, where in each member of the team was to bring a AUD 10 gift for someone whose name we know (so you are the Santa for that person).

However, the receipient is not supposed to know who gave him (or her) the gift. I gave one of my colleagues an Arnott’s TimTam biscuit and porcelain mug set that was available for a reduced price of AUD 10 (owing to xmas season). Of course, since I had no idea what was Secret Santa, I wrote “Dear Clive, merry xmas and happy new year — Suresh Santa”. We had pizza and soft drinks for lunch (my second ever pizza in life but it was pretty soft veggie pizza :), followed by chocolates and a bar of Wall’s Magnum icecream.

Over the course of the week, Mini was kind enough to extend an invitation to drop in at her place on Friday evening so that I can go to the Sydney Murugan temple again and also eat some good food either at her place or at the temple (one of the prasadam item is something called dosa and looks like you can eat as much as you want :). As always, it was a pretty mouth watering prospect, and I jumped at the offer, though I confirmed that I am going only by Friday noon.

I decided to go with Mini and we met at the Town Hall station (which is below her office) and about a 4 min work (on the way to my favorite food court). We caught the first available train and reached Westmead around 6pm. Raj, Mini’s husband, came to pick us up from the station. So the tragedy continues for poor Raj, 9000 miles away from the place where the process of waiting and picking up Mini from work started — Bangalore. Once we reached the apartment entrance, Raj took me on a small detour to show the sprawling apartment complex. I also got to see Mini driving away the car to the basement carpark during this time.

Mini immediately got busy preparing dinner for us (since she thought the temple canteen might be crowded or that the temple might close early). Raj helped her out by cutting the fruits for the fruit salad. It was 8 pm by the time we left for the temple. It was another crowded day at the temple, and inside the temple there was a group of kids doing bhajan. I had a very good darshan once again. I decided to circumambulate the outside (there is no praharam, it is just the compound) and saw the rather big canteen teeming with devotees savouring this or that prasadam.

We reached back by 2100 hrs and it was time for dinner. Mini had prepared white rice (for me, they normally eat the Kerala Chamba rice), savala rich sambar, cabbage thoran with scrapped coconut and tasty maanga pachadi. Needless to say, I ate as much as I can and almost finished my favorite cabbage (that I was eating after a gap of 80+ days; that showed I guess :). This was followed by a bowlful of fruit salad (less fruits and more ice-cream for me). Since it was well past 2130 hrs, I decided to bid adiue to them. I offered my heartfelt thanks for another round of tasty homely food and the warmth extended to me, and started my journey back home.

I invited Mini to visit us at Chennai, but I guess that is a no-starter. Mini has at least one thing in common with me — both of us love Bangalore, though both are not in Bangalore for the last four years. Bangalore, I am sure, has changed quite a bit since the days of 2004, but still the memories that remain are among the best of my life.

I reached the Central station by 2220 hrs, but had to run around and wait for an hour to get a taxi to reach back the hotel room. Friday nights and Saturday nights are time when the whole (or it looks like that) of Sydney decides to go on a boozing spree (partying) and so every cab is occupied, either carrying the passenger to the next party/pub/club or taking them back home.

I guess this might be happening in India as well, though the percentage of people who can afford this lifestyle is not very high to leave all the autos/taxis occupied through the night. Sydney has a very vibrant night life, especially on weekends. I contrasted that with the night life in my hometown Trivandrum, that used to go to sleep at about 2000 hrs :).

As is the wont these days, here is the link to the pix from Week12 in Sydney.

Written by Proto

December 21, 2008 at 19:27 hrs

Visit to Hyde Park, Harbour Bridge, Broadway and Taronga Zoo

with 3 comments

 

It has been a fantastic eleven weeks in Sydney so far, as you could probably make out from the snaps uploaded so far. Sydney is such a beautiful place and I am just plain lucky that I was destined to come to Australia, albeit for a short trip. For an Indian IT pro, Australia is not necessarily the likeliest of destinations (unless you work for HCL, I suppose :). That makes it doubly sweet.

 

Ok, now that the bragging is out of the way, let me get down to the point. After shaking off the customary lethargy that I feel over the weekends, as I already wrote about, we decided to make the most of the remaining days of the weekend. So on Saturday last, we decided to visit the Hyde Park. Hyde Park, for uninitiated, is a beautiful and vast park situated right in the middle of the City of Sydney. It spans from the Museum Railway Station at one end (the tube runs underground) and ends well past the St James Station at the other end. Just behind the Hyde Park is the beautiful St Mary’s Cathedral. We had a great time taking the four hours to walk the lawns of the Hyde Park, soaking in the natural beauty and watch the police arrive to round up a gang of teenagers who were high on spirits (both literally and alocholically :) and were out in strength to show off their skate-board skills at the park, causing a  bit of problem to the other visitors.

 

Sunday last, saw us biting the bullet and deciding to take another walk, this time right across the Harbour Bridge to reach the Luna Park on the other side. This walk is named the Cahill Walk, and to get on to this Walk, you need to either walk a few kilometers to reach the begining of the Bridge span (from the Circular Quay) or you need to take a series of flights hidden in some of the streets in and around the area (we are thankful to an Australian Uncle who took a few minutes to explain to us what all streets and cross roads to take to catch the steps). So, we managed to find the stairs and climbed up to reach the base of the Bridge Walk area. From there started a long walk and we had to stop every few meters to ensure that we soaked in the beauty of the splendid view of the Harbour on offer. On the way I kept clicking away with a vengeance (as I normally do :).

 

It took us nearly an hour to cross the bridge and reach the railway station at the other end (that was the nearest loo for quite some distance :). From there started the walk to reach the Luna Park. It is a mini amusement park for the kids right in the heart of the city. We had no intention of taking any rides or spend money there, and so when the security at the Car Park warned us that the Park is closing and they can’t issue any tickets now, we were not perturbed. From the Luna Park we took the ferry back to the Circular Quay. This was the first ferry ride for us and the view of the harbour was breathtaking. In fact I recalled what the cab driver told me on the night I arrived in Sydney told me (while he was ushering us to the hotel from the airport) — the best way to enjoy the harbour is to take the ferry and watch it from the inside out. This is absolutely true, believe me.

 

This Saturday we decided to check out the shopping area of Broadway. Broadway is the name of the George Street once it goes beyond the Railway Square. It is a pretty wide road (not sure whether that was why it was named the Broadway), but incidentally it also houses some of the most popular shopping malls in Sydney. We wanted to check out the K-mart and Target. But more importantly, we had to eat our lunch too, at the North Indian Restaurant, at the sprawling Food Court at the Broadway Shopping Mall. Sridhar had been there before (with Abish, Nishanth and Satheesh) and so he knew about this Restaurant. To my great surprise, I found out that for just AUD 11, you would get the biggest Naan you had seen so far (it was bigger than the Indian Naans I have seen at Chennai or Bangalore by at least 30%), two curries of your choice, enough rice to waste, and a can of your favorite soft drink. We reached home in the evening, after having spend a few hours at this shopping mall. It was teeming with people and so we had a nice time overall.

 

Today I ventured out alone to the famous Taronga Zoo, as my roomie excused himself since we were probably ill informed that there is nothing much to see at the Taronga zoo. But thanks to Murtuza, a colleague at the Sydney office, was inspired enough to visit the place. In particular he impressed upon me that usually in Australia when you spend a dollar at any public place (like the zoo or somewhere else) they normally ensure that you don’t feel cheated. On the other hand, you would feel at the end of it all, that it was worth every cent spend. He also talked about the Bird Show and the Seal Show. So, in all, I was inspired. Another hidden reason was that there was another ferry trip involved, as the best way to reach the zoo from where I live/work is to go (again) to the Circular Quay and take a combined ferry/zoo ticket for AUD 44. This allows one to take the ferry (to and fro), a 15% reduction to the entrance ticket at the zoo, take the bus/sky-car at the zoo.

 

Tarango Zoo turned out to be a truly great experience. The zoo is a sprawling complex inside the city, and the best part is that it is on a hill. So once you reach the docking yard, you can take either the bus or the sky-car to go up to the main entrance. I decided to take the sky-car, just for the heck of it. It turned out to be similar (but much more safer, better engineered and steeper) than the one at Malampuzha, Palakkad, Kerala (the only other rope way that I can remember). After reaching the main entrance, I spend some time trying to understand what the heck I am about to do. To help address this vexing problem, they give out free maps of the zoo at the information centre.

 

After orienting myself and getting a hang of the important events of the day, I decided to bite the bullet and start walking. I was thrilled to find that there were quite a few things lined up for me. I just needed to walk to ensure that I manage to reach the vantage points. It started with the fabulous Bird Show at the noon, followed by the talk by the Elephant Keeper, and then the fabulous Seal Show, followed by the Penguin Keeper talk, followed by a trip to the missed out parts of the zoo, and I managed to round it off in style with an encounter with the kangaroos!

 

All in all it was a great experience. It is a must-visit place if you are at Sydney, and it is better to ensure you are there at the zoo by 9am and leaving by 5pm (if you really really want to soak it all in and really enjoy it). I reached by 11am and so I had to sacrifice a bit of it by either skipping a few things (like the Koala keeper talk at 330 pm) or hastily rushing through some of the sections (Orang-utang and birds).

 

This was one day when I cursed my decision of not having purchased my dream T series Sony Cybershot digital camera before coming here (I purchased a Sony Vaio laptop instead..so what does that leave me? stupid?). Some of the shots from the zoo trip are nowhere near as good as I want them to be (another way of saying “bad”) and so bear with me here. But some of the pix are really good. I took more than 400 snaps (yes, using that stupid camera phone on a single charge) and I have discarded more than half of them for the upload.

 

As usual, the link to the pix follows:

 

The Hyde Park and St Mary’s Cathedral

The Harbour Bridge Cahill Walk

Trip to Broadway 

The Taronga Zoo

 

Oh, and we had to shift to another Meriton Apartment at the nearby Danks street (since we were late in trying to extend the room booking at the Potter Street Meriton) and here are some random shots from Week 10 at Sydney. Plus, we managed to find a solution to another vexing problem we had — we were eating curd rice and carrot curry out of sheer laziness everyday at work. We, during the course of the last two weeks, discovered the Maharaja Indian Food Court at The Galleries Victoria, near our place of work. It is a 10 min walk, but this is one walk we don’t want to miss out on, every day these days :). We also had the xmas party at work, at the beautiful L’Aqua Restaurant on the Cockle Bay Wharf, on the Darling Harbour.

 

Random snaps from Week 10

Xmas-party at work

Written by Proto

December 14, 2008 at 18:21 hrs