What are Code Smells? What is the best way to correct them?
What I'm interested in is what's the funk responsible for the funkiest code. It is difficult when writing code to maintain the perspective needed to analyze your own mistakes, but while reading code, especially someone else's, they jump out at you. Some, one catches more whiffs of while refactoring and debugging than others.
So, when you are deep in the code and something tickles your nose, what is it most likely to be?
edit: Please note the language you are using when you answer. Hopefully we might learn which code smells are endemic to which languages and/or design philosophies. Don't worry about explaining fixes as there are plenty of resources for that already.
Error density clusters - i.e. they follow a pareto rule (as in "80% of errors are found in 20% of the routines even when compensating for differences in size").
So the most simple code smell is finding a bug: where there's one, there are probably more.
"Code Complete" cites that implementation errors are most common for small projects, but usually become about even with alnalysis and design errors for large ones. Also, density of errors increases with amount of code.
(not as anecdoctical as you are probably looking for, but relevant nonetheless)