Code Smells: Dispensables
The term “code smells” and the associated metaphor originated from the field of software development, particularly from the influential book “Refactoring: Improving the Design of Existing Code” by Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts, Erich Gamma, and Steve Metsker. The book, first published in 1999, is a seminal work that introduced the concept of refactoring — making small, incremental changes to improve the internal structure of the code without changing its external behavior.
In “Refactoring,” the authors used the term “code smells” to describe certain patterns in the code that might indicate potential issues or areas for improvement. The idea is that, just as unpleasant odors can indicate something is wrong with a physical object, certain characteristics in the code might suggest there are problems with its design or structure. These code smells serve as indicators, prompting developers to consider refactoring to enhance the code’s maintainability, readability, and overall quality.
The concept of code smells has since become widely adopted in the software development community, serving as a shared vocabulary for developers to discuss and address common issues in code. It has been instrumental in promoting best practices and fostering a culture of continuous improvement in software development.