A collection of Bad Code Smells in a Catalog form for Developers & Researchers. Code Smell is a typical bad code implementation, and learning these concepts immiedietly makes you a better developer!
Not sure what your point is here. Of course inconsistent naming is a code smell. Do you want inconsistent names?
Of course not. But in some (uncommon in my experience) cases method names can be unclear or just plain impractically long. In such cases, I would rather see an exception to the rule than having to rely on a comment to explain the name choice.
I had a great example a couple months back, but I can’t remember it right now. But here’s a (bad) example of such a situation.
An example of this could be a button that triggers a click. You might call it BtnClick. Then the click event for it could be BtnClickClick. In this case, I’d rather see BtnClick_click. Ugly? Yes. Bad example? yes. But the idea is that it’s more clear that the _Click action is seperate from the name.
Of course not. But in some (uncommon in my experience) cases method names can be unclear or just plain impractically long. In such cases, I would rather see an exception to the rule than having to rely on a comment to explain the name choice.
I had a great example a couple months back, but I can’t remember it right now. But here’s a (bad) example of such a situation.
An example of this could be a button that triggers a click. You might call it BtnClick. Then the click event for it could be BtnClickClick. In this case, I’d rather see BtnClick_click. Ugly? Yes. Bad example? yes. But the idea is that it’s more clear that the _Click action is seperate from the name.
There is no rule. Smells are not rules.