We’ve all written if/else statements that we are not proud of lol. Sometimes we try to play god in our code and handle everything! This creates if statements that contain endless chains of nested logic. This is even compounded more by OOP where single if/else is used throughout the entire…
Primitive Obsession Code Smell: How To Spot and Fix
Primitive obsession is slang for “you use too many simple types like numbers and strings to store data”. With classes, it’s harder because you must think more intently about what you want. It’s very easy to just start adding primitives to our code and things can get out of control…