Do Cloud Right Standardize, secure and scale innovation | Read the white paper
Team, developer and coding training on computer screen in office for testing web application and troubleshooting. Programming, woman or helping man with developing software solution at small business.

Generative AI for developers: Benefits and challenges

Generative AI is transforming the way software developers code, moving from a passive assistant to an active programming partner. It augments their capabilities and contributes to the overall efficiency and quality of the software development lifecycle (SDLC).

A survey by management consulting firm McKinsey found that top-performing software organizations experienced 16%–30% gains in metrics such as team productivity and time-to-market and 31%–45% improvements in software quality from artificial intelligence.1 But gen AI also has its drawbacks. In a report on the impact of generative AI in software development, researchers from Google Cloud’s DORA program were surprised to learn that an increase in AI adoption can hurt software delivery performance.2 They believe the likely cause stems from AI rapidly producing huge amounts of code, which can slow down code reviews and can be more prone to creating instability in software delivery.2

Such promises and pitfalls are already playing out in the real world. Gabe Goodhart, chief architect of AI Open Innovation at IBM, shared that even with multiple AI assistants embedded into almost every step of his development workflow, he still retains judgment and ownership, reviewing each chunk of AI-generated code before committing it. Peter Staar, software manager and technical lead of Docling at IBM, relayed a similar experience, noting that gen AI tools help boost his output and speed but close oversight remains crucial.

How generative AI for coding software works

Large language models (LLMs) form the foundation of generative AI in coding. These deep learning models are built on a type of neural network architecture known as a transformer, which excels at processing sequential data. Code LLMs are trained on large datasets of source code, equipping them with the capability to understand the structure and syntax of programming languages.

Pretraining the model

Generative AI models are pretrained on massive datasets containing diverse examples of code written in various programming languages. During pretraining, the model learns to predict the next word or token in a sequence of code based on the context of the preceding tokens. This process allows the model to capture the syntax, semantics and patterns inherent in different programming languages.

Machine learning models can also be fine-tuned on a company’s own code repositories and related proprietary data, allowing them to gain domain-specific knowledge.

Understanding context

When presented with a coding prompt or query, the gen AI model processes the input and uses its learned knowledge to understand context and intent. The model considers the relationships between different code elements, such as variables, functions and control structures, to generate relevant and syntactically correct code.

Many models are also equipped with retrieval-augmented generation (RAG) capabilities. RAG helps enrich queries or prompts with information from the latest versions of APIs, codebase embeddings, coding style guidelines, frameworks, libraries, secure coding standards and technical documentation to provide up-to-date, enhanced context.

Code generation

Using learned patterns and contextual understanding, the model produces code snippets as output. The generated code is based on the input prompt and follows the structure and style of the programming languages in which the model was trained.

Adapting to user feedback

Gen AI models often have mechanisms to adapt and improve based on user feedback. Developers can provide feedback on the generated code, helping the model refine its understanding and enhance future outputs. This iterative feedback loop contributes to the model’s ability to produce more accurate and contextually relevant code over time.

Generative AI use cases for developers

There are a number of ways AI can streamline software development workflows. Here are some common use cases:

  • Bug detection

  • Code documentation

  • Code refactoring

  • Code review

  • Code suggestion

  • Code testing

  • Code translation

  • Prototyping

Bug detection

Generative AI can support software engineering teams when debugging, identifying and even automatically fixing bugs. This can lead to more robust and reliable software and faster development cycles.

Code documentation

Gen AI helps automate code documentation, suggesting inline comments, facilitating updates to promptly reflect code changes and implementing style and structure standards. This can be useful for maintaining clear and up-to-date project documentation.

Code refactoring

AI-driven coding tools can speed up code refactoring, recommending improvements to existing code by identifying redundant or inefficient portions. This can aid in maintaining high-quality code and optimizing performance over time. Problems that might have been tricky to pinpoint can be found faster and swiftly rectified by implementing AI-suggested solutions, which can even be done automatically.

Code review

Generative AI models can act as initial code reviewers, evaluating code for functionality, style and quality. They can highlight potential issues and propose ways to address them.

Code suggestion

AI-powered coding assistants can help beginners by providing context-aware explanations, guidance and suggestions in real time as they write code. This can flatten the learning curve for new developers.

Code testing

Generative AI can analyze code and create test cases automatically. It can generate test data that reflects real-world usage and behavior and outline detailed test scenarios—even for edge cases—helping improve test coverage.

Code translation

AI-assisted apps can translate code from one language to another, streamlining code conversion or application modernization projects. Examples include updating legacy applications by transforming COBOL to Java or incrementally rewriting legacy code from C to Python.

Prototyping

Gen AI can help design small, simple prototypes, accelerating the ideation process for software engineering teams and allowing them to explore novel algorithms and inventive solutions quickly. Teams can then revise and refine AI-generated prototypes to fit their requirements.

Benefits of generative AI for developers

Generative AI serves as another tool in a developer’s toolbox. It offers these advantages for software engineering teams:

  • Automates routine work

  • Enhances developer productivity

  • Optimizes development cycles

  • Personalizes development environments

  • Provides natural language interfaces

Automates routine work

Coding sometimes involves tedious tasks, and this is where generative AI applications tend to shine. Routine work like typing out standard methods can be expedited with code completion features. Generative AI tools can suggest lines of code or entire functions based on natural language descriptions. They also help programmers adhere to specific code documentation formats.

