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


Cisco CCNA / CCNP Certification: OSPF ASBRs Explained And Illustrated

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

Ergonomics and Healthy Computing - Positioning Your Body For Maximum Comfort At Your Computer

Do you remember the old saw about how computers would... Read More

PC Owners - The Largest Criminal Gang Ever?

The year is 1981. IBM has just released the Personal... Read More

Computer Geeks and Garden Gnomes

First and foremost before I begin my ranting it is... Read More

A Peek Into the Near Future of Electronics Technology

How long do you think DVDs have around? 20 years?... Read More

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

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

Digital Cameras: How Many Pixels Do I Need?

With the bewildering number of digital cameras on the market,... 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

A Lesson in HTML

As the owner of a Country Mall and Top Site... Read More

Anti-Skip Protection on Mp3 Players

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

DVD The Ultimate Consumer Digital Media

Digital Video Disc or as it is sometimes referred to... Read More

FTP - File Transfer Protocol Explained

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

Apache, MySQL & PHP for Windows

Apache, MysQL and PHP for Windows could be a nice... Read More

Wordpress Plugins

Maybe you always wanted a feature that hasn't been available... Read More

4 Computer Money-saving Tips

Tip #1 -- Rebates: A rebate is not always a... Read More

Customize Your Portable Player with an MP3 Player Accessory

Everywhere you look today people are listening to personal audio... Read More

Learning To Navigate Ciscos Online Documentation

When studying for your Cisco CCNA, CCNP, or CCIE exam,... Read More

Computer Performance Tips

Introduction In this article I will clearly spell out the... Read More

An All Too Familar Pain

Lost & Found for the 21st CenturyIn today's hectic world... Read More

More Cool Web Tricks

If you ask most people what frustrates them most about... Read More

Be Prepared in the Event Computer Disaster Strikes

ComputersBusinesses and individuals alike have all grown to rely on... Read More

Portable Technology: Getting to Know the Treo

Up until the recent past, those who wanted to take... Read More

Does Microsoft Show Hackers How To Attack?

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

Computer Viruses are Bad Luck

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

Registry Tools Demystified

Not sure what Windows registry is or how it works?... Read More

Mail-merging: The Principles

About mail-mergingMail-merging is the process of merging variable data and... Read More

Are You Well Protected?

Winter?the official start of the cold and flu season. Though,... Read More

Cisco CCNA Certification: Five Things To Do DURING The Exam

There are plenty of articles out there about how to... Read More

Is Desktop Search Deserving?

Google, in their march to stay ahead of the pack... Read More

Why Get a Microsoft MCSE Certification?

In the years of the dot com boom and bust,... Read More

Put Order and Information into File Names

Unless you place your faith in internal search engine software... Read More

Cisco Certification: Building Your Home Lab, Part II

In the first part of this home lab tutorial, CCNA... Read More

Repairing A Corrupt .RAR/.ZIP Archive

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