Talk:Code smell
| WikiProject Computer science | (Rated Stub-class, Low-importance) | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||
Contents |
[edit] (random heading)
(inserted randomly for random readability ... said: Rursus (bork²) 09:05, 9 July 2009 (UTC))
For a September 2004 deletion debate over this page see Wikipedia:Votes for deletion/Code smell
There might be three Perl people that use this term, but it's very rare, an article is on the very edge of validity. This would make more sense as a single sentence in design pattern (computer science) or some such. Stan 03:45 26 May 2003 (UTC)
- I like the phrase but it seems to be an original invention: WP:NOT: If you invent the word frindle or a new type of dance move, it is not article material until a secondary source reports on it. Wikipedia is not for things made up in school one day. --Fasten 20:22, 12 April 2006 (UTC)
-
- This term has been around since at least 1999, is commonly used by developers following Extreme Programming, or similar, methodologies -- particularly in discussions involving refactoring. I have two books on my desk that each have a chapter devoted to the topic. There are numerous other books (that aren't on my desk) that would also cover the term.:
- Fowler, Martin (1999). Refactoring. Improving the Design of Existing Code. Addison-Wesley. ISBN 0201485672.
- Kerievsky, Joshua (2005). Refactoring to Patterns. Addison-Wesley. ISBN 0321213351.
- kenj0418 17:01, 13 April 2006 (UTC)
- This term has been around since at least 1999, is commonly used by developers following Extreme Programming, or similar, methodologies -- particularly in discussions involving refactoring. I have two books on my desk that each have a chapter devoted to the topic. There are numerous other books (that aren't on my desk) that would also cover the term.:
- I suppose in that case you can add them to the article. --Fasten 17:32, 13 April 2006 (UTC)
- I just tried to verify your claim but apparently I didn't buy Fowler. I remember somebody recommended it and I browsed through it but it probably had the wrong smell. --Fasten 17:49, 13 April 2006 (UTC)
[edit] Removed Dubious Example - Code Generation
Whether or not code generation is a code smell is debatable. The article indicates that it violates once and only once but code generation can be a way to achieve once and only once in a programming environment (language, target platform) where that is not otherwise possible. Since this example is dubious and the article does not lose the ability to demonstrate the concept of a code smell without it, I've removed that example. (Wikipedia:Be_bold) 216.36.186.2 (talk) 13:08, 4 February 2008 (UTC)
[edit] Requirement contrarinesses
At a superficial overview, it seems that the criteria for code smell are sound, but reading the link A Taxonomy for "Bad Code Smells" it seems that the duplicate code criterion counteracts the inappropriate intimacy and the large class/method criteria. An indication of this is the late introduction of generics in Java, which gives at hand that there is a general, longlived and naïve belief that "classes can do it all". For the article, which fulfills a very important purpose, I propose enhancing the criteria list, to problematize what the real problem is about and how the OO philosophy, especially XP philosophy believes that this real problem should be solved. (For the far future, I would hope there emerged some numeric measures of a fair balancing of one criterion against the others, but if CompSci ever reaches there, it will take decennia). ... said: Rursus (bork²) 09:16, 9 July 2009 (UTC)
[edit] Citation not needed?
"Determining what is and is not a code smell is often a subjective judgment" misspelling + does this really need a citation? It seems like common sense to me. —Preceding unsigned comment added by 212.85.4.179 (talk) 12:59, 14 October 2009 (UTC)
[edit] Mention other bad practices
Like bad naming, etc. bkil (talk) 16:58, 3 November 2009 (UTC)
Some additional smells I routinely encounter:
- Use of globals (in those languages that support them) where reusable objects would be better.
- Use of switches to achieve variant behaviors where polymorphic objects would server better.
Mohanchous (talk) 13:02, 11 October 2010 (UTC)
[edit] Ubercallback ?
Is this a common term (Google only shows up cuts-and-paste from wikipedia)? Isn't a "callback that does everything" a reasonable artefact of the Strategy pattern? 217.194.34.115 (talk) 12:04, 13 January 2012 (UTC)