Stop Obsessing About Primitives
How do you make your code more testable? One way is to make your classes smaller, so that they're more directly testable. An easy way to do this is to look for the Primitive Obsession code smell and create new classes that better represent your domain than plain old integers and Strings. Then the magic happens: you'll see behavior that's spread throughout your codebase is Feature Envy, another code smell, and the new class will pull in that behavior, providing a better abstraction and an easier way to test it.
Ted M. Young PRO
November 17, 2020
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.