TL;DR: A Compilation of bad smells in code.
The code smells bad.
Let's see how to change the aromas.
In this series, we will see several symptoms and situations that make us doubt the quality of our developments. We will present possible solutions.
Most of these smells are just hints of something that might be wrong. They are not rigid rules.
Code Smells

Code Smell 01 - Anemic Models
Maxi Contieri ・ Oct 20 '20 ・ 2 min read

Code Smell 02 - Constants and Magic Numbers
Maxi Contieri ・ Oct 21 '20 ・ 1 min read

Code Smell 03 - Functions Are Too Long
Maxi Contieri ・ Oct 22 '20 ・ 1 min read

Code Smell 04 - String Abusers
Maxi Contieri ・ Oct 23 '20 ・ 1 min read

Code Smell 05 - Comment Abusers
Maxi Contieri ・ Oct 24 '20 ・ 2 min read

Code Smell 06 - Too Clever Programmer
Maxi Contieri ・ Oct 25 '20 ・ 2 min read

Code Smell 07 - Boolean Variables
Maxi Contieri ・ Oct 26 '20 ・ 2 min read

Code Smell 08 - Long Chains Of Collaborations
Maxi Contieri ・ Oct 27 '20 ・ 1 min read

Code Smell 10 - Too Many Arguments
Maxi Contieri ・ Oct 29 '20 ・ 2 min read

Code Smell 11 - Subclassification for Code Reuse
Maxi Contieri ・ Oct 30 '20 ・ 2 min read

Code Smell 13 - Empty Constructors
Maxi Contieri ・ Nov 1 '20 ・ 2 min read

Code Smell 14 - God Objects
Maxi Contieri ・ Nov 2 '20 ・ 1 min read

Code Smell 15 - Missed Preconditions
Maxi Contieri ・ Nov 3 '20 ・ 2 min read

Code Smell 16 - Ripple Effect
Maxi Contieri ・ Nov 4 '20 ・ 2 min read

Code Smell 17 - Global Functions
Maxi Contieri ・ Nov 5 '20 ・ 1 min read

Code Smell 18 — Static Functions
Maxi Contieri ・ Nov 6 '20 ・ 2 min read

Code Smell 19 — Optional Arguments
Maxi Contieri ・ Nov 7 '20 ・ 2 min read

Code Smell 20 - Premature Optimization
Maxi Contieri ・ Nov 8 '20 ・ 2 min read

Code Smell 21 - Anonymous Functions Abusers
Maxi Contieri ・ Nov 10 '20 ・ 2 min read

Code Smell 22 - Helpers
Maxi Contieri ・ Nov 12 '20 ・ 2 min read

Code Smell 23 - Instance Type Checking
Maxi Contieri ・ Nov 13 '20 ・ 2 min read

Code Smell 24 - Boolean Coercions
Maxi Contieri ・ Nov 14 '20 ・ 2 min read

Code Smell 25 - Pattern Abusers
Maxi Contieri ・ Nov 15 '20 ・ 2 min read

Code Smell 26 - Exceptions Polluting
Maxi Contieri ・ Nov 16 '20 ・ 2 min read

Code Smell 27 - Associative Arrays
Maxi Contieri ・ Nov 18 '20 ・ 2 min read

Code Smell 28 - Setters
Maxi Contieri ・ Nov 19 '20 ・ 2 min read

Code Smell 29 - Settings/Configs
Maxi Contieri ・ Nov 20 '20 ・ 2 min read

Code Smell 30 - Mocking Business
Maxi Contieri ・ Nov 21 '20 ・ 1 min read

Code Smell 31 - Accidental Methods on Business Objects
Maxi Contieri ・ Nov 22 '20 ・ 1 min read

Code Smell 32 - Singletons
Maxi Contieri ・ Nov 23 '20 ・ 2 min read

Code Smell 33 - Abbreviations
Maxi Contieri ・ Nov 24 '20 ・ 2 min read

Code Smell 34 - Too Many Attributes
Maxi Contieri ・ Nov 25 '20 ・ 1 min read

