# Effective Coding Standards

DevFeed: [Effective Coding Standards](<https://devfeed.tech/articles/effective-coding-standards-24944.md>)

Original publisher: [Read original article](<https://codeahoy.com/2016/05/22/effective-coding-standards/>)

Author: umer

Published: 2016-05-22T00:00:00Z

Content type: opinion

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [coding](<https://devfeed.tech/topics/coding.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Software](<https://devfeed.tech/topics/software.md>), [Code review](<https://devfeed.tech/topics/code-review.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [code-review](<https://devfeed.tech/tags/code-review.md>), [coding-style](<https://devfeed.tech/tags/coding-style.md>), [developer](<https://devfeed.tech/tags/developer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [software](<https://devfeed.tech/tags/software.md>)

## AI overview

This opinion article argues that coding standards are useful for consistency and maintainability, but warns that overly personal, rigid, or undocumented rules can damage developer morale and make code reviews unproductive.

## Source excerpt

Coding standards are a set of guidelines, best practices, programming styles and conventions that developers adhere to when writing source code for a project. All big software companies have them. Here are few guidelines from the 'Linux kernel coding style': a. Tabs are 8 characters, and thus indentations are also 8 characters. b. The limit on the length of lines is 80 columns and this is a strongly preferred limit. c. The preferred form for allocating a zeroed array is the following: p = kcalloc(n, sizeof(...), ...); Both forms check for overflow on the allocation size n * sizeof(...), and return NULL if that occurred. Recently, I came across a blog post from Richard Rodger. In 'Why I Have Given Up on Coding Standards', he writes: Every developer knows you should have a one, exact, coding standard in your company. Every developer also knows you have to fight to get your rules into the company standard. Every developer secretly despairs when starting a new job, afraid of the crazy coding standard some power-mad architect has dictated. It's better to throw coding standards out and allow free expression. The small win you get from increased conformity does not move the needle. Coding standards are technical ass-covering. Oh boy. While I disagree with Richard that coding standards should be abandoned, I share his pain. I briefly worked with a nut job of a "senior developer" who came in as the lead for a project we'd been working on for 6 months. He was an academic who had just finished his PhD and had little experience working on real world projects. He spent first couple of weeks writing "coding standards" in total isolation like he was some kind of a God and we were lowly beings who just weren't good enough. His coding standards document was full of his personal opinions and promoted some insane form of coding style. The control freak demanded that we update the source code we had already written to reflect his standards. I have never witnessed team morale hit rock bot