4. Economic smells
● Over 80% of time spent
reading code instead of
writing it.
● High maintenance cost.
● Unmotivated PEOPLE.
@JuanmaGomeR
5. Technical smells
● Classes with 2.000 lines of code
● Methods with over 200 lines of
code
● Lots of comments trying to
explain what the code is
supposed to do
● Duplicated lines of code (Copy &
Paste everywhere)
@JuanmaGomeR
6. Why do I have to take care of it?
Because you write it
Every time you write bad
code you are being part of
the problem
@JuanmaGomeR
9. Do what you are supposed to do
Each function, method or
class only has to contain the
business logic that they
declare
@JuanmaGomeR
10. Do what you are supposed to do
If you are writing an userand-password-checking
method, don’t start a new
session in the system, just
check if the user and
password are correct
@JuanmaGomeR
12. Don’t Repeat Yourself principle
Every time you copy & paste
code, you are exponentially
rising the probability of
having problems in your next
change
@JuanmaGomeR
13. Single responsibility principle
There should be only one
possible reason to modify a
class, method or whatever
artifact in your project
@JuanmaGomeR
20. Include comments in complex
algorithms only
This way we reduce the “I
have found comments that
say a different thing that
the code” risk
@JuanmaGomeR
21. Include comments in complex
algorithms only
Your code must be readable
and understandable by itself
@JuanmaGomeR