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


New Computer? Steps to Protect Your Computer Before Connecting to the Internet

Getting a new computer should be an exciting and gratifying... Read More

How To Have Two (Multiple) Copies Of Windows

Having two operating systems is not as difficult as many... Read More

What Exactly are Screensavers? - part I

After reading this good article you will know some important... Read More

Getting Started with HTML

The basic language of the internet is html. If you... Read More

Cisco Certification: Taking Your First Certification Exam

Youâ??ve studied hard; youâ??ve practiced your configurations; youâ??ve used your... Read More

COOKIES - What Are They!!

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

The Best MP3 Players Under $100

You don't have to fork out $250 for a super-diggy-whizbang... Read More

How I Started Working With 3D Modeling Programs

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

Things You Can Do To Speed Up Your Computer

Upgrading your processor will always speed up your computer, but... Read More

Flow Text Around a Graphic in Microsoft Word

Flow Text Around a GraphicQuestion: I have inserted a photo... Read More

How To Safeguard Your Computer?

The following practice, if done regularly, may help you to... Read More

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

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

Anti-Skip Protection on Mp3 Players

There have been some questions on anti-skip protection on mp3... Read More

Gain Control Over Your Screensavers With These Simple Steps

We all enjoy our favorite screensavers but in the same... Read More

Passwords and the Human Factor

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

Nephrology and Dialysis For a PDA

Saving Lives With A Pocket PCFree medical downloads can be... Read More

Maintain Your Computer ? Keep Your Business Running

Maintaining your computer is extremely important ? especially if you... Read More

Dont Let the Internet Overstimulate Your Mind

The Internet is an awesome tool, but be careful and... Read More

Consumer Electronic Information: The Basics of the DLP Projector

Projectors have come a long way in the past few... Read More

How to Place Home Theater Speakers

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

Cisco CCNA / CCNP Certification: OSPF ASBRs Explained And Illustrated

When I first started studying for my CCNP, some of... Read More

Digital Cameras + Photo Printers = Quality Instant Photographs

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

Web Standards

HTTP ProtocolThe web is run on port 80. You are... Read More

System File Checker - A Maintenance Utility

System File Checker is a great utility that is typically... Read More

What Has A Portable MP3 Player Have To Do With Your Business

Plenty! When we made the decision to be our own... 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

Make Windows XP Run Faster!

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

Compile .BAT Files into Native Windows Applications (.EXE)

Since the DOS days, batch files have been one of... Read More

Cache In Your Chips And Get A Bus!

Computer related terminology could sometimes be daunting to newcomers. These... Read More

Does Microsoft Show Hackers How To Attack?

After another security hole recently surfaced in Microsoft's Windows operating... Read More

Favorite Things To Do With Home Technology

Save money. Save 10-15% on utility bills per month. Work... Read More

Smart Apple iPod Tips and Techniques

Are you thinking of buying an Apple iPod? Or have... Read More

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

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