In 2019, I posted a blog about the use of abstractions in IT within the financial services sector ("Abstraction in Financial IT - How far can and should we go?" - https://bankloch.blogspot.com/2020/02/abstraction-in-financial-it-how-far-can.html). This continues to be a topic that fascinates me.
In IT, we tend to build layer upon layer of abstraction, which allows us to become continuously more productive as complexity is hidden away for the user. This means users can focus more on the functionality they want to deliver. The evolution of Low-code and No-code platforms, alongside AI advancements, will likely push this to an extreme, where people with no IT skills could simply converse with a chatbot to describe the application they need, which is then automatically created under the hood.
However, as I mentioned in my previous article, this continuous abstraction also comes with issues, as software is rarely optimized for usage. While a simple tool programmed 20 years ago required a few kilobytes of storage and memory, the same tool today might take megabytes. This is because abstractions come with a lot of overhead. With energy consumption in IT growing exponentially year after year, especially due to the rise of AI, this might become problematic in the future. We could expect that optimization tools (also based on AI) might enormously optimize the actual run-time code, while maintaining the ease and flexibility of the abstractions at design time.
Joel Spolsky described this principle in 2002 with the "Law of Leaky Abstractions". The law states that all abstractions are leaky, meaning that every abstraction will eventually hit its limitations. When this happens, software engineers need to delve into the black box of the abstraction and optimize for the specific use case at hand.
As we hide more and more complexity, abstractions are becoming also more declarative. This means engineers describe the expected result (the WHAT), rather than the instructions to achieve that result (the HOW). Declarative abstractions are easier for engineers to interact with as they align more closely with human thought processes. On the other hand, they result in much less direct control, which can pose issues (e.g. "the right answer delivered too late can be the wrong answer.").
Although declarative languages offer many advantages (readability, separation of concerns, etc.), they only work well if the problem fits the abstraction. If not, declarative languages will likely break down. This is true for any abstraction. An abstraction is created with one or more use cases in mind. As soon as you deviate from these use cases, abstractions become uncertain, and you will likely face significant issues.
This is an important constraint to consider, as software resides in a complex, continuously changing environment. This means that the used abstraction might fit perfectly with the initial requirements but not future ones. Due to the cost associated with software engineering, extensive refactoring is usually avoided when new requirements arise. As a result, new requirements are often "forced" into the abstraction, which was not initially designed for them. This leads to unmaintainable and poor-quality software.
To manage abstractions effectively in a dynamic environment, it is important to:
Evaluate Abstractions Regularly: Upon every new requirement, check if the existing abstractions are still fit for purpose. If not, it might be necessary to open up the abstraction and adapt it to the new requirements.
Document Constraints and Assumptions: Clearly document the constraints and assumptions behind each abstraction. When new requirements are defined, they should be checked against these constraints. If they no longer fit, it’s probably time for a refactoring.
Focus on Architecture and Encapsulation: Ensure that your software architecture supports encapsulation, which can increase resilience. This allows to contain potential impacts of abstraction limitations and makes it easier to adapt to new requirements without significant overhauls.
By following these practices, you can balance the benefits of abstraction with the need for optimization and maintainability.
Comments
Post a Comment