Most likely, you never heard of this pattern, unless we worked together on a project. Curious to know more…
Here we go. I see a lot of time complicated code that is written by very smart developers. But when it becomes too complex for the average developer. You should think of this farmers pattern and start reducing the complexity so the majority of the team can understand and maintain that piece of code as well.
It’s an art to write code that looks simple so the average coder can read and understand. That’s the main goal of this farmers pattern!
We should not start bragging about how smart we are by introducing for example generics in places where it does not belong or increase the complexity. Or use this new fancy feature just because it’s hot. I’m sure you know a lot of developers eager to add combine, property wrappers and other neat language features to the repository as soon as it’s released! Instead think of consistency in your code base.
The secondary goal of this farmers pattern is to have a mindset to deliver added value for the customer while guarding over the overall architecture and following best practices at the same time. It’s important to not loose yourself in details that do not matter. This is applicable for the majority of the apps, so remember the following expression:
Almost no one is waiting for a Rolls Royce, so better focus on making a nice BMW, Mercedes or VW instead.
Name origin of this architecture
In dutch, we have an expression: “Gebruik uw gezond boerenverstand” which would be translated in english to “Use your common sense”. In Dunglish however, it would become “Use your healthy farmers brain”. This gave the initial inspiration for the naming now already more than a decade ago.