Working towards becoming a good programmer is very important in the life of a programmer since they chose their career as a Software Engineer. To become a good programmer, need to follow some basic important points which I would like to convey through this blog.
Programming is a skill which is improved by practice and experience. True, people are born with different programming capabilities, still many techniques can be learned only with experience.
What is distinguishes a good programmer from others? Here is a list.
- He thinks– A good coder never jumps straight away into coding when he gets work. He first *thinks* about the problem and decides on how to approach the solution. He may try out some code snippets and write something which typically thrown out later. But once he starts the actual coding he proceeds at lightning speed.
- He never duplicates code– A good programmer never repeats/duplicates code. Code duplication is one of the worst sins for a programmer. In the initial coding, some duplication may be there, but an expert removes them gradually.
- He writes extensible code– Writing extensible code requires considerable experience. This is what makes coding a creative activity. You need to be aware of the full impact of what you are writing in the code’s future life cycle. Design patterns are a collection of techniques that helps in writing extensible code. A good programmer may not know the names of all patterns but he is aware of them nonetheless.
- He is not afraid to re-factor– It means “disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior” No one can write software in a perfect way at the first try. You write a good amount of code, analyze it and then refactor it. This is a continuous process during coding. I have seen that re-factoring requires a considerable amount of prior experience.
- He comments for a purpose– A good programmer comments what is relevant. If he has spent some time thinking about a portion of code, he will comment on his thoughts in the code. This helps another programmer to understand the thoughts and design decisions behind the code he is reading.
Obviously there are other qualities (such as code optimization) which can be seen in a good programmer. But the above 5 items are the most important.
Let’s inculcate these to our code writing skills and other qualities will come automatically.