O'Reilly logo

Scala Test-Driven Development by Gaurav Sood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code smell

Code smell in the source code is any indication on the surface of the programming code that hints at a deeper problem. This can be as trivial as an oversized method. The most accurate indication of a code smell is the testability of the code. If the code can be tested in a very simple and straightforward test then that means the code is not tightly coupled. This also means that the code is doing only one task, which can be tested end to end.

 

"a code smell is a surface indication that usually corresponds to a deeper problem in the system"

 
 --Martin Fowler

There are a few types of code smell that can be identified by looking at the code.

Expendable

An expendable is something gratuitous and futile. Removal of such code will make the code ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required