Should code be commented?

Should code be commented?

Comments should be added not just when initially writing code but also when modifying it, especially fixing bugs.

What is a code smell in programming?

A code smell is a surface indication that usually corresponds to a deeper problem in the system. The term was first coined by Kent Beck while helping me with my Refactoring book. The best smells are something that’s easy to spot and most of time lead you to really interesting problems.

What is commented code?

Filters. (programming) To temporarily disable a section of source code by converting it into a comment.

What anti-pattern means?

“An anti-pattern is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive.” Note the reference to “a common response.” Anti-patterns are not occasional mistakes, they are common ones, and are nearly always followed with good intentions.

How are regions an antipattern or code smell?

Are #regions an antipattern or code smell? C# allows the use of #region / #endregion keywords to make areas of code collapsible in the editor. Whenever I do this though I do it to hide large chunks of code that could probably be refactored into other classes or methods.

Which is the best definition of an anti pattern?

An anti-pattern (or antipattern) is a pattern used in social or business operations or software engineering that may be commonly used but is ineffective and/or counterproductive in practice regions are anti-patterns.

Is there such thing as a ” code smell “?

And, as a general rule, commenting too much can be a symptom of bad programming. Categorically defining a method or process as a “code smell” is a “zealotry smell”. The term is becoming the new “considered harmful”.

Why does commenting code just to comment code smell?

Commenting code just to comment code is a smell. Commenting code because you’re using an obscure algorithm that’s an order of magnitude faster saves the maintenance programmer (usually me 6 months after I wrote it) half a day of poking through the code to determine what it’s doing. // Dear me in the future. Please, resolve this problem.