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

In The News:

Take Control of Your Home Screen  The New York Times
5 Tips for Smartphone Voice Tools  The New York Times

Upgrading Your PC for Non-experts

IntroOne of the big advantages of PCs over earlier types... Read More

The Help Desk

When you think of a help desk, what do you... Read More

Cisco Certification: The Most Important Cisco Study Youll Ever Do

All of us are familiar with the pyramids of Egypt.... Read More

Bios Term

BIOS - Basic Input Output SystemThe central processing unit of... Read More

How Do MP3 Players Work? Digital Audio Technology Revolutionizes Music Enjoyment

Millions have enjoyed recorded music since 1877 when Thomas Edison... Read More

Quick System Restore with ASR Backups

ASR (Automated System Recovery) is a feature available on the... Read More

Buying A PC Flat Screen Monitor

For six years, my Samsung PC 13.8 inch SyncMaster conventional... Read More

Freezing - Time To Warm Up Your PC

Freezing is also known as crashing or hanging. It's frustrating.... Read More

Help, I Need a New HDTV! (Part 5 of 5)

Feeling overwhelmed in selecting a new TV? With all the... Read More

What are the Main Components of Any Computer, and Which are the Most Critical to Its Performance?

Computers are everywhere, and vary in specification, brands, sizes, shaped,... Read More

How Does My PC Get Hot

There are many sources of heat that can raise the... Read More

How to Protect your PC from Spyware in the Cyber Age

Wouldn't you be shocked to find that your personal sensitive... Read More

Occupational Therapy and PDAs

Occupational Therapy Made EasierMedical downloads for the pda have improved... Read More

Make Windows XP Run Faster!

A friend told me: "My computer startup seems to be... Read More

SmartCar Memory Stick for LapTop Transfer Data

With the new technology used to transfer information to from... Read More

Repairing A Corrupt .RAR/.ZIP Archive

Step 1:Open WinRAR and browse to the folder with your... Read More

Is Your Web Browser Putting You At Risk?

It's free, it comes with Windows and it's used by... Read More

MCSE 70-290 Certification Primer

Microsoft Certifications are one of the most widely acclaimed, pursued,... Read More

5 Simple Ways To Increase Your Computer Speed & Help Your Computer Run More Efficiently!

If you're a computer expert, you'll probably already know about... Read More

How to Set Up Simple File Sharing WinXP

The first step is: Start > My DocumentsSo you have... Read More

FTP - File Transfer Protocol Explained

File Transfer Protocol (FTP) is a protocol that is part... Read More

Windows PDA Medical Software Benefits

PDA Medical BenefitsIf you are concerned about your medical history,... Read More

Digital Cameras Ratings Abolish Camera Comparison Guesswork

Digital cameras ratings are great tools for deciding which camera... Read More

Looking For an MP3 Player?

If you don't have an mp3 player, and even if... Read More

Selecting a Personal Digital Assistant

A Computer in Your HandCarrying around an address book and... Read More