Tagoop

5 rules for picking long-lasting method names in OOP

When you write a piece of code for the first time, names don’t matter that much. You obviously know what everything is and what it does. However, while it’s cheap and easy to understand now, code written using poor names will grow to be incomprehensible as time passes and your application gets bigger. The price […]

4 ways to deal with complexity in your eloquent models

I think everyone loves to work on completely greenfield applications. You get to plan your own course, chose your current favourite technologies, structures, and patterns to follow. There is no legacy code, no technical debt, nothing that stands in your way. You can do whatever you want and building features is a breeze. But you […]

Tell, Don’t Ask

Tell, Don’t Ask is an object oriented programming principle saying we should just tell objects what to do, without asking them unnecessary questions. Asking is when we’re writing conditionals solely based on one object’s internals. Either we’re checking a property or a method returning a result, if we’re doing it to tell the object to […]

The programmer’s gut feeling

Whenever you feel like an object isn’t really what the name says it is, or that it shouldn’t exist, or that it should exist but in a different shape, you are most likely right. Stop and reconsider. Maybe what you find is that you don’t need that object. Or maybe what you’re trying to accomplish […]

© 2020 cdruc

Theme by Anders NorénUp ↑