Ravi Rajan is a program director working in India. He writes articles on technology trends and their impact on the basic needs of humankind
Can AI Write Code?
In 2015, Slovenian computer scientist Andrej Karpathy ran a project that used AI to generate code. Here is what it produced.
Will AI Replace Programmers?
As you can see, the auto-generated code has everything: functions and function declarations, parameters, variables, loops, and even correct indents. It even has comments. However, the AI-produced code had some syntactic errors. Nevertheless, it almost matched a human programmer's code.
So that brings us to the next question: Will AI replace programmers?
Before we talk about replacement, let us try to understand the real value of a good programmer. A good programmer’s value is not merely knowing "how to code." Programmers bring value by understanding "what to code."
Simply put, they need to understand the business value of each requirement to be built and decide and prioritize their development based on the criticality. In a nutshell, they have fully functional "thinking" human brains.
And the AI we see today is data-based. Yes, it can do things like categorizing images on Google, reading license plates, powering the routines of Alexa and Siri, and even using highly sophisticated methods of classifying data and recognizing patterns.
But it cannot think like a human brain. For AI systems to be capable of 'thinking,' they need to be continually trained and fed with giant data banks covering every possible human scenario. This is not 100% possible.
That is why AI can write code but can't ensure that it has written the correct code. It cannot understand the business value of features. It cannot refactor an old, buggy code and cannot decide whether to remove a piece of code or not.
5 Benefits of Using AI in Software Development
So, the future of software development and AI is collaboration and integration. AI will help programmers redefine programming by taking over tedious, repetitive tasks so that programmers can focus on building something great.
Programmers can also pair with AI to write better software and reduce development lifecycle times. And far from replacing programmers, AI is becoming ready to reimagine a programmer’s workload through integration and enhanced efficiency.
Here are five benefits of using AI in software development:
- AI can validate project requirements
- Automatic debugging
- Automatic testing
- AI can make programmers more efficient
- AI will change software development
1. AI Can Validate Project Requirements
Requirement gathering is the process of gathering, validating, and tracking the requirements of any software development project. And projects fail primarily due to inadequately or improperly validated requirements.
AI assistants can now analyze requirements documents, find ambiguities and inconsistencies, and offer improvements. These tools can detect such issues as incomplete requirements, immeasurable quantification (missing units or tolerances), conflicting requirements, and unclear entry and exit criteria. Companies using such tools have reportedly been able to reduce their requirements review time by more than 50%, according to research done by Deloitte.
And once requirements are frozen, AI can also help programmers to prioritize the requirements based on business needs. AI can validate these decisions by running simulations and modeling user behavior from existing software or past historical trends.
It can then generate a hierarchy of the essential features for the business based on market trends. Tools like the AI Canvas can help identify any project's key questions and feasibility challenges and help developers make informed decisions.
Thus, AI assistants help programmers deliver the product in less time by speeding up the development lifecycle process, ensuring increased revenue for the organization within a short span.
2. Automatic Debugging
Tasks like testing, bug detection, and fixes take up most of the developer’s time.
AI and ML help programmers identify bugs to keep the software free from errors. Deep learning algorithms can flag known errors and speed up the debugging process. It can shadow a programmer and learn how to fix each of them. And after sufficient training, AI systems will be able to suggest and correct a wide range of bugs, similar to how the autocorrect spellcheck functionalities work in smartphones.
Some AI tools can now also finish lines of code as programmers start typing. They display a list of usable code snippets based on relevance. AI-powered code-review tools can understand the intent of the code and look for common mistakes, thereby detecting bugs and suggesting code changes. For example, video game company Ubisoft says machine learning is helping it catch 70% of bugs before testing.
Thus, programmers who AI aids are now delivering high-quality software even under strict deadlines where the product has to reach the market before the competition does.
3. Automatic Testing
Imagine you are writing test cases, and AI is iterating these tests millions of times until it finds or creates the piece of code that clears the tests. And with this extra time available now from having freed up of the activity of executing tests numerous times, you as a programmer can focus on understanding and solving business problems. Later, AI may even be able to learn how to suggest which tests need to be done. The possibilities are exciting.
Take, for example, the Functionize tool. It enables users to test fast and release faster with AI-enabled cloud testing. The users just have to type a test plan in English, automatically converting it into a functional test case. The tool also includes self-healing tests that update autonomously in real-time.
SapFix is another AI hybrid tool deployed by Facebook which can automatically generate fixes for specific bugs identified by the tool. It then proposes these fixes to engineers for approval and deployment to production.
Thus, with AI automated testing, programmers can increase the coverage of the testing cycle's overall scope, leading to enhanced application quality and fewer vulnerabilities.
4. AI Can Make Programmers More Efficient
Researchers at Microsoft and Cambridge University have developed AI that can write code, known as DeepCoder, and learns by searching through a massive database of code. It is believed that this will be a game-changer for people who are not techies or developers who want to learn a new language.
William Falk, web developer and independent content creator, said,
“The idea is that all you will need to do is describe your program idea and it will do the writing for you. However, at this moment in time DeepCoder is limited to programs consisting of just five lines of code."
Similarly, a French engineer known as BenjaminTD taught an AI how to write Python code back in 2016. The code wasn't perfect, but it is a good start.
The idea is that AI can soon make learning easy for programmers. A machine learning algorithm can use the archives of old projects, knowledge of programmers, and past defect history and more efficient ways for programmers to write code, identify patterns and give real-time feedback.
This does not mean that programmers will be extinct. Instead, it allows them to be more efficient and creative in their approach.
5. AI Will Change Software Development
Yes, for now, AI isn’t as reliable as a human programmer. Mistakes are still made, and it has its limitations. While the development of AI advancements continues, it will still take some time before AI can develop more than just a few lines of code, and it will take even longer to understand the business uses and value of that code.
But programmers must realize that their skill sets will have to change.
Andrej Karpathy, a former research scientist at OpenAI who now serves as Director of AI at Tesla, has proposed a new software development process for the age of AI, called Software 2.0, and its key components include problem and goal definition, data collection, data preparation, model learning, model deployment and integration, and model management. Programmers of the future will source and compose large data sets to train applications to be innovative and fulfill the desired capabilities.
And programmers who want to stay relevant in the age of AI should see themselves as expert generalists and treat learning new skills as a continuous process. Yes, they cannot know every AI skill, but they still need the foresight and the tenacity to navigate the AI landscape and learn new skills as required by the rapidly changing business needs. Learning is no more optional; it is mandatory to survive.
As Dr. Seuss has rightly said,
“The more that you read, the more things you will know. The more that you learn, the more places you'll go.”
- A Human's Guide to Machine Intelligence: How Algorithms Are Shaping Our Lives and How We Can Stay in Control-Kartik Hosanagar
- Accelerating Software Quality: Machine Learning and Artificial Intelligence in the Age of DevOps- Eran Kinsbruner
- Deploying AI in the Enterprise: IT Approaches for Design, DevOps, Governance, Change Management, Blockchain, and Quantum Computing- Eberhard Hechler (Author), Martin Oberhofer
- Design Thinking in Software and AI Projects: Proving Ideas Through Rapid Prototyping-Robert Stackowiak (Author), Tracey Kelly
- ROBOTIC PROGRAMMING AUTOMATION HANDBOOK-Donald Eric (Author)
- Algorithms: The Humans in the age of AI. Programming, Security, Python, Hacking, Cyberwar, and Machine Learning-Jeff Mc Frockman
- Hello World: Being Human in the Age of Algorithms-Hannah Fry
This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.
© 2022 Ravi Rajan