Fast MVP development powered by AI. Myth or reality in 2024?
In 20th century science fiction, the theme of artificial intelligence was one of the main ones. HAL 9000 in Arthur C. Clarke's "2001: A Space Odyssey," the Great Thinker in Douglas Adams' series of novels, the androids in Philip K. Dick's "Do Androids Dream of Electric Sheep?" and many others were described more as dreams of the unattainable, an attempt to look beyond the edge of technological singularity, than a realistic forecast of the future. The recent revolution in artificial intelligence has been a surprise, making us feel like we are in the same future as in those fantastic novels.
Any field of human activity undergoes evolution. As the product becomes more complex, so do the tools of labor improve. Over the past thirty years, applied programming has come a long way from low-level assembly work to smart IDEs with intelligent input complements and automatic generation of template code. Modern development systems have relieved developers of the burden of thorough knowledge of syntax, memory management, and writing trivial code. Each such innovation was perceived by the conservative part of the community as a step away from "real programming" and was perceived as a threat. However, it cannot be denied that software products are becoming more and more complex and sophisticated, and the tasks they are designed to solve are becoming more ambitious.
An interesting effect of ChatGPT is its ability to write working code. We tried to figure out whether AI would become the philosopher's stone that replaces the work of a programmer or whether it would take its place among developer tools, becoming a more advanced version of StackOverflow.
We identified three scenarios for using AI:
Creating a project from a description
Replacing a programmer
AI as a programmer assistant
Creating a project from a description
Of course, at first, we wanted everything at once, and we tried to get a ready-made iOS application according to the specification. This post inspired us to give it a try: https://twitter.com/mortenjust/status/1636001311417319426
The author managed to get ChatGPT to generate a working iOS application. Impressive! So we decided to accept the challenge and try to put ChatGPT in the service of our clients.
Our technical task was as follows:
“Develop an application in Swift using the SwiftUI framework. The application should display a list of books available at the specified link and provide a form for online ordering.” We also described it the structure of the Book model.
As a result, the neural network generated code for the main application classes, including the data model. We only had to fix a few minor bugs.
It is worth approaching the results with cautious optimism for several reasons. Firstly, the complexity of projects from examples cannot be compared with the complexity of real "production code" with non-linear logic. The example projects are simple "master-detail" applications. For an experienced programmer it will not take much longer to create a similar application.
Secondly, ChatGPT sometimes makes silly mistakes, and code review is mandatory. Any programmer will confirm that reading someone else's code is a tedious and time-consuming task.
However, ChatGPT can be useful if the application is used for initial testing of a business idea, and the code it produced is not intended for future support.
Replacing a programmer
Requirements for production code are not limited to its functionality and absence of errors. The development team adopts standards of naming and formatting, typical structural and architectural approaches.
Integrating a new programmer into the culture and standards of a particular company takes time, but in the end, it pays off: projects are written according to the same rules, parts of the logic are easily readable and interchangeable, which reduces development costs and avoids accidental errors.
To our disappointment, we were unable to train the artificial intelligence to write code in the style we adopted: the context is simply too extensive, and complex structural approaches such as module separation and dependency injection are just beyond its comprehension.
Programmer Assistant
However, as a second pilot in the hands of an experienced developer, AI can be very useful. We tested a tool with the same name from GitHub: Copilot (link). It integrates into the development environment and can suggest solutions to algorithmic problems during work, write trivial functions, construct templates for interfaces and logical modules, which significantly saves time and allows to focus on higher-level, "domain-specific" tasks.
"We cannot solve our problems with the same thinking we used when we created them," Albert Einstein once said. The second pilot in the form of AI can become exactly the tool that allows human qualities that are inaccessible to machines - the ability to create - to fully manifest.
Looking Back at the 5 Best AI-Generated Ads of 2023
Conclusion
AI should not be perceived as a threat to the industry, nor as a replacement for a living person. However, in tandem with a specialist, it can be an excellent tool. Our research has led to important results:
AI is suitable for quick construction of simple projects. With minimal refactoring, a working mobile application can be obtained by providing only a textual description of the desired functionality, which will complement the range of services provided by our company.
The second pilot has been accepted into our development team's arsenal and is currently undergoing intensive training on various routine tasks.