diff --git a/guide/english/agile/code-smells/index.md b/guide/english/agile/code-smells/index.md index 101d7b746f8..67bb640d9a3 100644 --- a/guide/english/agile/code-smells/index.md +++ b/guide/english/agile/code-smells/index.md @@ -3,15 +3,15 @@ title: Code Smells --- ## Code Smells -A Code Smell in computer programming is a surface indication that there might be a problem regarding your system and the quality of your code. This problem might require refactoring to be fixed. +A Code Smell in computer programming is a surface indication that there might be a problem regarding your system and the quality of your code. This problem might require refactoring or redesign to be corrected. -It is important to understand that smelly code works, but is not of good quality. +It is important to understand that smelly code may execute, but is not of good quality in one or more aspects. #### Examples: -1. Duplicated code - Blocks of code that have been replicated across the code base. This may indicate that you need to generalize the code into a function and call it in two places, or it may be that the way the code works in one place is completely unrelated to the way it works in another place, despite having been copied. +1. Duplicated code - Blocks of code that have been replicated across the code base. This may indicate that you need to generalize the code into a function/module/component/service and call it in several places, or it may be that the way the code works in one place is completely unrelated to the way it works in another place, despite having been copied. 2. Large classes - Classes having too many lines of code. This may indicate that the class is trying to do too many things, and needs to be broken up into smaller classes. 3. [Magic numbers](https://en.wikipedia.org/wiki/Magic_number_(programming)) - Variables (or `if` statements) scattered in the code that hold numeric values with no apparent meaning. -4. Many-parameter methods - Methods that take more that 2 or 3 parameters usually indicate that the method does more than one thing and should be broken down to multiple methods. +4. Many-parameter methods - Methods that take more that 2 or 3 parameters usually indicate that the method does more than one thing and should be broken down into multiple methods. 5. Unclear method or variable naming - A programmer should be able to understand what a method does without looking at the method's body. If the name or the parameter naming is indistinct, it is an indicator that the method should be refactored to reveal its purpose in the code. #### More Information: