In relation to my other question:
What's the politer word we can use for horrendous(for lack of better term again) codes when doing code reviews?
In relation to my other question:
What's the politer word we can use for horrendous(for lack of better term again) codes when doing code reviews?
I just usually say it's "not good" as I seldom find the need to be all that graphic about these things. So if I'm horrified it's "really not good" with a worried/frightened look on my face.
maybe anti-pattern?
I dislike that wording. It comes to suggest that it's the opposite of a pattern where as a better term should mean a pattern that best be avoided.
I think you misunderstood my point in the other thread.
'Code smell' is a perfectly good phrase for code smells.
The situation you described with regard to non-functional constructs in C# is nowhere near strong enough to warrant the use of the term. A code smell means something's likely to be amiss. It might be handy to have a milder term for when everything's fine, but there may be opportunities to be smarter.
I'm fond of "this sucks".
Feel free to replace "sucks" with "blows", "is horrendous", "is garbage".
I believe that it's completely appropriate as well when it's clearly obvious in a review that the employee is not meeting the expectations that are set for them when it has been shown that they are completely capable of doing so.
It is because of the willingness on the part of the employee to come in below the level of expectation that I find this justifiable.
This is very different than an employee who has exhibited that they don't have the capability to meet the level of expectation, for that, I think that more gentile wording is definitely appropriate.
Technical Debt? ;)
http://www.martinfowler.com/bliki/TechnicalDebt.html
[joke]
This block of code has fallen to the Dark Side.... beware the Dark Side of The Code.
Tight deadline leads to pressure, pressure leads to rash thinking, rash thinking leads to tight coupling, tight coupling leads to unmaintainable code, unmaintainable code leads to.... suffering.
[/joke]
Or, on a serious note,
This block of code appears to present opportunities or avenues for optimization....
And why not a simple "this code is bad" without forgetting the " because..."?
Code smell is not a pejorative, and it becomes a very non-confrontational term once the team understands what it means.
That being said, I occasionally use "goofy" or "unintuitive" when describing smelly code.
Whatever fits the case:
etc.
Note that these terms are not meant to define "code smell". They are common reasons I would call out code as having a code smell.
There have been several comments to various answers that "code smell" is not a negative term. While I agree that it does not necessarily mean "the code sucks" or that the code is awful (but sucky or awful code often does smell), it is an indication that an area of code may have problems and should be investigated more closely. Hmm, I'll add that one to the list of possible alternatives to "code smell".
So, on the scale of negativeity it tends a bit towards the neutral rather than toward the extreme negative. However, it's certainly not a positive term. I don't think you'll hear people say, "that's a fantastic code smell", except as a joke.
As the C2 wiki on refactoring says about "Code Smell":
A code smell is a hint that something has gone wrong somewhere in your code.
...
Calling something a CodeSmell is not an attack; it's simply a sign that a closer look is warranted.
I wouldn't say that anything on this list is an attack, except maybe "likely to be a problem". However, as for real life smells there are different degrees of "Code Smell" - there might be the smell of alcohol on someone's breath that's perfectly fine (just had a glass of wine with dinner or whatever), but there might be the smell of natural gas that means there's a big problem in the building.
A more polite word than code smell? If you are polite in any kind of code review then you are practically screwed. Political correctness in a code review session is an anti-pattern because in my experience it encourages destructive critisism. I'd suggest you just say it the way it is and give an example how to do it better. There are a bunch of code smells that are documented and widely discussed.
Got variable name that is non-descriptive? Just say so and give an example of a name that describes.
Got a condition that is never full-filled? Just say so and suggest to remove it.
Got a complex solution that can be refactored into something simple? Just say so and give an example how to simplify it.
Always be constructive than destructive in your criticism. If you are all political correct in a code review then two things will happen:
We are human software developers and not politicians who think they are super human.
It's better than saying "Hey, I think we need to spend a little time defuctoring this code." :]
another possibility is "alarming piece of code",
as in, it should make the zealot perfectionist inside you sound his sirens.
"Code smell" sounds neutral enough, but if you want to go PC all the way, try "differently-valuable statements or declarations," or DVSD for short. Algorithm for deriving:
Congratulations! You now have a completely non-offensive, non-descriptive and useless XTLA (Extended Three-Letter Acronym) to replace a commonly used idiom. The PHBs will love it.
A code smell is something which, while perhaps not evil in itself, is used by experienced programmers as a warning that something might be amiss. Often, this simply means the tell-tale signs left behind by a careless or amateurish programmer. If you want to avoid using the phrase "code smell", perhaps you could say "warning sign" or indeed "tell-tale".
Great alternatives to just saying "Code Smell" while not even worrying about being Politically Correct, is to mention the specific "smell" and mention a suggested solution. You can also give the developer a link to a website that explains the details so that the developer will also evangelize on creating good code.
This is a good reference about Code Smells and Refactoring:
http://c2.com/cgi/wiki?CodeSmell
If you are still worried about being Politically Correct, you don't have to, if you point out the Code Smells during the Code Review phase.
Try:
"Poorly Designed"
"A liability and a hazard waiting to happen"
Trying to be PC and non-conforntation about bugs lead to problems like this: Wired: gamma radiation