MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
code
Recherche

A developer’s guide to code generation

mardi 12 août 2025, 11:00 , par InfoWorld
I started my career as an architect and coder working on AI algorithms for image processing, natural language processing, and search. Flash-forward to today, my coding is limited to low-code platforms to perform basic automation, data collection, and other business functions.

But last summer, I was migrating my blog to a new platform, and importing my posts was turning up all kinds of formatting and categorization issues. I turned to code generators to write simple algorithms to cleanse the HTML, parse out image tags with regular expressions, and reformat posts into a common format.

The State of Web Dev AI 2025 reports that 91% of developers use AI for code generation with GitHub Copilot, Tabnine, JetBrains AI, Supermaven, Qudo, Amazon Q Developer, and Aider ranking as the top tools. Devops teams are accepting between 20% and 35% of the code recommendations, according to another report.

“Developers of all skill levels can significantly boost productivity by leveraging generative AI for code development,” says Bharat Sandhu, SVP and CMO of SAP Business Technology Platform. “These advanced tools accelerate development cycles, minimize repetitive tasks like debugging and legacy code maintenance, and consistently deliver reliable, contextual results—empowering teams to focus more on innovation and complex problem-solving.”

Code generators are one of several AI-driven paradigm shifts impacting the developer experience, developer productivity, and code quality. How should developers be using these tools for best results? I reached out to several experts, who kindly answered my questions and recommended some best practices.

How should senior developers use AI code generators?

When code generators first appeared, the sentiment from IT leaders was that they were getting the best results from advanced developers. They had the experience of expressing their requirements through prompts, evaluating the response, and fixing issues through iterative code improvement.

“Senior developers are in the best position to use AI code generation tools since they can quickly understand what the generated code is doing, grasp its trade-offs, and guide the AI tool to shape the code to the desired outcome,” says Trisha Gee, lead developer advocate at Gradle. “But, they’re less likely to use AI tools since they’re already experts at using existing tools and can oftentimes create the needed code more quickly than an AI tool.”

Jeff Foster, director of technology and innovation at Redgate, suggests that a small mindset change can help the most senior developers understand the opportunities for using code generators. “Advanced developers should treat code generators like eager but inexperienced interns. Use them to accelerate boilerplate and explore ideas, but don’t trust them blindly,” says Foster.

CIOs and CTOs should remind their most senior developers about the opportunities and business needs for their advanced skills beyond coding challenges.

“Advanced developers should see AI code generators as multipliers—not replacements,” says Rukmini Reddy, SVP of engineering at PagerDuty. “The real value is not speed alone; it’s unlocking capacity to free advanced developers up for higher-leverage work like system design, performance optimization, and mentorship.”

Two experts shared examples of how advanced developers are using code generators.

“GenAI is most successful when used for code completion, auto commenting, and documentation,” says Rob Whiteley, CEO of Coder. “It eliminates redundant or tedious admin work that prevents most developers from getting in the flow.”

I also wanted to know about the more advanced coding challenges that require senior developers’ skills but can be time-consuming and error-prone coding exercises.

“Advanced developers should treat AI code generators as powerful accelerators rather than autonomous authors,” says Ori Bendet, VP of product management at Checkmarx. “AI code generators are ideal for boilerplate code generation, repetitive test scaffolding, infrastructure-as-code templates, explaining obscure syntax, and prototyping algorithms before optimization. However, seasoned developers must retain control over architecture, security, and performance trade-offs.”

How should junior developers use code generators?

If 91% of developers are using AI code generators, then the implication is that CIOs and CTOs see the value in letting junior developers use them. However, junior developers are likelier to use code generators as learning tools rather than for problem-solving or as productivity enhancers.

Foster of Redgate says, “Junior developers should use code generators as learning tools, but don’t let them become a crutch. Always ask why the AI-generated code works or doesn’t work. AI speeds up writing, not correctness. Review skeptically, checking for hidden assumptions, security gaps, and unintended complexity, and test thoroughly!”

Junior developers should consider using generative AI as a coding companion, prompting it with questions like, “How can I make this code more reliable and easier for others to understand?”

“Junior developers can benefit from AI tools for inspiration and alternative approaches but should avoid relying on them too heavily,” says Yonatan Arbel, developer advocate at JFrog. “It’s crucial to think critically and verify generated code quality, treating these tools as a sounding board rather than as substitutes for thorough understanding and validation.”

