A lot of thought leaders in the software space attempt to convince developers to favor certain practices. They often detail the benefits of their practices, because 95% of the time following that advice is the right thing to do. They eliminate the gray area, making things black and white and easier to follow along (see Attentional Bias). It’s not uncommon to see many software professionals who have strong opinions about how things should be done without much thought to the nuance that their unique situation calls for (see Mere-Exposure Effect).
When I first learned about Test Driven Development, I was very excited about all of the benefits it afforded me. The incremental changes and fast feedback cycles it created ensured I was always headed down a path that resulted in simple code that was proven to work. One day, I was pairing with a colleague and we spent 4 hours TDD’ing out a Getter/Setter Object that had a lot of boilerplate. This felt like a waste of time because it was. Without using TDD, we could’ve been done in 10-15 minutes. I instinctively followed TDD because that’s what I was taught to do.
The same pattern of behavior plays out when teams make architectural decisions. There are many ways to architect a system. There is no single pattern that is free of trade-offs. Having discussions that scrutinize the trade-offs of an architectural design is an important activity, even when talking about the approach that makes sense to follow.
Sometimes the nuance required is a result of constraints that only temporarily exist. In those situations, it’s good to create short-term solutions to fit the constraints, while creating long-term goals for when those constraints change. Deadlines are a good example of constraints that change over time. It may not always be in the best interest of the business we’re working for to do things in a particular fashion. However, if we create short-term solutions while building alignment on the long-term vision for that solution, we can revisit the decision when the constraints have evolved.
By pushing ourselves to frame the decisions we make as having trade-offs, we’ll make higher-quality decisions.