15 Good Programming Habits

1. Before sitting down to code, you should have a formal or paper napkin design of the solution to be coded. Never start coding without a design unless the code is trivial.

2. Good code documentation is as important as a good knowledge of a programming language. Write short logic as comments in the source code file itself for each large block of your code. It’s a good idea to mention the dates your program was created and modified, along with why the modification was needed.

3. Maintaining the version of your program is another important task. Some existing programming tools already have built-in version management. Every time you make a change to your program, it saves a copy of it as a .bak file.

My approach is to maintain 3 versions of a program. Say, I have a file program.c that is used by other members of the project team. I make a backup of this file as program.c.old and another copy as program.c.wrk where I edit. When the modifications are successfully compiled, replace the program.c…

Leave a Reply

Your email address will not be published. Required fields are marked *