Importance Of Coding Standards
|
Programming Help for Beginners
We write programs to instruct computers. When programming using a high level programming language like C++ or Java, we are using a syntax that is somewhat closer to human languages. However, we use these programs as inputs to either compilers or interpreters to be converted to computer understandable binary format. For this reason, as far as the program code adheres to the syntax of the used programming languages, the compilers and interpreters never bother about the layout or visual formatting of the program code. However, as human programmers, we ourselves need to bother about the aesthetics of the program code.
What is a Coding Standard?
A coding standard is a set of guidelines, rules and regulations on how to write code. Usually a coding standard includes guide lines on how to name variables, how to indent the code, how to place parenthesis and keywords etc. The idea is to be consistent in programming so that, in case of multiple people working on the same code, it becomes easier for one to understand what others have done. Even for individual programmers, and especially for beginners, it becomes very important to adhere to a standard when writing the code. The idea is, when we look at our own code after some time, if we have followed a coding standard, it takes less time to understand or remember what we meant when we wrote some piece of code.
Coding Standards Make a Difference
Look at the following example:
int volume(int i, int j, int k) {
int vol;
vol = i * j * k;
return vol;
}
Looking at this code at a glance, it takes some time for one to understand that this function calculates the volume. However if we adhere to a naming convention for variables and method names, we could make the code more readable.
Here are few sample conventions:
int calculateVolume(int height, int width, int length) {
int volume = 0;
volume = height * width * length;
return volume;
}
It takes more time to type this code, however this saves far more time. This code is far more readable than its original version. With a little bit of effort, we could make the code much more understandable.
The Benefits
It is not only the readability that we get through a coding standard in programming. Writing more secure code could also be encouraged through a coding convention. As an example, in C++ we could say that each pointer variable must be initialized to NULL.
char* myName = NULL;
This ensures that we would not corrupt memory while using this pointer variable.
Code readability is just one of the aspects of maintainability. Coding standards help a great deal with program maintainability, our ability to change programs with ease. Consistency imposed through a coding standard is a key factor to achieve success in maintaining prorams.
Defining Your Own Coding Standard
A programmer can define his or her own coding convention and adhere to that in writing programms. However there are many coding conventions available on the Internet. Those who program in Java should have a look into http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html - Code Conventions for the Java Programming Language by Sun.
For C++ coding standards, I would recommend that you have a look into http://www.bbc.co.uk/guidelines/webdev/AppB.Cpp_Coding_Standards.htm - C++ Coding Standards from BBC.
http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-14.html - C++ Programming HOWTO has some C++ Coding Conventions and also a bunch of links that lead to several coding standards that you can pick from.
John Dirk
Programming Consultant
http://www.programminghelp4u.com/
Programming ( Assignment / Project ) Help
|
|
|
Examining The Substance Of Studio Mx
To all web designers out there, this article is for you! I guess you already heard about Studio MX (I think so!) ? the ideal bundle for professional web designers, bringing together Dreamweaver MX for page design, Flash MX for animation and interactivity, and Fireworks MX for editing and optimizing graphics. With all these components, it certainly provides professional functionality for every aspect of web development.I must say that the integration between the individual products is generally very good. It begins with the interface which uses common elements such ...(related: Software)
Php On-the-fly!
IntroductionPHP can be used for a lot of different things, and is one of the most powerful scripting languages available on the web. Not to mention it's extremely cheap and widely used. However, one thing that PHP is lacking, and in fact most scripting languages are, is a way to update pages in real-time, without having to reload a page or submit a form.The internet wasn't made for this. The web br...(related: Software)
Microsoft Crm Or Siebel
Siebel is traditional CRM market leader, however and mostly due to recession 200-2003, Siebel lost sizable portion of CRM market to new tiger, such as Microsoft CRM. Microsoft CRM s recent (2001) CRM answer from Microsoft and attempt top get market share from traditional vendors: Siebel, Oracle, Onyx. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision (the last two in progress).We would like to give you Microsoft CRM selection advise, based on our MS CRM consulting practice, going back to its inception in 1999. This article ...(related: Software)
How Do I Get Rid Of That Darn Spyware?
Ad-Aware and Spybot are probably the two most well known antispyware solutions. However, they frequently fail to catch the more crafty spyware. Here is a list of five solutions known to get rid of the problem when all others fail.1. Webroot Spy Sweeperhttp://www.deprice.com/webrootspysweeper.htmPC Magazine's Best of the Year 2004 for antispyware, Spy Sweeper now scans for spyware 30% faster. Spy Sweeper detects and successfully removes vici...(related: Software)
C++ Tutorial 2, Input And Variables
This is the tutorial where we really get into programming. Input and variables are the essence of programming. In this tutorial you will learn how to get data from the user and use variables. You will learn the types of variables there are and how to do basic math with them. At first, this may seem boring and pointless, but you have to learn it, and it should go quick.Basic InputWhen you are making a console application, here is how you should get user input. Some of you may have guessed it, you use c[b]in[/b], of course, the 'c' meaning console and the 'in' meaning input, like 'cout'. So, here is a basic code, where the name of the variable x.cin>>x;Defining Varia...(related: Software)
What Is Preventive Maintenance Software?
Preventive Maintenance (PM) is defined as scheduled work done on a system to identify and fix any occurring issues before they become problems. The concept of preventive maintenance applies to many different industries. PM is often done on buildings, various types of machines, computers, institutions, as well as personal assets, including finances and property.A common example of preventive maintenance is a car getting its oil changed. Usually, this is done when the car is in good working order to prevent any future problems resulting from the car running on old oil.In the past, preventive maintenance ...(related: Software)
Not All Project Management Software Is Created Equal
The purpose of Project Management Software is to provide an environment in which a group of people can work together on joint projects. Most projects involve the development and implementation of new ideas, and these ideas have to be presented, evaluated, and revised.The role of Project Management Software is to help this collaborative effort along. Collaboration happens at various levels and it is up to the Project Management Software to facilitate all these levels.A typical Project Management scenarioConsider a creative agency developing a marketing campaign for one of its major clients. The project team includes a number of individuals within the agency -- the creative director, the copywriter, the illustrator, the graphic designer, etc. But it also in...(related: Software)
Microsoft Great Plains: Carpet, Textile, Fabric, Felt Distributor ? Implementation Overview
In this small article we will show you the possible way of deploying Microsoft Business Solutions Great Plains for the market niche of large, mid-size and small reselling and distribution business in carpeting and floor covering, textile & fabric. We will not be talking about fabric produc...(related: Software)
Computer Phones ? Facts And Fallacies
The stakes are high when considering security, privacy, and savings, and the old adage, "look before you leap" might be a more judicial approach when searching for a computer phone provider, aka VoIP (voice over internet protocol).FACTS? PC phones (VoIP) can save individuals and businesses up to 80% on current phone bills, regardless of whether calls are made from PC to landlines or mobile phones.? Secure lines that include patented technology are protected against terminal viruses, worms, Trojan horses, unscrupulous hackers, and uninvited guests listening in on private conversations.? Unsecure lines cripple users by creating dangerous vulnerability to security and privacy due to operating on open platforms or shared services.? Over 90% of all VoIP provider services a...(related: Software)
A Guide To Purchasing Professional Xp Icons Online And Enhancing Your Applications
Icons are used everywhere; right from software applications, to internet browsers, to operating systems to websites and even in print media. But businesses have to waste a good deal of money and time in manufacturing icons on their own. Professional icons are tough to create and need expertise in terms of creative artists, lots of ti...(related: Software)
Microsoft Great Plains Fa: Fixed Assets ? Overview For Consultant
Great Plains Fixed Assets Management module is a robust tool that can help you manage your assets effectively. It integrates perfectly with other Great Plains modules like General Ledger, Purchase Order Processing, and Payables Management ensuring accuracy while reducing redundant data entry.As with other Great Plains modules, save time and money by utilizing classes or groups to make mass changes. This is useful for depreciating, retiring, or simply changing the information for a set of assets with a single click. Great Plains' intuitive graphical user interface makes it easy to access supporting data on assets, books, etc. The latest versions of Great Plains Fixed Asset also comes with a total of 16 ...(related: Software)
25 Things Mapping Software Can Do For You
1. With mapping software you can create a report that tracks your retirement plan for you.2. Use mapping software to create an Executive Dashboard, which tracks the bottom line.3. Use mapping software to find the snowfall reports for your favorite ski resorts in Idaho.4. You can even use mapping software to explore an interactive map of India for school reports, business, or travel.5. Track your store incoming and outgoing inventory, including shipping information and warehouse location, mapping software.6. You can conveniently book your own airline seat, so you don't need to worry if you are a "window person" as opposed to an "aisle person."7. Know the who, what, when, where, and how of your department by using m...(related: Software)
Microsoft Great Plains & Crm In Transportation & Logistics ? Overview
Microsoft Business Solutions Great Plains and MS CRM (client relation management system) are very p...(related: Software)
site-map - Copyright © 2008 | Contact Webmaster | All Rights Reserved. | Software