The third of our series of discussion episodes with Trevor Ewen touches on a functional core and imperative shell. This is an approach to building software that uses a strong core to extend to custom solutions. We provide some options for building on your previous solutions in the modern world of software frameworks, libraries, and open-source.
Functional CoreThe underlying theme in this approach is a functional core. You want to craft a foundation that is solid and extensible to speed future development. That does not mean maximizing code reuse as much as it does solution reuse. Instead, we focus on delivering a solution quickly and reliably with less worry about maintenance. Thus, we can build quickly and worry about refining our solution for reuse after it has been delivered. As a result, we get speedy delivery, and eventually, we will see reuse where needed. This process allows us to avoid designing code for reuse that is never used again.
When To ShareWe wrap up this episode with a discussion about timing. There is a level of "baking in" that is useful before converting code to a library or sharing it with diverse projects. Yes, we can always design all code to be shared. However, some solutions are too niche or customized to be useful outside of the original solution. We want to find a reason to share code other than "because we can." That means we need to keep an eye out for how often we see similar problems or use existing code snippets to jumpstart a solution.
Great Links for more From Trevor