March 22nd, 2007
As I have written in one of my earlier posts, this is the 9th year of professional programming for me. In this post I will summarize my thoughts on what makes a good programmer (master programmer or chief programmer as called by some). I wouldn’t call myself a master programmer yet, but I am pretty sure I know the traits that define a good programmer.
Now before I go into the details, let me first clarify what the term
“programmer” means to me. A programmer is not someone who blindly implements
whatever design is given to them. Many software service companies in
So who is a programmer? A programmer is someone who has fairly good understanding of computer systems, can write good code, is intelligent and can visualize a software solution for a particular software requirement. He looks at the software requirement and starts thinking - How do I build this thing? How I can design the interface so that it is most user friendly? What happens when there is huge data volume? How do I ensure that no one hacks into my program (especially for Web applications)? How do I reduce coding effort? How do I ensure future additions have minimum overhead?
So as you can see it is much more than just mechanical coding.
Ok no more preaching! Here is my top 10 traits for a good programmer.
1. Think! - This is the most important trait of a good programmer. He never jumps into anything. Given a problem, he first thinks over it. The more he thinks, the more ideas, questions and alternate solutions come to his mind. I see the lack of thinking as the primary source of all problems a novice programmer face. When he comes across a problem, he doesn’t think. Instead he bangs his head on it or asks for help from another guy. Sometimes you need to ask for help, but think on the problem or bug before you run across to your technical lead!
I will give an example of the importance of this “Think” factor. Sometime back we had a requirement to build around 40 interfaces. This basically required scripts to be written to transform data from a set of tables in one database to another. The estimates were done like this,
1 interface = 5 days and hence 40 interfaces = 40×5 = 200 days of build effort.
When I started on the project, everything was in place. The team, the effort of 200 days and the schedule. Then I thought over it. I saw that if a generic framework is written for the transformation, I could externalize the transformation rules into an XML file. The generic framework took me about 10 days to build. Then for all the 40 interfaces, the time taken was 5 days (since only tranformation rules were to be written). So my team got a lot of free time!
2. Learn! - Learn Baby, learn! A good programmer has a burning desire to learn new things every day. It is almost 15 years since I started programming. And even today, I spent a lot of time learning new things. When it comes to programming, every program you write teaches you something. I have fairly good knowledge of Java, C, C++, C# and Qbasic (yes qbasic is my first love!). Just recently I have started learning PHP.
Nowadays learning trait is something which I see less and less in my professional life. The learning itself is so formalized and force fed that people are bored with it.
By learning, I am not talking about taking professional certification. Sorry
to say this, but I have nothing but contempt for many of the professional
certifications (for example the Sun certifications). In
3. Help others! - This to me is the golden rule of
programming. “Help other as you would want others to help you”. In my case, I
think much of the programming wisdom I possess has come from helping others
solve their problems! I used to sit till late hours and help others solve their
programming problems or bugs. The advantage was,
a) Immense experience in solving programming problems.
b) Various ways people see a particular problem. Also you come across interesting/weird/strange ideas!
c) Empathy towards programmers. The difficulty they face in their day to day job.
Unfortunately as I grew older and came in touch with extremely process centric enviornments, I realized that “Help others” is not something officially appreciated.
4. Lead by example! - Another important trait if you are a senior programmer or architect. Many times I have come across senior technical architects who say - “It is simple, you just do this and do that”. I am 100% sure that many of them can’t code what they so confidently say as “simple”!
If you are a technical lead or a lead programmer, lead by example. Write code in front of your team members. You will get more trust, respect and support from your team!
5. Know everything! - Ok, that doesn’t sound right. I will rewrite it - Know a bit about everything. For example, If you are a core Java programmer, you should also know about SQL programming. It also helps if you know a bit of regular expressions or a scripting language. For example, I have recently gone through XML specification twice even though I have no professional need right now. But someday I will need it.
6. Know basics of computer science! - There are many programmers out there who doesn’t have the basic knowledge of computers or their inner workings. This is very essential. Many of the programming difficulties that people face is due to the lack of knowledge of how computers work! If needed take a computer science course.
7. Perfect it as much as you can! - Nobody is perfect. You can’t write perfect code in the first iteration. Refactoring is the mantra. Analyse your code, find code fragments that can be reused and refactored.
8. Use tools! - Many programming tasks can simplied if you use appropriate tools. For example, in all my projects I use Ant to automate build and deployment process. You will be surprized at the time you save!
9. Explore code! - If you want to improve your coding skills quickly, one thing I recommend is exploring code written by others. If I would have said this 10 years back, you would ask me- “Where can I find good code?” But now the scene is completely different. Open source movement has revolutionized everything. There is so much good open source code out there that I feel overwhelmed by it!
10. Be Humble! - Humility is the last of the top 10 traits a good programmer should have. But it is not the least! As you get more and more experience, it is very natural to feel arrogant. The moment you become arrogant, you loose the trust and respect of your fellow programmers.
I have come across many who are intelligent and technically quite good. But again I have no respect for them simply because they are arrogant. Being arrogant also shows how ignorant you are!
Remember, no one is perfect. You can also make mistakes. If someone points it out, thank him and accept his valid comments.
Now you might be thinking - Why is this guy not talking about “design patterns”? Why is he not talking about “Ruby on Rails”? What about extreme programming? What about open source contribution? Linux? and so on.
My dear friends, In my opinion talking about design patterns or practising pair programming(as in XP) etc. are not one of the top 10 traits. Being aware of design patterns definitely helps, but I think you will anyway come across it yourself if you are a regular programmer or if you explore code written by others!
Again I want to stress my first point. A good programmer is someone who can build a “good” software system given a software requirement. The “good” here means - correct, optimized, reusable, extensible and elegant. Everything else (tools, language, methodology) are just tools to achieve it.
Programming is not for everyone. If you don’t have the passion for it, quit and find another job. If your company doesn’t recognize your talent, quit the company.
Here are a couple of good books for exploring further on this subject. If you know a good one do let me know by commenting below.
The Mythical Man-Month: Essays on Software Engineering, 20th Anniversary Edition - The good old classic by Frederick P. Brooks.
Code Complete, Second Edition by Steve Mcconnell - A must read.
The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt and David Thomas - I endorse the apprentice method
Expert One-on-One J2EE Design and Development (Programmer to Programmer) by Rod Johnson - A must read if you are a J2EE guy.
Your thoughts are welcome!