Search This Blog

Friday, 11 August 2017

Bad Smells in Code

  • Duplicate code If you see the same code structure in more than one place.

  • Long Method The longer a procedure is, the more difficult it is to understand.

  • Large Class When a class is trying to do too much.

  • Long Parameter List Don't pass in everything the method needs; instead you pass enough so that the method can get to everything it needs.

  • Divergent Change When one class is commonly changed in different ways for different reasons. (You likely have a situation in which two objects are better than one.)

Heads up! When you feel the need to write a comment, first try to refactor the code .so that any comment becomes superfluous.

1 comment:

Creating a NuGet Package Feed to Host Artifacts

Step-by-Step Guide: Creating a NuGet Package Feed to Host Artifacts 🔹 Step 1: Create a C# Class Library and Generate NuG...

Recent Post