Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code Craft: bad smells

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr Goodliffe,
You were talking about "bad" code in another thread,
and I would like to know if your book also talks about "bad smells" and how to avoid them. Like in "Refactoring: Improving the Design of Existing Code, Martin Fowler" or "Refactoring to Patterns, Joshua Kerievsky".
 
Swapnil Shroff
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is bad smells
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A simple example of a bad smell is when you have the same piece of code here and there. It smells bad, and you know you've got to do something about it, like could put that code into one function.

You'll find a short intro at Wikipedia :
http://en.wikipedia.org/wiki/Code_smell
[ February 22, 2007: Message edited by: Satou kurinosuke ]
 
Pete Goodliffe
author
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Code smells" are a powerful metaphor found in Fowler's classic Refactoring book.


Code Craft does talk about refactoring (in the chapter about code evolution, naturally) but doesn't repeat all of Fowler's book!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic