CSC510 / BadSmells

0 stars 3 forks source link

bad smell for code #11

Open Hongyi23 opened 9 years ago

Hongyi23 commented 9 years ago

I found many materials describing bad smell in code, and I choose some which may be easy to check.

*Duplicated code

  1. Same code structure in more than one place.
  2. Same expression in two sibling subclasses.
  3. Code is similar but not the same.
  4. Methods do the same thing with a different algorithm.

*Long method

  1. Using a temporary variable to hold the result of an expression.
  2. Methods with long list of parameters.
  3. Too many conditions and loops.

*Long Parameter List

  1. A method call requires passing long list of parameters.

*Divergent change / shotgun surgery

jentle commented 9 years ago

Do you have the code for that or related software, tools?

On Thu, Apr 23, 2015 at 3:14 PM, Hongyi Ma notifications@github.com wrote:

I found many materials describing bad smell in code, and I choose some which may be easy to check.

*Duplicated code

  1. Same code structure in more than one place.
  2. Same expression in two sibling subclasses.
  3. Code is similar but not the same.
  4. Methods do the same thing with a different algorithm.

*Long method

  1. Using a temporary variable to hold the result of an expression.
  2. Methods with long list of parameters.
  3. Too many conditions and loops.

*Long Parameter List

  1. A method call requires passing long list of parameters.

*Divergent change / shotgun surgery

— Reply to this email directly or view it on GitHub https://github.com/CSC510/BadSmells/issues/11.

Hongyi23 commented 9 years ago

I don't have but I'm sure there are many on the internet especially in github. Type "code smell detector", you will find many code and tools.

jentle commented 9 years ago

I have analyse three repos in code climate , they pretend a few bad smells in code.

On Thu, Apr 23, 2015 at 4:05 PM, Hongyi Ma notifications@github.com wrote:

I don't have but I'm sure there are many on the internet especially in github. Type "code smell detector", you will find many code and tools.

— Reply to this email directly or view it on GitHub https://github.com/CSC510/BadSmells/issues/11#issuecomment-95704090.