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:


pen paper and inkwell


cat break through


Upgrading Your PC for Non-experts

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

Healthy Webmasters Choose Ergonomic Computer Products

Webmasters usually sit at their computers much longer in a... Read More

Internet Explorer Shortcuts for Mouse-o-phobes

If you're like me, you occasionally find the ubiquitous mouse... Read More

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

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

Is Digital Camera Technology Making Film Obsolete?

Perhaps not yet, but the handwriting might be on the... Read More

Keeping the Windows Registry Operational

The registry is where the computer stores information about the... Read More

Repairing A Corrupt .RAR/.ZIP Archive

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

How to Place Home Theater Speakers

You have your television and home theater receiver; you just... Read More

Is Online DVD Rental or Pay-Per-View the Best Way to Get Your Movies?

With renting methods such as online DVD rental and pay-per-view,... Read More

Be Your Own IT Department

If you use a computer, you need to know more... Read More

Looking For an MP3 Player?

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

COOKIES - What Are They!!

Cookies, not the kind that Mom makes, but the computer... Read More

Lightning Season: How to Avoid Data Loss

We have just entered the time of year that most... Read More

How to Set Up Simple File Sharing WinXP

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

Computer Viruses are Bad Luck

OK, so you caught a computer virus and your system... Read More

Digital Cameras + Photo Printers = Quality Instant Photographs

In the 1950's and 1960's Polaroid's instant cameras were all... Read More

Five Simple Steps to Speed up Your Computer

Most people download and save so much information on their... Read More

Flash Memory, Part I: MMC and SD

MMC and SDFlash memory is available in so many formats... Read More

This Page Cannot Be Displayed ? What to Do When Your Internet Breaks

The DNS (Domain Name System) servers are what your computer... Read More

Your Home is in Your Hands

I would like to tell you about a magic home.... Read More

Plasma TV vs LCD TV

For those seeking to buy their first flat panel TV... Read More

Desktop Security Software Risks - Part 2

This is the third in a series of articles highlighting... Read More

Compare MP3 Players for the Coolest Features and Sweetest Deals

How can you compare mp3 players to be sure you're... Read More

Deleting and Destroying Data Forever

Peoples' private information needs to stay private, even after it... Read More

Back Up, Back Up, Back Up!

This is not your typical lost data story. I was... Read More

Passwords and the Human Factor

Passwords have a strange dual nature. The stronger and safer... Read More

Tips For Getting Technical Support Help Online

Sometimes your PC will start acting strange for no apparent... Read More

How To Safeguard Your Computer?

The following practice, if done regularly, may help you to... 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

Temporary Fixes to Spyware, Ad-ware, and Virus Infections

So you've got some spyware, ad-ware, or viruses on your... Read More

Connect Your IPAQ to Linux

Choose Not To ConformPalm pilots and pdas are constantly growing... Read More

Lives With Games Tradition and Industry

The United States Of America citizen feels that games is... Read More

How I Started Working With 3D Modeling Programs

So I'll start from the very beginning.One day I was... Read More