Code smell
From Free net encyclopedia
In the community of computer programming, code smell is a jargon term used among programmers to refer to a symptom that indicates something may be wrong. It generally indicates that the code should be refactored or the overall design should be reexamined. The term appears to have be coined by Kent Beck on WardsWiki. Usage of the term increased after it was featured in Refactoring. Improving the Design of Existing Code
Determining what is and is not a code smell is often a subject judgment, and will often vary by language, developer and development methodology.
[edit]
Common code smells
- Large method - a method, function, or procedure that has grown too large.
- Large class - a class that has grown too large.
- Feature envy - a class that uses methods of another class excessively.
- Inappropriate intimacy - a class that has dependencies on implementation details of another class.
- Refused bequeath - a class that overrides a method of a base class' such that the contract of the base class is not honored by derived class. See Liskov substitution principle.
- Lazy class - a class that does too little.
[edit]
See also
[edit]
Reference
- CodeSmell at c2.com
- {{cite book
| first = Martin | last = Fowler | authorlink = Martin Fowler | year = 1999 | title = Refactoring. Improving the Design of Existing Code | publisher = Addison-Wesley | id = ISBN 0201485672
}}