It has been over 12 years since I started professional programming. To this day I am still actively involved in software development. The only difference is that recently I moved into mobile application development platforms such as iPhone, Android and Samsung bada. I am not a computer science graduate and my formal background in computing is minimal, still programming is something that I consider as a personal passion. In that respect I am lucky to make my living from programming. What surprises me though is that even after all these years in the field, there is so much to learn every day!
In this post I will summarize my thoughts on what makes a good programmer (master programmer or chief programmer as called by some). 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 India are under this impression. This myth is purposefully floated around mainly because 90% of the programmers in these companies have less than a year of programming experience. So coding/programming has to be projected as a mechanical activity!
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?
Programming is much more than just mechanical coding. There are many ways to code a software solution and building an elegant solution is an intellectually satisfying experience.
Ok no more preaching! Here are the 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!
Ideally the "think phase" should drive software design. However I have seen people taking design as a rather tedious manual activity involving class diagrams, interface diagrams etc.
I will give an example of the importance of this "Think" factor. Sometime back we had a requirement to build around 50 interfaces. The requirement was to write a set of programs to transform data from a set of tables in one database to another. Somebody did the estimate as below,
1 interface = 5 days and hence 50 interfaces = 50×5 = 250 days of build effort.
When I started on the project, everything was in place. The team, the effort of 250 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 50 interfaces, the time taken was 5 days (since only transformation rules were to be written). So my team got a lot of free time and we had an very elegant solution which could easily cater for future interface requirements.
Let me repeat it again – "Think before act" is one of the most important traits of a good programmer. Does it apply to business software? Yes it does! Thinking process is the key aspect behind software refactoring. Thinking is what creates a good software design. However thinking process should be active even when you are implementing a design into code.
2. Learn! – Learn Baby, learn! A good programmer has a burning desire to learn new things every day. I have been programming for a long time 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#, Ruby, PHP and Qbasic (yes, qbasic is my first love!). Recently I spend a lot of time learning mobile development platforms and languages (Objective – C, Android platform etc.). Yet, I have a nagging feeling that I not learning enough.
Nowadays learning trait is something which I see less and less around the workplace. The learning itself is so formalized and force fed that people are bored with it. Many organizations realize the lack of learning and end up force feeding the stuff.
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 India, it is very easy to manipulate the system.
Another important thing is that a good programmer doesn’t believe in too much specialization. I have seen people who hide their experience in PHP since they think it is inferior. The language may be imperfect, but your experience in it is still valuable! Languages and technologies are just different tools to build software products. A good programmer should always be ready to learn a new technology or language and apply it in practice. Another important thing is that most of the time good programming concepts are independent of technology and language.
When I hire programmers, I always look for the "curious" ones. They can learn anything.
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,
- Immense experience in solving programming problems.
- Various ways people see a particular problem. Also you come across interesting/weird/strange ideas!
- Empathy towards other programmers. You will come to know the difficulty they face in their day to day job.
Unfortunately as I grew older and came in touch with extremely process centric environments, I realized that "Help others" is not something officially appreciated.
One important aspect here is that as you go up the ladder in technical stream, you get less time to help others. Instead of helping them with code, you would have to help them with ideas. I have found this to be challenging especially when you deal with newcomers. So some kind of hierarchy is required where master programmer helps senior programmers who in turn mentors junior programmers.
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 pretty sure that many of them can’t code what they so confidently say as "simple"! In fact looking back I find myself guilty of this crime.
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 Go language specification even though I have no professional need right now. But someday I will need it.
I may even go to the extend that a programmer should know markup languages such as HTML and even a bit of image editing. However I wouldn’t recommend a programmer doing image editing for a commercial product unless he is a gifted graphics artist.
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 or algorithms work! If needed take a computer science course. There are a lot of free online material available. For example, take a look at the video lectures provided by Stanford university.
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. Analyze your code, find code fragments that can be reused and refactored. But in my case it took me a couple of years before I could see the importance of refactoring. It took even more years before refactoring became second nature to me. A good programmer is always looking for opportunities for code refactoring which improves the overall quality of the software product.
However a good programmer is also aware of the practical limitations. In many cases it may not be possible to have perfect code under delivery deadlines and hence a smart compromise is almost always needed.
8. Use tools! – Many programming tasks can simplified if you use appropriate tools. For example, in all my personal projects I use Ant to automate build and deployment processes. You will be surprised at the time you save! I also use a version control system (subversion), even though I am the only programmer for my personal projects. It gives me a way to see the changes that I have done over a period of time.
In some cases it makes sense to even create your own tools. For example, many of the large gaming projects actually start with writing effective tools.
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!
Another thing I recommend is that you either start an open source project or become member of an ongoing project.
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 and you wouldn’t even know it. 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 some of 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? and so on. In my opinion, being fanatical about language superiority, framework superiority, design patterns or practicing pair programming(as in XP) etc. is not one of the traits of a good programmer. 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 under a set of constraints. 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.
Further Reading for Programmers
Here are a couple of good books for exploring further on this subject. If you know a good book or article on the subject 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. Many of the implementation details doesn’t make sense for most of us, but the underlying ideas I think are eternal.
- Code Complete, Second Edition by Steve McConnell – A must read. This book should be on your desk if you are a good programmer.
- 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 Java web application developer. One of the most influential books for me.
Your thoughts are welcome.
October 29, 2010 | Posted in Opinion 8 Comments » | By Jayson Joseph