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:

  • use meaningful variable names
  • use verbs in method names
  • use nouns for variables
  • use 4 spaces to indent
  • 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

    kitchen deep cleaning Deerfield ..
    In The News:

    Unlike robotaxi competitors, Tensor focuses on consumer-owned self-driving cars that adapt to highways and urban roads with full redundancy systems for safety.
    Medicare scams cost $54 billion in 2024 as fraudsters target beneficiaries with fake calls demanding payments and personal information to steal benefits.
    Scammers create fake Evite invitations that mimic legitimate event emails, requiring users to verify senders and use antivirus software for protection.
    The new Apple Watch hypertension feature passively monitors blood pressure patterns over 30 days using sensors to detect chronic high blood pressure signs.
    Chrome extension spyware disguised as a free VPN service highlights security risks after it captured private browsing data from trusted sites.
    New research shows how fatty acids in cooking oil can safely dissolve and recover silver from circuit boards without harmful chemicals or environmental damage.
    The Fox News AI newsletter gives you information on the latest AI technology advancements, and about the challenges and opportunities AI presents now and for the future.
    Anthropic investigates alarming AI abuse case where hacker automated entire cybercrime campaign using Claude, stealing sensitive data from defense and healthcare firms.
    TikTok, Meta and YouTube restrict Charlie Kirk shooting videos with age gates and warnings while X faces criticism for allowing continued circulation.
    Cybercriminals use fake troubleshooting websites to trick Mac users into running terminal commands that install Shamos malware through ClickFix tactics.
    San Francisco startup Fable launches Showrunner, an AI platform dubbed the 'Netflix of AI' that generates animated episodes from text descriptions with Amazon support.
    Apple raised iPhone prices for some models despite receiving tariff relief from President Donald Trump, with the new lineup starting at $799 for the base model.
    A two-story 3D concrete printed home in Western Australia demonstrates faster construction methods that could reshape American housing amid rising costs.
    Credit scores remain important during retirement for insurance rates and housing applications, while seniors become prime targets for identity theft and financial scams.
    Scammers now send unexpected packages with QR codes that redirect victims to fraudulent websites or download malicious software to steal sensitive information.
    Meeting AI tools record private conversations alongside work discussions, creating privacy risks that can be managed with proper settings and awareness.
    Hotel privacy concerns are valid but rare, with methods to detect hidden tech using smartphone flashlights, mirror tests and scanning apps.
    Improve your Wi-Fi speed and reliability with 10 simple router optimization tips that don't require special apps or expensive subscriptions.
    A Columbia University breach exposed names, Social Security numbers and academic records of nearly 869,000 people, with notifications beginning in August.
    Rental car drivers use AI-powered apps like Proofr to protect themselves from unfair damage fees as major companies deploy automated inspection tools.
    Fox News' AI newsletter brings you the latest on technology advancements around artificial intelligence.
    OnTrac data breach between April 13-15, 2025, exposed personal information of over 40,000 people including Social Security numbers and medical records.
    A woman named Wika announces her engagement to an AI chatbot sparking worldwide debate about virtual relationships and technology.
    The notorious people search site National Public Data relaunches despite a previous breach affecting 3 billion individuals, raising fresh privacy concerns.
    Revolutionary TRAUMAGEL gel controls life-threatening bleeding from gunshot wounds and traumatic injuries, helping first responders prevent prehospital deaths.

    Microsoft and Webmasters

    Does Microsoft care for WebmastersIt's always been a problem with... Read More

    Free Microsoft Word Online Training Tutorial Resources

    Microsoft Word is one of the most popular office applications... Read More

    A Case Study on Selecting Contract Management Software

    Professional services firm cuts costs and improves productivity with integrated... Read More

    Software: What Suits Me?

    Almost all new and major brand of PCs come with... Read More

    A Symons Mark II Function Point Counting Example

    I provide, here clear explanations and a count of function... Read More

    My Experience - Making a Vision into Reality

    Disclaimer: All the thoughts expressed are my views only! Your... Read More

    Microsoft Great Plains in Metal Distribution: Implementation & Customization ? Consultant Overview

    Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More

    Need of Document Management System (DMS)

    Document Management or Enterprise Information Management is perhaps one of... Read More

    Microsoft Great Plains as ERP and Microsoft CRM as CRM

    If you have Microsoft Great Plains and support it for... Read More

    Cisco Certification: Introduction To ISDN, Part III

    Configuring PPP PAP AuthenticationNow we know how the ISDN link... Read More

    Lotus Domino Implementation and Development: Infrastructure ? Present and Future

    Domino server is a buffer between the operation system and... Read More

    Microsoft Great Plains Implementation in Russia ? Overview for Consultant

    Microsoft Business Solutions Great Plains is very popular ERP platform... Read More

    How Do I Get Rid Of That Darn Spyware?

    Ad-Aware and Spybot are probably the two most well known... Read More

    Free Program Removes Spyware not Detected by Premium Security Scan

    What is Spyware?Spyware monitors your surfing habits and sends the... Read More

    Corporate ERP: Microsoft Great Plains For The Plant In Brazil ? Overview For CIO

    Microsoft Business Solutions Great Plains as new ERP for multinational... Read More

    What You Must Know About Spyware Right Now

    Spyware is like the new technological nuclear weapon on the... Read More

    Inherent Dangers Of File Sharing Via The Internet.

    Cyberspace has opened up a new frontier with exciting possibilities... Read More

    Getting Patched with Windows Service Pack

    Are you one of those people that keeps track of... Read More

    Information Products: A Business Owners Best Friend

    We live in a post-industrial age where information is the... Read More

    Putting Screensavers Under Control

    No matter how much you enjoy your favorite screensavers, sometimes... Read More

    Will Adobe Manage to Replace Industry Work Horse Quark Express by Giving Adobe InDesign for Free?

    And kill the best layout software in the process of... Read More

    Device Driver Basics

    Most people understand that the "hardware" part of their computer... Read More

    Keep Your Software Simple! A Review of EditPlus

    I like my software simple. If it's too complex or... Read More

    Collaboration Software: Index of Collaboration Software Technologies

    Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More

    New SQL Delta Version 3.1

    COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More

    interior house cleaning Highland Park ..