Summary
Recipes are pieces of code that clearly specify, in a linear manner, what they do, are a great tool for new developers. The developer can really see what’s going on, reason about the code, and find errors. As the developer, team, and project mature, the recipes start to feel like unnecessary chores or at least become very repetitive. Not only is this something that potentially affects productivity, but these kinds of repetitive tasks are easy to get wrong. Getting it wrong could pose multiple risks to the system:
- Security risks
- The risk of persisting invalid data
- The risk of allowing operations that are not allowed
- The risk of losing operational insight due to a lack of logging
The tradeoff between imperative procedural code that a developer can quickly reason about and the need for a consistent system is one you should consider. In smaller projects, it might not be worth the cognitive load of being “different” in applying things...