5 minute read

What a few individuals worked on for decades are now amazing millions. Suddenly everyone wants to participate in it. Everyone plays with it and looks for potential usage of it. Everyone wants artificial intelligence in their products, services, or applications, and that’s all right. It is the time to be amazed and also to overreact it.

When the blockchain in the 2010s was hyped, as an example, many opinions forecasted the end of traditional retail banking and the centralised interbank clearing systems. This time has also yet to arrive. While AI has a much broader potential usage than blockchain, it will take time until AI will assist our daily life. Our society needs to manage moral, legal, intellectual property and security concerns, among other challenges. Still, AI is here and slowly and steadily will occupy more territories in our lives.

We, software professionals, can also be amazed by the capabilities of AI. It generates working code in a few seconds based on some statements. A good business analyst can put together some well-specified requirements in a user story, and voila, in seconds, we have the working code for it. Now we can look for a new profession. Well, not quite right.

If we compare the usage of AI in software engineering and other areas, such as content creation, there is a fundamental difference. The AI-generated code is for machines, while the AI-generated document, essay, article, picture, or whatsoever is for humans. But why this makes a difference?

Humans are context-sensitive. We put the AI-generated artefact in a context like any other non-AI-generated artefact. For example, assuming a business proposal document is either generated by AI or not, the consumer of this document is a human who can understand the exact meaning independently of the used vocabulary, grammatical, semantical, or formatting variations. It is because we know and understand the context of that document. We know our business partners, the companies they work for, their cultural backgrounds, habits and personalities, business standards, previous experience, and everything. Without realising it, we associate all our knowledge with a particular artefact, creating a comprehensive and interconnected information set.

On the contrary, the source code does not have such a context. Refrain from getting confused by code execution context, like what variables are visible at any moment of the execution. I mean a similar context that humans can work with. For the machine, every possible code variation has a distinct meaning. These code variations shift the code up and down on spectrums, such as functionality, performance, fault tolerance, security, maintainability, testability, usability and so forth, always resulting in a different application and meaning. Even though this spectrum approach is overly simplified compared to the true complexity of the software products, it might help to get my point.

All software products have their unique functional and non-functional requirements. Let’s take an example. We have a batch application that reads up some data from somewhere. Then it processes the data that might mean some transformation, enrichment, etc. Finally, it writes it out somewhere else. So far, it is a straightforward task. Today’s AI can generate such an application in seconds. But is this a production-ready application?

Here are only a few aspects to worry about. How much data should we be concerned about? Do we need to perform the processing in chunks instead of in one go? Do the input or output systems support transactions? Where are the transaction boundaries? How to deal with failures? What to do after a restart? How to handle overlapping executions of the same batch? What future features do we need to accommodate? Any data to be cached? How to test the application? On what infrastructure it needs to run? What enterprise standards and tech stack do we need to comply with? Again, those were only a few example aspects.

When an enterprise-level software product is production ready, the development team has made tens of thousands of decisions. Some were major, and many were minor. But nearly every second, they made macro decisions during coding. Those decisions ended up in a hopefully perfectly balanced behaviour for the requirements. On the other hand, expecting the same perfect balance from AI is unrealistic because of the vast number of code variations that can occur, especially from some high-level, often incomplete and foggy requirements provided by human language. You will win the jackpot on the lottery sooner than having luck with your AI-generated software.

There is more than this problem. Today’s popular AI solutions use deep learning to generate responses, meaning that the response quality is massively dependent on the learning input. It is not only limited to previously seen information and hence lacks true creativity, but in the case of software engineering, it is solely limited to tutorials and “hello world” like solutions. The reason is that we can barely find any complex, commercial, in-production software solutions source code available on the Internet that we could use for deep learning. Consequently, we cannot expect such solutions from AI either.

If you are not a software engineer, think of a new car. You can quickly generate good-looking cars with AI, which is quite different from manufacturing your vehicle. Imagine how many decisions the manufacturer needed to make to provide your dream car. Just like previously, here are only a few aspects to consider: aerodynamics, good looking, drivetrain options, efficiency, safety, maintainability, reliability, interior design, practicality, costs, used materials and their availability, logistics, etc. An enormous work for hundreds of people and many years.

In conclusion, I’m not questioning how much help AI can provide for designing a new car. How great is it to render some abstract shapes for our new vehicles that the design team can refine further? Similarly, we should grab the opportunity and increase our software engineering capabilities by AI assisting options. But it’s doubtful that you’ll be driving a car designed entirely by AI within a few decades, and similarly, it will be quite some time before we see completely AI-written programs in production, if this time will come at all.

Comments