Code Smell 35 - State as Properties
Maxi Contieri ・ Nov 27 '20 ・ 1 min read

Code Smell 36 - Switch/case/elseif/else/if statements
Maxi Contieri ・ Nov 28 '20 ・ 1 min read

Code Smell 37 - Protected Attributes
Maxi Contieri ・ Nov 29 '20 ・ 2 min read

Code Smell 38 - Abstract Names
Maxi Contieri ・ Nov 30 '20 ・ 1 min read

Code Smell 39 - new Date()
Maxi Contieri ・ Dec 1 '20 ・ 1 min read

Code Smell 41 - Regular Expression Abusers
Maxi Contieri ・ Dec 3 '20 ・ 1 min read

Code Smell 42 - Warnings/Strict Mode Off
Maxi Contieri ・ Dec 4 '20 ・ 2 min read

Code Smell 43 - Concrete Classes Subclassified
Maxi Contieri ・ Dec 5 '20 ・ 1 min read

Code Smell 44 - Magic Corrections
Maxi Contieri ・ Dec 7 '20 ・ 1 min read

Code Smell 45 - Not Polymorphic
Maxi Contieri ・ Dec 7 '20 ・ 1 min read

Code Smell 46 - Repeated Code
Maxi Contieri ・ Dec 8 '20 ・ 1 min read

Code Smell 48 - Code Without Standards
Maxi Contieri ・ Dec 10 '20 ・ 1 min read

Code Smell 50 - Object Keys
Maxi Contieri ・ Dec 12 '20 ・ 2 min read

Code Smell 51 - Double Negatives
Maxi Contieri ・ Dec 24 '20 ・ 1 min read

Code Smell 52 - Fragile Tests
Maxi Contieri ・ Jan 4 '21 ・ 2 min read

Code Smell 53 - Explicit Iteration
Maxi Contieri ・ Jan 5 '21 ・ 2 min read

Code Smell 54 - Anchor Boats
Maxi Contieri ・ Jan 6 '21 ・ 2 min read

Code Smell 55 - Object Orgy
Maxi Contieri ・ Jan 17 '21 ・ 2 min read

Code Smell 56 - Preprocessors
Maxi Contieri ・ Jan 18 '21 ・ 2 min read

Code Smell 57 - Versioned Functions
Maxi Contieri ・ Jan 20 '21 ・ 1 min read

Code Smell 58 - Yo-yo Problem
Maxi Contieri ・ Jan 24 '21 ・ 2 min read

Code Smell 59 - Basic / Do Functions
Maxi Contieri ・ Jan 27 '21 ・ 2 min read

Code Smell 60 - Global Classes
Maxi Contieri ・ Jan 31 '21 ・ 2 min read

Code Smell 61 - Coupling to Classes
Maxi Contieri ・ Feb 4 '21 ・ 2 min read

Code Smell 62 - Flag Variables
Maxi Contieri ・ Feb 8 '21 ・ 1 min read

Code Smell 63 - Feature Envy
Maxi Contieri ・ Mar 23 '21 ・ 2 min read

Code Smell 64 - Inappropriate Intimacy
Maxi Contieri ・ Mar 27 '21 ・ 1 min read

Code Smell 65 - Variables Named After Types
Maxi Contieri ・ Apr 2 '21 ・ 1 min read

Code Smell 66 - Shotgun Surgery
Maxi Contieri ・ Apr 5 '21 ・ 2 min read

Code Smell 67 - Middle Man
Maxi Contieri ・ Apr 12 '21 ・ 1 min read

Code Smell 68 - Getters
Maxi Contieri ・ Apr 29 '21 ・ 2 min read
... and many more to come.
Photo by Richárd Ecsedi on Unsplash
Smells are certain structures in the code that suggest (sometimes they scream for) the possibility of refactoring
Martin Fowler

Software Engineering Great Quotes
Maxi Contieri ・ Dec 28 '20 ・ 13 min read
Original Thread on Twitter
Discussion (0)