# 3 Guidelines to Reduce Implementation Flaws

DevFeed: [3 Guidelines to Reduce Implementation Flaws](<https://devfeed.tech/articles/3-guidelines-to-reduce-implementation-flaws-26217.md>)

Original publisher: [Read original article](<https://medium.com/groupon-eng/3-guidelines-to-reduce-implementation-flaws-958511e2a82f?source=rss----5c13a88f9872---4>)

Author: Pratik Shekhar

Published: 2021-09-03T17:06:05Z

Content type: opinion

Language: en

Sources: [Groupon Engineering -- Medium](<https://devfeed.tech/sources/groupon-engineering-medium.md>)

Topics: [Code quality](<https://devfeed.tech/topics/code-quality.md>), [coding](<https://devfeed.tech/topics/coding.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>)

Tags: [code-quality](<https://devfeed.tech/tags/code-quality.md>), [coding](<https://devfeed.tech/tags/coding.md>), [coding-style](<https://devfeed.tech/tags/coding-style.md>), [function](<https://devfeed.tech/tags/function.md>), [google](<https://devfeed.tech/tags/google.md>), [implement](<https://devfeed.tech/tags/implement.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [team](<https://devfeed.tech/tags/team.md>), [tech](<https://devfeed.tech/tags/tech.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

## AI overview

The article presents coding guidelines intended to reduce implementation flaws. It emphasizes code quality, readability, team practices, breaking functions into smaller single-purpose units, and making code easier to test and reuse.

## Source excerpt

3 Rules/Guidelines to Reduce Implementation Flaws When I hear the word "rule", I think back to grade school. "Be quiet when the teacher is talking." "No interrupting, you must raise your hand with a question." But what makes this different than following a set of guidelines? There was always that one kid who never listened to the rules. In coding, we may talk about rules, whereas in reality, we're following some sort of guideline. Think of guidelines as a scene from the Ghostbusters movie when Bill Murray told Sigourney Weaver that he never sleeps with a possessed woman. Then she kissed him and he said, "Actually, this is more of a guideline than a rule." A standard guideline is important because it helps improve the existing code quality, a guideline also makes it more readable and also somewhere sets the team culture. Over the last few years of gaining more experience in coding, rules have changed into guidelines; however, there are three top guidelines I always follow. After being curious if other colleagues follow any specific coding guidelines, I reached out to several within Groupon and companies like Google, Morgan Stanley, Apple, Lutron, L Brands, Capitol One, GoPuff, and Vertex Inc. Specifically, I asked if they follow any guidelines that reduce implementation flaws. To not much surprise, we all follow similar guidelines. Take a moment and ask yourself, do you have any specific rules or guidelines? We may all have similar guidelines that we follow, mine are listed below- Guideline 1 -> Break down your functions My first rule is merely following the single responsibility principle. A function should be responsible for doing one specific thing. If a function has too many responsibilities, then it should be broken down into multiple smaller functions. Its logic is limited in scope, which makes it easier to implement and test its end-to-end functionality. A friend of mine once said that "If the function you end up unit testing requires tests for multiple separat