In response to a question about how to become a better programmer, Paul Penrod gave the following tips on a mailing list to which I subscribe. Many of these could apply to any profession.
I’m going to make few suggestions that might help you.
You don’t really need to apprentice under anyone, unless it’s your aim to adopt their style, thinking logic and methodology. The key to being a successful programmer is learning to think properly about the problem at hand, and be fluent enough with the language of choice to express yourself simply, but elegantly. Programming is an algorithmic exercise, that is part science and part art – mostly art. You need to develop a style that works for you and the problems you wish to solve, and that takes time and experience. It’s one of the few disciplines where [on the job training] is just as valuable – if not more so, than hitting the books, and listening to academics.
Over the years I spent a great deal of time studying what others did (along with their code) and figured out for myself what would work best in my situation at the time. There are some basic tenets that have come from all that effort:
- Understand the problem completely first.
- There is no perfect language for all problems, although C comes pretty close.
- YOUR perfect language(s) will be the one(s) that is(are) most compatible with YOUR thinking process.
- Keep It Simple Stupid – ALWAYS works.
- ALWAYS document completely what you did – you will thank yourself is six months time.
- Never turn down an opportunity to see what someone else did – they may have figured out a simpler, more effective way.
- Always be teachable.
- There is almost always a better way. Many solutions are at best, compromises.
- Learn what others did wrong and don’t repeat their mistakes.
- Don’t be offended easily.
- There are plenty of intelligent idiots, and few sages – learn to tell the difference and pay attention.
- Just because you can, doesn’t mean you should.
- Develop your own style. You are a unique individual, and you don’t think the same as anyone else.
- It’s an art form first, and technical second.
- Software is never “done”. It’s a work in progress.
- Have fun with it. If you aren’t enjoying the effort, it will show in the results.
- Share what you have learned with others. It pays dividends far beyond the code itself.