Coding Convention
Jump to navigation
Jump to search
A Coding Convention is a convention for programming.
- Example(s):
- Python coding convention: PEP 8 (Python Enhancement Proposal 8) is the official coding style guide for Python. It covers indentation, line length, whitespace, comments, naming conventions, and other coding practices to promote consistency and readability in Python code. (https://www.python.org/dev/peps/pep-0008/)
- Java coding convention: The official Java Code Conventions by Oracle is a widely accepted coding standard for Java. It provides guidelines for naming conventions, file organization, indentation, line length, comments, and other programming practices. (https://www.oracle.com/java/technologies/javase/codeconventions-contents.html)
- JavaScript coding convention: There are several popular coding conventions for JavaScript, such as Airbnb's JavaScript Style Guide, Google's JavaScript Style Guide, and the StandardJS style guide. Each of these guides provides recommendations for coding practices, naming conventions, and formatting to promote consistency and readability in JavaScript code.
- C# coding convention: Microsoft provides C# Coding Conventions, which include guidelines for naming conventions, layout conventions, and general coding practices, among others. These conventions promote clean, readable, and maintainable C# code. (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions)
- Ruby coding convention: The Ruby community follows the Ruby Style Guide, which offers a set of best practices and conventions for writing clean, readable, and maintainable Ruby code. It covers indentation, line length, comments, naming conventions, and other coding practices. (https://rubystyle.guide/)
- …
- See: Programming Language, Programming Style, Indent Style, Comment (Computer Programming), Declaration (Computer Science), Statement (Programming), Whitespace (Computer Science), Identifier Naming Convention, Best Coding Practices.
References
2023
- chat
- Coding conventions are a set of guidelines and best practices that help improve the readability, maintainability, and consistency of a codebase. They cover aspects such as naming conventions, indentation and whitespace, code organization, comments, error handling, and other programming practices. By adhering to these guidelines, developers can write code that is easier to understand, debug, and modify by others.
- Examples of coding conventions for popular programming languages include:
- Python coding convention: PEP 8 (Python Enhancement Proposal 8) is the official coding style guide for Python. It covers aspects such as indentation, line length, whitespace, comments, naming conventions, and other coding practices to promote consistency and readability in Python code. (https://www.python.org/dev/peps/pep-0008/)
- Java coding convention: The official Java Code Conventions by Oracle is a widely accepted coding standard for Java. It provides guidelines for naming conventions, file organization, indentation, line length, comments, and other programming practices. (https://www.oracle.com/java/technologies/javase/codeconventions-contents.html)
- JavaScript coding convention: There are several popular coding conventions for JavaScript, such as Airbnb's JavaScript Style Guide, Google's JavaScript Style Guide, and the StandardJS style guide. Each of these guides provides recommendations for coding practices, naming conventions, and formatting to promote consistency and readability in JavaScript code.
- C# coding convention: Microsoft provides C# Coding Conventions, which include guidelines for naming conventions, layout conventions, and general coding practices, among others. These conventions are designed to promote clean, readable, and maintainable C# code. (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions)
- Ruby coding convention: The Ruby community follows the Ruby Style Guide, which offers a set of best practices and conventions for writing clean, readable, and maintainable Ruby code. It covers topics like indentation, line length, comments, naming conventions, and other coding practices. (https://rubystyle.guide/)
2023
- (Wikipedia, 2023) ⇒ https://en.wikipedia.org/wiki/Coding_conventions Retrieved:2023-4-25.
- Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices, and methods for each aspect of a program written in that language. These conventions usually cover file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices, programming principles, programming rules of thumb, architectural best practices, etc. These are guidelines for software structural quality. Software programmers are highly recommended to follow these guidelines to help improve the readability of their source code and make software maintenance easier. Coding conventions are only applicable to the human maintainers and peer reviewers of a software project. Conventions may be formalized in a documented set of rules that an entire team or company follows, or may be as informal as the habitual coding practices of an individual. Coding conventions are not enforced by compilers.