| Practice 29 | Keep It Local |
Back in college, I was taught that modularity and encapsulation were the keys to writing maintainable software—it’s easier to change things if the impact of that change is bounded by the perimeter of a module. That’s hard to argue with; software (or just about anything for that matter) would be impossible to work with if every change we made had a potentially global impact.
But, as with all things, breaking code into modules isn’t always the right thing to do, at least from the start. Sometimes the simplest way to create something new is to break the rules.
Let’s look at a Rails application as an example. Now, before I get started, I need to say that I’m not picking on Rails here: what I’m about to describe is pretty ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access