https://www.techtarget.com/searchsoftwarequality/answer/What-coding-standards-in-software-engineering-should-we-follow
Coding standards ensure understandable, updated code that contains minimal errors. They also strengthen collaboration and reduce technical debt.
Teams can opt to develop their own closed standards or rely on community-driven, language-specific standards. Depending on the industry, organizations might also need to satisfy specific standards that govern privacy and security.
Whichever standard the organization is bound to, it's critical that developers align on writing, reviewing, maintaining and documenting code for all projects. Teams should apply coding conventions and best practices in the application development process to achieve the pillars of code quality and develop consistent standards across projects.
Coding standards are rulesets, guidelines and best practices developers follow when writing applications. They play a critical role in successful development projects.
These standards improve code directly in several ways. They also facilitate adjacent practices such as collaboration, onboarding new team members and quality control. Coding standards strengthen a project as follows:
The goal of coding standards is to help developers do their jobs, not to put roadblocks in front of them. Some developers might resist the initial adoption of standards, but they are crucial to the team's overall success. Coding standards are one sign of a mature development team and accompanying codebase.
Some organizations maintain an internal set of coding standards for their codebase. Organizations typically tailor these standards to their specific needs. The organization might even use specific standards for different teams or projects. Other development teams might rely on public standards maintained by a larger community.
A significant difference between closed and open standards has to do with the ways in which they change. Public contributors maintain open standards, making them more dynamic and subject to evolving best practices. Closed standards are not -- organizations maintain them internally. They change less frequently than open standards.
Teams should create or adopt standards that help them achieve the following five pillars of code quality.
Maintainability standards define how easily developers can read, understand, modify and update the code. This attribute is perhaps the most important and widely observed because software is often reused or distributed for decades longer than intended. Maintenance standards can dictate factors such as comments, indenting code, clear and meaningful variable names, and digestible documentation.
Reliability and dependability standards pertain to elements that affect the software's ability to run error-free, such as bug rates, error handling, testing guidelines, requirements and security. Reliability standards aim to help software deal with errors gracefully when defects occur. Developers should write code that can handle unexpected or erroneous inputs that might otherwise cause the program to fail. For example, if the end user enters numbers where letters are expected, a reliable application might present the user with an error message directing them to change the input instead of failing silently.
These coding conventions present ways to make code reusable and minimize the software's overall resource requirements, such as its memory footprint. Efficiency standards typically exist as a series of tactics to create shorter, tighter code. As an example, developers can create callable modules for commonly used functions. This approach often eliminates repetitive or redundant functions that can eat up resources when the software executes a given task.
Readability emphasizes code that is clear and logical. It includes self-explanatory naming standards and comments that aid future developers, troubleshooters or reviewers in understanding the purpose of a code block intuitively. Readability enhances collaboration and scalability as the code is modified over time.
These standards typically shape the UX of a given software project. They relate to input using keys, mouse or touch. They also include menu and data display output. These coding conventions enable organizations to address responsiveness or maximum latency demands, offer multilingual interfaces and help information, and design the aesthetic aspects of the software. For example, developers working on a client-server application might opt to implement caching and asynchronous data storage to reduce the latency that often occurs with synchronous write commits.
Standards define coding best practices and conventions. Most of the following conventions can apply to any development project.
Covers variable, constant, function, class and component names to provide consistency and clear understanding. Some best naming convention practices include the following:
Example naming conventions and case standards include the following:
| Convention name | Example | Common use | Language(s) |
|
kebab case |
sample-content |
CSS classes, HTML attributes |
HTML, CSS |
|
snake case |
sample_content |
Functions, variables |
Python, C, Ruby |
|
pascal case |
SampleContent |
Classes, types |
Python, Java, C# |
|
camel case |
sampleContent |
Functions, variables, URLs |
JavaScript, Java, C# |
Establishes rules for tabs, whitespace, line lengths and character placement. Some best indentation and formatting practices include the following:
Provides clarity for commenting to create concise and accurate documentation. Some best practices for commenting include the following:
Defines the overall code construction for consistency, logic and efficiency. Some best practices for code structure include the following:
Covers error and mitigation practices. Best practices for error handling include the following:
Emphasizes reusable code and simplicity. Examples of general programming principles include the following:
Sets effective version control, branching and code checkout techniques to avoid confusion and inadvertent integration of untested or unready code. Some best practices for version control include the following:
Provides controls for libraries and dependencies that an application relies on for functionality. These resources are often not developed in-house, making it challenging to guarantee security and efficiency. Best practices for dependency management include the following:
Some best practices for software documentation include the following:
Addresses code's protection from vulnerabilities and attacks. Some best practices for code security include the following:
Specific coding standards and style guides codify general best practices and conventions based on certain constraints, such as industry regulations or language. Organizations often incorporate these specific guidelines into their broader internal coding standards or adapt these standards to fit their own organizational needs.
Coding languages have their own standards and style guides that dictate best practices for some of the conventions listed above, such as naming conventions and formatting. Some common coding style guides organized by language include the following:
Be sure to investigate industry-specific standards as well. Several industries provide standards and best practices.
The healthcare industry relies on the following standards and guidelines:
The banking and financial industry doesn't have the same kinds of defined standards as healthcare but it does recognize and use various best practices. Examples are as follows:
The Gramm-Leach-Bliley Act creates a regulatory need for security measures in the finance industry, which indirectly drives the adoption of secure coding standards.
Damon Garn owns Cogspinner Coaction and provides freelance IT writing and editing services. He has written multiple CompTIA study guides, including the Linux+, Cloud Essentials+ and Server+ guides, and contributes extensively to Informa TechTarget, The New Stack and CompTIA Blogs.
10 Jun 2025