This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code Craft: bad smells

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is bad smells
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • 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
  • 0
  • 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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic