15 Good Programming Habits - myoddPc

Computer Information - myOddPc

15 Good Programming Habits

1. Before sitting down for coding, you must have formal or a paper-napkin design of the solution to be coded. Never start coding without any design unless the code is trivial one.2. Good code documentation is as important as good knowledge of a programming language. Write brief logic for each major block of your code as comments in source code file itself. Its good to mention creation and modification dates of your program along-with why modification was required.3. Maintaining versions of your program is another important task. Some present-day programming tools already have a built-in version management. Whenever you make any change to your program, they save its copy as .bak file.My approach is to maintain 3 versions of a program. Say, I have a file program.c which is used by other project team members also. I copy this file as program.c.old as backup and make another copy as program.c.wrk where I do modifications. When modifications are successfully compiled, replace program.c with .wrk file.You can also append a date or some explanation phrase to your program versions like program260505.c or programReadFnWrking.c .4. If your project contains multiple source files then maintain a README file stating purpose of each source files, data files, intermediate and log files (if any). You may also mention the compilation and execution steps.5. Ever wondered why your IF statement is not working as it should do. May be your are using single equal i.e. "=" instead of "==" in the condition check. A good approach is to write condition in reverse order. So, your condition should read something like this:if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.1) for(int i=0;i

Syed Feroz Zainvi

Sony PSP - Not Just For Games

Zen and the Art of Buying Computer Parts
The Ugly Face Of Technology
Wind Turbine Lights to Protect Birds
Robotic Manufacturing Lighting
Is that software really free?
Tips on Finding the Best CD Duplication Services
Making the Most of Digital Camera Memory Cards
Microsoft Dynamics GP & CRM in Transportation & Logistics
Computer Dos and Donts
Sony PSP - Not Just For Games

SyncUp – A File/Folder Synchronizer For Windows

Basic Tips and tricks for Windows XP
Buying the Perfect Computer – The FIRST Time
Dirty Little Computer Viruses and How To Protect Yourself
10 Secrets to a Healthy Computer and a Happier You
8 Simple Ways to Defend Against Evil Doers Both Online and Off
Microsoft CRM Programming Secrets – Tips For Developers
Microsoft Great Plains Integration with Legacy Systems – Overview For Developer
Microsoft RMS – Great Plains Integration – Overview For IT Specialist
Removing Incoming Email in MS Exchange, C# Example
SyncUp – A File/Folder Synchronizer For Windows

Articles by the same author

10 Ways to Learn a Software
Rapid Application Development - Is it Really a Need of Today?
15 Good Programming Habits
Is Software Tester a Most Infamous Person in a Software Project Team?

Disclaimer

Please note that this website is for information only. Whilst every care has been taken to provide accurate information you should always seek the advice of a professional before attempting any repairs or making any purchase(s).
You need to take special care to ensure that the information given applies your system.

Credit Cards
Great credit card deals from www.fool.co.uk

Ringtones
Ringtones are an important revenue stream for all major record companies since illegal downloads became popular.
marker About Us | Site Map | Privacy Policy | Contact Us | ©2005-2006