When to break the rules
We generally talk about following rules within coding and making sure that it all fits into the larger pattern, but…. what happens when we have to break the rules?
When we are coding apps, there can be times where it doesn’t feel right doing some thing by the architecture, or it just doesn’t fit any mold that has happened before. This could be down to the developer’s immaturity within the codebase, however it generally can come down to “We haven’t had the need to do this” comment.
This is when we need to remember that everything is a guideline, not a draconian rule. In most contexts, technical leads and senior developers have no desire to enforce guidelines if they’re not appropriate to the context of the work.
A relevant quotation:
“Break any of these rules sooner than code anything outright barbarous.”
— George Orwell, “Politics and the English Language” edited word from “Say” To “Code”
All documentation for codebases and rules in there are made to make sure that it captures the most cases that the developers were aware of during the inception of the project / or when it was updated. We need to make sure that we all bring these moments up with other developers. Then we may learn!