Enhances developer productivity

By automating routine work, gen AI allows developers to focus on the bigger-picture, higher-level, strategic facets of crafting software, such as security, architecture and system design. This can boost developer productivity and might even improve job satisfaction.

Optimizes development cycles

Incorporating AI in the SDLC can lead to smoother software releases. In the continuous integration/continuous delivery (CI/CD) pipeline, for instance, DevOps teams can use gen AI to automate infrastructure tasks such as load balancing and scaling, detect performance issues in real time to minimize downtime or forecast potential pipeline failures to prevent outages.

Personalizes development environments

Generative AI helps create personalized integrated development environments (IDEs) that adapt to individual coding styles and preferences. This can promote a positive developer experience, allowing programmers to do their best work.

Provides natural language interfaces

Gen AI can facilitate natural language interfaces for software development tools. Programmers can interact with IDEs and version control systems using natural language commands, making it more accessible for those without extensive programming expertise.

Think Keynotes

Win the enterprise AI race

Join Arvind Krishna to see how IBM is enabling AI-first enterprises through hybrid cloud and emerging quantum capabilities.

Challenges of using generative AI for coding

While generative AI is a powerful tool, it’s not a substitute for the creativity and capabilities of human developers. It serves to augment and assist them while coding, but programmers must still use generative AI responsibly.

Here are some challenges software engineering teams might encounter when integrating gen AI into the software development process:

  • Inaccuracy

  • More comprehensive code reviews

  • Overreliance

  • Security vulnerabilities

Inaccuracy

AI-powered apps might produce incorrect or misleading results, unwieldy functions or unrefined code that might degrade performance. This means developers must thoroughly validate and test generated code before committing it.

More comprehensive code reviews

With generative AI handling a lot of coding tasks, the focus shifts to verification. AI-generated code might need to go through multiple detailed assessments to make sure it’s ready to ship. This adds more time and effort to the code review process.

Overreliance

The constant use of generative AI tools can lead to overreliance. Developers might treat these tools as more than a source of support—they might default to and heavily depend on them. This can erode their critical thinking or problem-solving skills. Programmers must complement the outputs of gen AI with their own expertise and understanding.

Security vulnerabilities

A major risk with AI-assisted coding involves the possibility of introducing security vulnerabilities. It can produce code that fails to adhere to secure coding practices, employs outdated or unsafe dependencies or inadvertently exposes or mishandles sensitive data.

Developers must be trained in secure coding standards and secrets detection so they know what to look out for. Teams might need to add a review step centered on code security.

Generative AI tools for developers

Choices abound for gen AI tools in software development. When selecting the right fit, teams must consider compatibility with their tech stack and how seamlessly tools blend into their workflows. They must also outline well-defined policies for responsible AI use and implement guardrails to maintain security. Driving adoption entails hands-on workshops and tutorials on how these tools work and training on relevant skills such as prompt engineering.

AI agents and AI-powered coding assistants

Coding agents and AI-powered coding assistants go beyond generating code. They can also create pull requests, debug and refactor code and update documentation. Some of the most popular ones include Claude Code, the open-source Cline, Codex from OpenAI, Cursor, GitHub Copilot, IBM Bob, Kiro from AWS, Tabnine and Windsurf.

Code review

A few gen AI apps can do a first-pass code review, identifying common issues and subtle bugs that might get overlooked with manual code reviews. These apps include Codacy, CodeRabbit, Graphite, Greptile and Qodo.

Chatbots

Conversational AI technologies can help with brainstorming, explaining code, researching algorithms and summarizing documentation. Examples of chatbots that can provide development support include Anthropic’s Claude, Google Gemini, Microsoft Copilot, OpenAI’s ChatGPT and Perplexity.

Prototyping

Some AI tools excel at generating prototypes from prompts. These include Bolt, Lovable, Replit and v0.

Authors

Cole Stryker

Staff Editor, AI Models

IBM Think

Rina Diane Caballar

Staff Writer

IBM Think

Related solutions
IBM Instana Observability

Harness the power of AI and automation to proactively solve issues across the application stack.

Explore IBM Instana Observability
Automation solutions

AI-powered automation redefines productivity, enhances resilience, and drives growth.

Explore automation solutions
Cloud consulting services

Unlock the full potential of hybrid cloud in the era of agentic AI.

Explore cloud consulting services
Take the next step

Discover how IBM Instana and IT Automation solutions combine automation and real-time observability to boost resilience and accelerate growth.

  1. Discover IBM Instana
  2. Explore IT automation solutions
Related solutions
IBM Bob

Accelerate software delivery with Bob, your AI partner for secure, intent-aware development.

Explore IBM Bob
AI coding solutions

Optimize software development efforts with trusted AI-driven tools that minimize time spent on writing code, debugging, code refactoring or code completion and make more room for innovation.

Explore AI coding solutions
AI consulting and services

Reinvent critical workflows and operations by adding AI to maximize experiences, real-time decision-making and business value.

Explore AI consulting services
Take the next step

Harness generative AI and advanced automation to create enterprise-ready code faster. Bob models to augment developer skill sets, simplifying and automating your development and modernization efforts.

  1. Discover IBM Bob
  2. Explore AI coding solutions
Footnotes