Another recommendation is to foster collaboration between junior and senior developers on best practices, especially around writing prompts and validating the AI-generated code.

“Junior developers get the most productivity benefit from leveraging AI code generation tools but do not yet have the expertise to use them effectively,” says Gee of Gradle. “It’s key that senior developers mentor junior developers so that they can develop an understanding of trade-offs and design choices and are able to use the technology critically.”

Rania Khalaf, chief AI officer of WSO2, says that junior developers should use generative AI for skills development. “For junior developers, code generation can be a valuable learning tool, offering a productive starting point and an opportunity to understand unfamiliar languages or concepts through careful review of the generated code.”

What are the dos and don’ts of prompting AI code generators?

Top devops teams create prompt knowledge bases to teach best practices and illustrate how to improve AI-generated code iteratively. Below are some recommendations for prompting code generators.

Michael Kwok, Ph.D., VP at IBM watsonx Code Assistant and IBM Canada lab director, says, “When prompting AI, be clear and specific, avoid vagueness, and refine iteratively. Always review AI code for correctness, validate against requirements, and run tests.”

Whiteley, CEO of Coder, suggests, “The best developers approach a prompt by fully understanding the problem and required outcome before enacting genAI-assisted tools. The wrong prompt could result in more time troubleshooting than it’s worth.”

Reddy of PagerDuty says, “Prompting is becoming one of the most important core engineering skills in 2025. The best prompts are clear, iterative, and constrained. Prompting well is the new debugging—it reveals your clarity of thought.”

Rahul Jain, CPO at Pendo, says, “Whether you’re a senior developer validating prototypes or a junior developer experimenting with prompts, the key is grounding AI output in real-world usage data and rigorous testing. The future of development lies in pairing AI with deep product insight to ensure what gets shipped actually delivers value.”

Karen Cohen, director of product management at Apiiro, says, “Developers should treat AI output as untrusted input—crafting precise prompts, avoiding vague requests, and enforcing deep reviews beyond basic scans.”

How should developers review and test AI-generated code?

Developers are ill-advised to incorporate AI-generated code directly into their code bases without validating and testing it. While AI can generate code faster than developers, it’s less likely to have the full context of business needs, end-user expectations, data governance rules, non-functional acceptance criteria, devsecops non-negotiables, and other compliance requirements.

“Developers should review AI-generated code for adherence to coding standards, security considerations, and overall code quality,” says Edgar Kussberg, group product manager at Sonar. “Tools like static analyzers, when used from the very beginning of the SDLC, will check the code directly from the IDE and will help avoid code quality issues from slipping into the code. Development teams should also consider integrating security practices such as SAST [static application security testing] into the code generation process, conducting regular security assessments, and leveraging automated security tools to identify and address manual and AI-generated code vulnerabilities.”

Reddy of PagerDuty says that organizations adopting code generation tools should be practicing code reviews. “Don’t treat generated code any differently than the code your peers write. In fact, scrutinize it more because it doesn’t come with the team’s lived context or system knowledge,” says Reddy.

Security was a top concern for many other experts. For organizations lagging in shift-left devsecops practices, using code generators should catalyze their priorities.

“To mitigate risks, teams must integrate security into their development workflow, leveraging automated checks and policy enforcement to ensure AI-assisted code meets organizational and regulatory standards,” says Cohen of Apiiro. “AI-generated code lacks company context and compliance awareness, making automated security reviews and threat modeling essential.”

Improving data quality and drawing on synthetic data to increase the variability of test cases are growing needs for using AI code generators and developing AI agents.

Melissa McKay, head of developer relations at JFrog, says, “Prioritizing data integrity and leveraging AI tools for automation not only enhances productivity but also minimizes risks, paving the way for smooth releases of AI-powered applications.”

Code generation is only the beginning, as agentic AI capabilities become available across the software development life cycle. Devops teams that learn to use generative AI capabilities effectively and safely will have greater opportunities to deliver business value while focusing on higher-level technical challenges.
https://www.infoworld.com/article/4032989/a-developers-guide-to-code-generation.html

Voir aussi

News copyright owned by their original publishers | Copyright © 2004 - 2025 Zicos / 440Network
Date Actuelle
mer. 13 août - 12:01 CEST