Alan Zeichick | Senior Writer | October 8, 2024
Generative AI can help write sonnets in the style of Shakespeare, then switch gears and draft an actionable business plan based on raw data and analytics. Given the right inputs and training, GenAI can even help create a product concept, a catchy advertising jingle, a logo, and a marketing plan complete with pricing advice. So it’s not a stretch to have GenAI assist software development teams across the development lifecycle or even write code in Java, C++, JavaScript, SQL, or whatever language your organization prefers.
To the GenAI system, coding is no different from writing a poem with a specific rhyme scheme and meter in English, Spanish, or Latin. And using GenAI to assist with the software development process represents a tremendous opportunity: PwC analysts say that by working with GenAI code-generating tools, a development team can see performance benefits of 20% to 50% right now. Let’s see how it works.
Generative artificial intelligence, or GenAI, is a fast-evolving technology that can help create new content by extrapolating from training data. GenAI models work by creating and then using an artificial neural network encoded in software. Many neural networks comprise billions or even trillions of specific parameters, or values, which are “trained” through processing huge quantities of materials. Fortunately, more efficient models can turn out to be excellent programmers once they’re trained with a reasonably large and diverse set of examples of functional, safe, and efficient code.
When it’s learning to write code during the training process, which results in a large language model, or LLM, the GenAI system attempts to predict what the next command should be. It then tests that prediction; if it’s good, the neural parameters are adjusted one way. If the prediction is bad, the parameters are adjusted another way. With sufficient iterations, the GenAI system gets good at helping generating results based on its training data. Then, when the accuracy is sufficient for purpose, the GenAI system is tasked with generating new code based on input parameters, or prompts. If it does a good job, you’re ready to roll. If not, well, it’s time for AI scientists to figure out what went wrong.
The good news: You don’t need to create your own code-focused LLM. It’s already been done for you by leading tools providers.
Key Takeaways
At this writing, don’t expect to describe a complex program and have a GenAI system output a complete, ready-to-use application based on the prompt. We’re not there yet. However, GenAI tools are being used to augment the work of enterprise development teams, helping them improve code quality as well as individual productivity. You might think of GenAI as a member of the team serving one or more roles.
Generative AI is important for software development because it can help make dev teams more productive at every stage of the software development lifecycle. That’s critical because modern companies run on software—there’s no doubt about that. Lots of that software, including word processors, spreadsheets, and accounting and HR systems, is off the shelf. But a competitive edge comes from writing custom software for back-end operations, websites, databases, mobile apps, and more.
The challenge there: High-quality code takes time and expertise to create, either with development staff or contractors. When new applications are needed to seize an opportunity or address a challenge, there’s often a backlog of projects in the queue. Hiring more developers is a slow process, as is onboarding them. And time is money. With GenAI, new ideas can be put into production sooner, which helps make or save cash, improve employee and customer satisfaction, and otherwise help the organization serve its mission.
GenAI can be a valuable addition to enterprise software development teams and, as is common with tools that help developers, your organization can define, measure, and evaluate those improvements. All development platforms that use modern technologies, such as GitHub or source code management systems, routinely gather metrics on developer and team performance, such as lines of code per day and code quality.
Dev teams that incorporate GenAI for the full lifecycle, from project planning to architectural design to analyzing code and Q&A, often find they work significantly faster. Here are some of the ways GenAI can help:
Generative AI can help enterprise software development by helping improve the productivity of individual developers and teams, helping them create better quality software faster. Areas where it’s particularly handy include defining software architectures, building product plans, and generating code.
GenAI is also strong at helping with repetitive tasks and generating the so-called boilerplate code that’s generic to many programs, which a human developer can then customize and complete or use elsewhere. GenAI can also help review software source code for flaws and potential issues, such as security vulnerabilities and where the code’s functionality may deviate from user requirements or corporate standards.
There are many areas where GenAI-based development tools can act as assistants to individual enterprise software developers or as full team members. Here are a few of the more common places where the technology can help today, from software design to software deployment.
1. Bug detection and debugging. GenAI systems can efficiently help to identify and fix, or suggest fixes for, errors in code. Of course, there’s an entire industry built around defect remediation; open source and commercial tools can scan source code for security or functional defects, including subtle errors that might only occur if the system is heavily loaded, or if there are memory leaks, issues with multithreaded execution, attempts to access protected memory, and much more.
GenAI can add value to bug remediation in several ways. First, it could use prompts to help analyze whether the code will do what the developer or stakeholder intended, because even if the code compiles and runs correctly, it might not do the right action or return the desired result. Second, GenAI can help summarize defect reports from traditional tools to help test teams and developers understand subtle errors, find patterns of erroneous code, and suggest fixes.
2. Code generation. GenAI can automate writing code based on prompts or specifications. As mentioned, it’s unlikely that GenAI will generate a complex business application anytime soon. However, it can help create boilerplate code that developers can complete as well as code snippets that might implement a complex algorithm, make a difficult procedure call, or access external resources.
For example, many developers know how to use SQL to read, write, and update database information. But there’s an art to writing SQL stored procedures that can handle complex database tables and run efficiently across very large data sets, for example. GenAI tools can use prompts to help the programmer express the requirements for database access and then provide a suggested SQL call or procedure that could be copied and pasted into the application.
3. Code review. GenAI can help review code quality, security, and adherence to best practices. Code reviews are an essential part of the software development process, where a team looks at complex code in a group setting—projected on a screen or large monitor—aiming to validate its proper functionality and suggest areas for improvement. Developers can find code reviews stressful, especially when they’re in the presence of more senior software engineers who find nothing but fault. Code reviews are also very time-consuming and many people simply want to get them finished quickly, which may result in a lack of diligence.
GenAI can help by walking developers through a preliminary code review to spot obvious errors. That helps junior developers learn and can make in-person review sessions go faster. GenAI can also act as a participating member of the group code review team, highlighting areas that require extra attention, even offering up its own guidance as to the best way to make improvements.
4. Documentation. AI can automatically generate or improve documentation for codebases. Even with the best of intentions, developers are prone to ask, “What in the world was I thinking?” when reviewing software they wrote only a few months earlier. That’s why documentation is so important at many levels, including for the complete project’s architecture and the purposes of specific modules or microservices. Within modules and services, documentation can explain the decisions made for libraries, APIs, and algorithms, especially when the developer has a choice. There was a reason—now, what was it? GenAI can help by asking the developer, while coding is in progress, to explain those decisions and then expand those explanations into easy-to-understand documentation.
In addition, when the GenAI is used to help generate code itself (see No. 2 above), it can write full documentation that explains what the code snippet or microservice does and how to use it properly.
5. Learning and training. GenAI can help provide instant examples and explanations to improve developer skills. Software developers—even, or maybe especially, rock star coders—are continuously learning. There are always new technologies, such as AI and microservices, coming online as well as new tools, new language features, new design patterns, new security vulnerabilities, new corporate standards and best practices, and even new compliance requirements.
While there are numerous courses and classes as well as in-house training and mentoring, ongoing help is valuable. GenAI offers the potential to help detect when a developer is struggling, such as when there are attempts to use a deprecated feature or out-of-date API, and provide instant, personalized training. It can also, through prompts, help provide instant guidance when the developer doesn’t know or remember how to perform a new or rarely used task. It’s like a help screen but customized for that exact situation.
6. Refactoring. Optimizing and restructuring existing code for better performance is something GenAI can help with. Refactoring is an essential part of the software development lifecycle: It’s where you take a section of code and, without changing its functionality, make it run better. That may mean improving its speed and scalability, lowering its memory consumption, updating an algorithm, taking advantage of a new microprocessor shortcut, or using a new language instruction. Developers use runtime metrics to spot areas of code that are slow, consume too many resources, or cause end-to-end delays and target those for refactoring.
Refactoring may be an ideal place for GenAI code generation, where developers feed the problematic code into the system and, essentially, ask, “Can you make a version that runs faster?” We’re oversimplifying, but by seeing what the code does and how it works, GenAI’s predictive capabilities can often allow it to find a better approach. What’s more, because the old code and the refactored code can be compared and benchmarked, it’s easy to determine the benefits of the refactoring process as well as verifying that, indeed, the underlying functionality didn’t change.
7. Testing. GenAI can help create test cases, automate testing processes, and simulate edge cases. Different methodologies have their own unique views of the software testing process. Test-driven development (TDD), for example, insists that before you write a single line of code, you create test cases to ensure that whatever you write will work properly. In other methodologies, the development team may do testing at the end of a sprint; in others, a dedicated testing team does testing. The role of stakeholders in testing is essential and varies depending on the methodology: Sometimes, stakeholders are constantly involved and in other cases they review only release candidates.
GenAI can play multiple roles in helping testing and test management. We mentioned bug detection, but GenAI can also help write scripts that can be used as test automation tools, a process that many developers find tedious. Such GenAI-enhanced tools can also help test for edge cases, that is, situations that are unlikely to occur but still must be properly handled by a code module, stored procedure, or microservice. In addition, GenAI can help review test cases, including those written by humans, to determine if they’re good tests and that they cover all likely situations, including error conditions and attempts to hack the code at runtime.
“It’s tough to make predictions, especially about the future,” said baseball great Yogi Berra. Generative AI is a new field: The first examples of the technology only emerged in the early 2020s with products such as ChatGPT, which focused on generating text, and DALL-E for creating images. Many consumers and enterprise executives began tuning into GenAI around 2022—only two years ago.
No matter how you look at GenAI, we’re in only the early stages of the technology and will no doubt find new business use cases in areas including software development.
But we’ll take a swing: What might we expect over the next few years?
To start with, for GenAI to do everything it can do today, but better, in terms of supporting development teams with code generation, quality assurance, documentation, and test case creation. GenAI may become more conversational and better able to interact with developers—and non-developers—to step them through the process of defining requirements and then turning those requirements into project plans, documentation, test cases, and code.
If we really look into the crystal ball, perhaps some software won’t need to be written at all. Business users can merely tell the GenAI system what they wish to accomplish, and the software will create ad-hoc applications that perform that exact task. Whatever the future of GenAI in software development holds, it will likely have tremendous value for enterprises that embrace it.
Oracle’s generative AI is available today with tremendous capabilities embedded in business applications, such as Fusion and NetSuite, and built into Oracle Database 23ai.
One exciting area to explore is how to use GenAI and Oracle APEX for low-code application development using a new feature, APEX AI Assistant, which can help developers with complex tasks. More broadly, you can sign up for an Oracle Cloud Infrastructure (OCI) account and get free cloud credits to try Oracle’s AI services, including GenAI. Get started for free.
For such a new technology, the applications of generative AI to software development are endless. Odds are your developers will find GenAI to be a valuable assistant, and perhaps, an essential member of the team.
Top AI use cases include chatbots that revolutionize customer service and algorithms that transform healthcare experiences. The connecting thread? Software development.
How can I use generative AI in coding?
GenAI can be used during many parts of the software development process. For coding, the GenAI must be trained on the specific programming language used for your project. Give the system very specific commands, called prompts, for what you wish to do, and it should be able to generate finished source code that’s ready to be compiled and run or added into your source code management system or online repository, such as Github.
Can I build software using AI?
You can build software using GenAI in many ways. It can help generate code, though at this stage of the technology’s development, that code performs only relatively simple functions. GenAI’s real value, at least now, is to assist your development team with tasks such as planning projects, designing architecture, generating test cases, performing code reviews, and writing documentation.
How will AI be a challenge in software development?
GenAI is still new, especially for use within a development team. Arguably the biggest challenge will be acceptance of the technology by skeptical developers who are comfortable with the status quo and resistant to changes in their methodologies, tool chains, and processes. There may also be some who view GenAI as a potential threat to their careers.
Beyond that, each organization will need to build confidence in GenAI software. Is the code solid, safe, and performant? Are the test cases accurate and do they offer full code coverage? Does documentation meet the requirements? The initial stages of GenAI-assisted software development will be largely experimentation. The results, if the technology is applied correctly, should be greatly enhanced developer productivity, bringing better software into production faster, and at lower cost, to help the organization serve its mission.
Finally, law is still evolving as to the ownership and protectability of AI generated code. Can you register a copyright in software where AI was used to generate some of the code? If using a commercial GenAI system, do the Terms of Service mandate that you license back any output to the owner of the model? You should investigate these issues before embarking on use of GenAI in software development.