klenwell information services : CodeSmells

Revision [3158]

This is an old revision of CodeSmells made by KlenwellAdmin on 2018-09-05 02:31:21.

Code Smells

A few things that make me wrinkle my nose.

A more authoritative list: https://blog.codinghorror.com/code-smells/

Not Invented Here (NIH) Syndrome / Uncited Sources

Please do not reinvent the wheel or a natural language date parser: https://en.wikipedia.org/wiki/Not_invented_here#In_computing

String Concatenation

Interpolation not concatenation: https://github.com/rubocop-hq/ruby-style-guide#strings

Nested Conditionals

Use a guard clause: https://refactoring.com/catalog/replaceNestedConditionalWithGuardClauses.html

Magic Numbers

[https://en.wikipedia.org/wiki/Magic_number_(programming)#Unnamed_numerical_constants https://en.wikipedia.org/wiki/Magic_number_(programming)]

Use a constant or config setting.

Naming Tics

# bad

# good

# bad
public function handle_archiving_of_courses( ) {}

# good
public function archive_courses( ) {}