A more intelligent architectural approach for software development

Anderson Santos

Photo by sk on Unsplash

Is it possible to achieve a one-size-fits-all architecture for software development? And why should we even try?

There is a ton of recommendations of what should be your next language, probably most of them will recommend python. They are right, but not because it’s easy to learn, powerful, etc. because it is the best language for machine learning.

If you are a human, reading this article, I suggest you do not think about the longevity of the programming language, but the future of programming software. As a developer, we are constantly searching for increasing our productivity using higher levels of abstraction, that means less code and more work done.

In this scenario, software architecture plays a fundamental role. If you choose a tightly coupled architecture, you will develop the software fast, but it will not scale well and it will be hard to maintain while is growing. If you choose a modern architecture, organized in cohesive components, interacting with others in a decouple way (e.g. events), you will increase the solution’s complexity, but the scalability and maintainability will be very good.

Actually, if you give a deep thought about what a programming language is, you will end up with this statement:

“Computer language is for humans.”

Output from: GOSSAFUNC=main GOOS=linux GOARCH=amd64 go build -gcflags -S main.go

This is not the final version of machine code, it is Static Single Assignment (SSA) for amd64, but it’s very close.

It comes from this simple go program:

If I give to you the first block of code, could you tell me what it does?

For reference, if you like to try, the assembly code is something like that:

Following, what software architecture is for the machine’s perspective? The place where data will be computed? Software architecture has many design patterns, which is per definition a general reusable solution to a commonly occurring problem, in another way it’s a method for humans to communicate their best practices to other humans. For the machine, the only thing useful in architecture design is the process and where it will run.

Ok, maybe I oversimplified it, but it’s to emphasize that the confidence that we have in programming languages, compilers, interpreters, architectural designs are most related to their results, instead of our deep knowledge of every single piece. So is it possible to achieve a one-size-fits-all architecture for software development? This will imply a higher level of abstraction and a little dose of faith.

In his article Software 2.0, Andrej Karpathy suggests that there is a new way to develop software. he calls it Software 2.0, where Neural Networks are the ultimate building blocks for software.

He suggests “programming” in highly an abstract way, without touching the code that will be generated by the machine as a result of a learning process.

Traditional programming paradigm Machine learning paradigm

So, this is a different approach to instruct the machine to do what we want it to do. It’s not new, and it’s not applied for everything, at least for now [1].

The result rules are difficult for an average developer to understand, just as a machine code is and you trust it. But it’s OK, as long as we can run our unit, BDD or TDD tests and assure that the program is running well, everything will be fine.

But machine learning is not perfect, it needs training, and every training generates a different set of rules and it takes time. Nonetheless, this approach is growing fast, and a new proposal to cut time using pre-trained models or using a general model is in course.

Why is this architecture intelligent? Because it adds learnability to the software development game.

And we have gpu-accelerated hardware, well-trained models, transfer learning, lots of examples of how to use a distributed architecture for training, many serverless providers to deploy and run your model at any scale. So, there is a lot of pieces of architecture ready to be used. Sounds to be a smart move to use all those stuff.

Not convinced yet? Think about, will you ever try to solve any image classification from scratch? With just a programming language? Do you think your code will be better than one written by a machine? Or imagine writing a code that can play video-games?

Not convinced yet? Think about it, will you ever try to solve any image classification from scratch? Using just a programming language? Do you think your code will be better than one written by a machine? Or imagine writing a code that can play video-games?

So think again, for instance, the assignment of a priority to a help-desk ticket is a classic example of a business rule that is frequently developed as a traditional code, right? But not anymore, classification is a perfect use for machine learning and with the addition of retraining, even complex mutant rules can be applied directly from expert users.

I think this is a whole new approach to be explored at the architectural level, instead of adding some AI functionality later in your software, just for marketing purposes. And, for the next few years, it will be, more and more, the way we will deliver creative, high-quality, scalable, customizable software, so good that it will surprise us.

read original article at https://medium.com/@adsantos/a-more-intelligent-architectural-approach-for-software-development-d87de9a3f175?source=rss——artificial_intelligence-5

Share