Toward configurable dependencies
There are two fundamental factors that determine the agility of the business operations/growth:
Dependencies
Options
A business cannot operate independently. Let me explain with an example:
I like to bake pastries. Over the years I’ve managed to improve my baking skills and gotten to the point where my friends think that I should offer my pastries for sale.
Suppose I decide to do that. I concoct a plan to make fresh batches of pastry every morning and offer them for sale. Towards that goal I produce a pile of flyers with nice attractive layout and photos, praising my pastries and enticing people to buy them. I then distribute those flyers throughout the town, sit back and wait for the orders to start pouring in.
I wait, and I wait, and I wait. Nothing happens. I start wondering what’s going on? I consult with some friends and they point out to me that my flyer doesn’t mention any details on how would one go about ordering my pastries.
Duh! Mystery solved! OK, I now have to modify my flyers to instruct potential customers how would they go about ordering my pastries. But now I’m stumped — how do I enable people to order my pastries?
I could simply put my phone number on the flyer, but I don’t want to share my private phone number with general public. Maybe buy a new phone? Or, maybe put my address on the flyer? But again, I don’t want strangers coming into my house.
Or, maybe offer an online storefront? Hmm, how do I do that?
I am now starting to feel the burn caused by dependencies. My nascent little business operation cannot be launched without it relying on some dependencies. Even buying a new phone is a dependency. Let alone launching an online storefront.
Plus, order taking is just the left side of the equation. For the business to survive, it must also provide the right side of the equation — orders must be fulfilled.
What do I mean by fulfilled? Well, besides me having to bake the pastry that customers could order, I also need to somehow deliver that pastry (since I don’t want people coming to my house to pick up their orders). How do I fulfill the orders? Deliver them myself? No way! Hire a service to do it for me?
Also, advertising and marketing. Plus accounting and legal processing. How am I gonna do all that?
So many dependencies!
What about options?
Suppose now I settle on one way I will take and fulfill orders. I may, for example, decide to quickly open an online storefront by subscribing to Shopify. I may also decide to hire an accountant and a legal advisor. Plus, hire a marketing firm to advertise my business.
For deliveries I may hire some freelance workers.
Now I’m in business! Things are starting to slowly pick up. Pretty soon I may realize that the Shopify deal is not working out for me. Their service fees are killing my profit margins, plus their reliability has been spotty. I keep getting customer complaints.
That’s when I desperately need options! If Shopify was the only game in town, I’d be stuck with them and become their hostage. Luckily, when it comes to setting up an online storefront, options abound.
Same consideration applies to all other aspect of my business operations. I may find that the accountant’s fees are steep, so I need options. Maybe shop around for a second opinion, or decide to go the self-service route? I may also decide to ditch the marketing agency and switch to the AI mode of advertising (perhaps using ChatGPT for writing nice juicy copy).
As for delivery, if I find that people who are delivering orders are charging me too much, I may decide to pivot and change the delivery model by bringing pastry batches to the local bakeries and cutting a deal with them.
Luckily, we live in a diversified world where options are manifold. All I have to do is pick my battles wisely and be prepared to cut my losses if things don’t work optimally, and I’ll be thriving.
In conclusion, being able to manage my dependencies by examining the options is the prudent way to run a successful business. By carefully handling the dependencies through examining the options, and by setting up my business in such a way that swapping options is seamless, I achieve business agility.
What about agility in software development?
Unlike the low tech business operation that I’ve described here, software is a different kettle of fish. In software, we often see a situation where unavoidable dependencies get hardened and cemented into a tightly coupled, brittle system.
Such an arrangement is unfortunate, since it paints the business operation, that relies on automation, into a very unpleasant corner. A business may wish to change the course and better manage the process of automation, but the hardened Big Ball of Mud prevents it from doing so.
That situation illustrates the alarming issue of relying on hard-wired dependencies while not having any available options.
Once that happens, the organization becomes anti-agile. It stalls, it cannot progress. Next thing, it gets outpaced by the competition. It is therefore of paramount importance for businesses to be able to manage their high tech dependencies.
How to manage high tech dependencies?
Software development is tough, and the tendency is to alleviate that hardship by leveraging the code other teams have accomplished. That tendency also leads to the hardening of the dependencies. That hardening happens surprisingly quickly; before we know it, we have cemented our dependencies. Once that happens, our system becomes brittle, meaning it discourages change. Once we find ourselves in a situation where change is discouraged, we cease to be agile.
Any time we find ourselves in the predicament where we are apprehensive of making changes to the system, what we find missing is the ability to have configurable dependencies. Having dependencies in our system is pretty much unavoidable, but being in a situation where those dependencies are not configurable is completely avoidable.
What will configurable dependencies buy us? Simply put, having configurable dependencies will buy us the ability to exercise options. Being in the position to exercise options means our automation processes are flexible.
Configurable dependencies mean that our dependencies are swappable. We should be able to swap any dependencies. Why? Because we are opportunistic, and are always on the lookout for improving our system. What used to be a very useful dependency may suddenly become a burden, or we may discover equally useful dependency that is much easier/cheaper to utilize. At that point, we should be able to simply swap the old dependency for the new one.
Alas, that is easier said than done. Many organizations get elated upon discovering a better, more reliable, less expensive dependency, but when they try to ditch the old one and plug in the new one, the system breaks. And that causes a lot of trepidation.
So, how do we enable our system to provide the much desired plug-and-play dependencies? At this point we don’t know any better model than Alistair Cockburn’s Hexagonal Architecture. Following Alistair’s model, we can easily enable our system to allow for plugging/unplugging various dependencies (i.e., we are free to entertain various options). We can achieve that without disrupting the processing logic that is governed by the business policy rules.
Technologies are volatile
Various technologies come and go. Only 20 years ago no one could’ve predicted smartphones, let alone the plethora of IoT devices. No one has the crystal ball, and not being able to see into the future, we cannot tell what surprisingly novel and unanticipated technical devices may arrive in our midst.
But our systems must be ready to turn on a dime and embrace these new technologies. We need to be able to leverage the improvements. Instead of being stuck as a hostage of some anachronistic tech and depending on the whims of third party vendors, we should design our systems to be flexible, resilient, easy to improve, easy to manage.
Hexagonal Architecture enables us to grow our system in any direction we find suitable while remaining open for swift and low-risk improvements.