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

    scheduled maid service Northbrook ..
    In The News:

    A third-party dental marketing agency's unsecured database exposed millions of patient profiles with personal information that could be exploited for identity theft and insurance fraud.
    New York-based Aircela unveils refrigerator-size device that converts air and water into fossil-free gasoline, with initial deployments planned for 2025.
    Your home address is easily accessible on people finder sites, putting you at risk for stalking and identity theft, but data removal services can help protect your personal information.
    Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents
    Robot combat evolves at Unitree's Iron Fist King event as G1 robots face off in China, featuring knockouts, precise strikes and agile machines that can perform side flips.
    Take control of your digital privacy with actionable tips like Facebook privacy checkup, location tracking management and data removal services to protect your personal information.
    Smart TVs and streaming devices manufactured in China are being compromised by BadBox 2.0 malware before users even power them on; infections have been detected in 222 countries.
    The lightweight, 15-pound Tenniix tennis robot mimics pro playing styles like Nadal and Federer, using AI trained on 8,000 hours of professional tennis data.
    Oak Ridge's uranium enrichment facility supports America's AI ambitions amid concerns that China's aggressive nuclear reactor construction could give it an edge in powering data centers.
    Facebook scam ads now leverage AI and deepfakes to create convincing celebrity endorsements, targeting specific demographics with sophisticated schemes.
    Apple unveils iOS 26, macOS 26 Tahoe and iPadOS 26 with translucent Liquid Glass design at WWDC 2025, featuring ChatGPT integration as competitors advance rapidly.
    The Atom Touch prosthetic arm combines an AI neural interface with EMG sensors, allowing amputees to control individual fingers with precision at an affordable $25,000.
    Aspen officials aim to have crews on the scene within five minutes — something they say would be nearly impossible without precise location data the AI technology gives.
    Tech expert Kurt “CyberGuy" Knutsson says iPads are usually secure, but hackers can access them. Spot warning signs early to protect your data.
    Tech expert Kurt Knutsson reveals how to easily move photos and videos off your iPhone or Android to securely protect your favorite moments.
    The Social Security Administration is launching digital SSN access this summer. Tech expert Kurt “CyberGuy" Knutsson helps you learn how to use it and protect your identity.
    Glide underwater with CudaJet and make the ocean your playground. Kurt “CyberGuy" Knutsson discusses the redesigned tech that might be your next big thrilling adventure.
    Protect yourself from login alert scams with five security steps, including avoiding suspicious links, checking account activity and enabling two-factor authentication
    Skip the usual Father's Day gifts with personalized ideas for tech enthusiasts, home brewers, pool owners, seniors, outdoor lovers and privacy-conscious dads.
    DMV text scam alert: Fraudsters impersonating motor vehicle departments nationwide are sending threatening messages about unpaid tickets and tolls to steal your information.
    Fox News' AI Newsletter brings you the latest on this rapidly evolving technology.
    E-BAR, MIT's mobile robot, provides physical support for seniors with handlebars that follow from behind, helping prevent falls while maintaining dignity for aging adults.
    AI is changing everything – now, we can even use it to generate video. I tried OpenAI's Sora and Google's Veo – here's how they measure up against each other.
    Five simple phone setting tweaks that make your device work harder for you, from automatic text message deletion to scheduled focus modes.
    Android users can save time with 10 simple automations, including automatic battery saver mode, location-based Wi-Fi settings and scheduled "Do Not Disturb" mode.

    Corel WordPerfect 7 Macro Programming Example

    Case study: A secretary using Corel WordPerfect 7 is often... Read More

    Dont Choose Adobe When Working With PDF

    While Adobe is the most known maker of PDF tools,... Read More

    Microsoft Great Plains Upgrade ? Version 8.0 Overview for IT Director/Controller

    If you have Microsoft Great Plains as main accounting and... Read More

    Manufacturing Solutions for Microsoft Great Plains ? Overview for Consultant

    Microsoft Business Solutions Great Plains has full-featured manufacturing set of... Read More

    How To Avoid Getting Hooked By Pfishing

    "Pfishing", sometimes spelled "Phishing", is a word that's used to... Read More

    Spyware Protection: A Must for Any Home Computer

    Now that spyware is the single most dangerous threat to... Read More

    Daffodil DB: Web Database

    What is a Web Database?A web database is a database... Read More

    Microsoft CRM Customization: Integration with Third Party SQL Application/Database

    Microsoft CRM ? Client Relationship Management package from Microsoft Business... Read More

    Theres Gold in Your Websites Server Log

    Many Webmasters have never bothered to view their website's server... Read More

    Dashboard Widgets for Windows

    For a windows user like me, just can watch with... Read More

    OSI Layers Model

    IntroductionDuring the early years of our modern computer era, very... Read More

    Microsoft Great Plains Integration Manager: Using Continuum ? Overview for Developer

    Microsoft Business Solutions Great Plains has I'd say end user... Read More

    Microsoft CRM USA Nationwide Remote Support

    Remember old good days when your company probably had Great... Read More

    Reduce TCO: The Java Database Way

    TCO (Total Cost Ownership) is the buzzword in... Read More

    Microsoft Business Solutions Partner ? How to Launch New IT Consulting Practice

    In the new era of internet marketing the problem of... Read More

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

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

    Cisco Certification: Introduction To ISDN, Part III

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

    Microsoft Great Plains RW: Report Writer

    Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

    Assertion in Java

    Assertion facility is added in J2SE 1.4. In order to... Read More

    Microsoft Business Solutions VAR/Partner Selection ? Overview for IT Director/Manager/Controller

    Microsoft Great Plains and Microsoft CRM become more and more... Read More

    What to Do if All Screensavers Fun is Grayed Out?

    Finally, you have some time to personalize your desktop with... Read More

    Microsoft CRM Modification ? Overview for IT Specialist

    Microsoft CRM is now on the scene and it is... Read More

    ERP System of the Future: Database, Business Logic and Interface

    We will base our prognosis on our Microsoft Business Solutions... Read More

    Putting Screensavers Under Control

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

    Kick-Ass Performance For Your PC? Its Easy

    Is your PC is slow and wimpy? Then you need... Read More

    reliable maid service Highland Park ..