Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Our 15 AI experts built the most comprehensive, practical, 90+ lesson courses to master AI Engineering - we have pathways for any experience at Towards AI Academy. Cohorts still open - use COHORT10 for 10% off.

Publication

How AI is Transforming Programming: A Developer’s Guide to Enhanced Workflows
Latest   Machine Learning

How AI is Transforming Programming: A Developer’s Guide to Enhanced Workflows

Author(s): Michalzarnecki

Originally published on Towards AI.

This article gives overview of AI-based tools and techniques that support programmers work and explains how to leverage artificial intelligence to boost your productivity across every stage of the software development lifecycle.

How AI is Transforming Programming: A Developer’s Guide to Enhanced Workflows
if you are curious how this lovely creature was generated, please read the whole article 😉

The software development landscape is undergoing its third major revolution, and most developers are still trying to figure out what it means for their daily work, so am I! 🙂
After researching, testing, and implementing AI tools across multiple projects, I’ve discovered that there are repeatable project areas and specific activities where AI can speed up and complement programmers work.

As Andrej Karpathy, former CTO of Tesla and one of the founders of OpenAI, pointed out in his presentation “Software is Changing (Again)” we’ve moved through distinct phases of computing evolution. The 1940s brought us the first computers and the birth of software engineering. Around 2012, we entered the machine learning era, where we began writing programs that could generate other programs based on examples rather than explicit logic. He called these phases “software 1.0” and “software 2.0” respectively.

Now, we’re entering what Karpathy calls “Software 3.0” — programming in English rather than PHP, C++, or Java. We’re literally programming in natural language, using prompts passed to large language models as our primary interface.

This isn’t just a metaphor. Like the command-line interfaces of early computers, we now have input interfaces where we provide prompts and output interfaces where we receive answers. But unlike traditional computing, both input and output are in natural language, creating unprecedented possibilities alongside entirely new challenges.

slide from Andrej Karpathy presentation “Software is Changing (Again)

The Iron Man Paradigm

Before diving into specific tools and techniques, it’s crucial to understand what AI assistance actually looks like in practice. There are two competing visions of how AI will evolve in programming, and it can be compared to Iron Man movies as an analogy.

image of Iron Man and Ultron generated with stable diffusion model

We don’t have Ultron yet — an autonomous AI that makes decisions and implements solutions independently. What we have is much more like the Iron Man suit: powerful augmentation tools that enhance our capabilities as developers without replacing our judgment, creativity, or domain expertise.

The AI doesn’t have free will. It doesn’t trigger changes on its own. We’re still the ones making decisions, providing guidance, and leading the AI through the steps of generating solutions. Without this augmentation, we’re just regular developers. With it, we become programming superheroes capable of tackling problems and implementing solutions at previously impossible speeds.

But here’s where the metaphor becomes critical: just like Tony Stark had to learn how to use the suit effectively, we need to develop new skills to work effectively with AI tools.

The Lottery Effect: Why AI Programming Can Feel Random

There are many nice videos showing how to create small apps using “vibe coding”, but in reality when you first start using AI programming tools, the experience can feel frustratingly random — like playing a lottery. Let me share a real example from my own work that perfectly illustrates this challenge.

I was working on fixing graph generation for a company structure report. The AI generated some code that looked sophisticated and correct. It even provided a detailed explanation of the key changes it had made. But when I tested the solution, it generated no output at all. The code simply didn’t work, despite looking professional and well-structured.

So I tried again — essentially rolling the dice one more time with the AI lottery machine. This time, it provided a working solution. Interestingly, the task I was trying to accomplish was relatively simple: moving an image element from one place to another in the layout. Even though the previous solution was complex and technically correct, this basic positioning task proved too difficult for the AI to handle reliably.

This happened because the AI tool that I used didn’t have access to user interface. It could see the code and predict how it should work based on patterns they’ve learned. They can’t see the actual output or interact with your application the way a human developer would.

This experience taught me the most important lesson about AI-assisted programming: you must always test, analyze, and understand every piece of code generated by AI. Without examining each part of the solution and understanding it deeply, you won’t end up with working, maintainable code.

I’ve already seen code in projects that looks strange when viewed in isolation but works as part of a larger system. However, if you encounter a piece of generated code that makes no sense even in context, it’s a red flag. The conclusion is to always take the time to understand the generated solution, and don’t hesitate to ask the AI to explain any part that seems unclear.

The Current Landscape: Essential AI Tools for Development

After extensive research and testing, I’ve identified several categories of AI tools that are mature enough for production use and can significantly improve development workflows. I present in this section AI tools that brought value to my projects.

Documentation Generation: DeepWiki and the End of Manual Documentation

One of the most immediately valuable applications of AI in programming is automated documentation generation. I recently integrated DeepWiki into my projects, and the results exceeded my expectations.

https://deepwiki.com/

At first it worked perfectly with github public repositories although didn’t work with bitbucket private repositories which was my use case. After adding some contributions to this wonderfull project I managed to document my private repos. Here is a link to repository if you want to run it locally and use for documenting your private repositories. In case of public github repositories you can use https://deepwiki.com/.

DeepWiki excels at handling complex projects and generating documentation that actually makes sense. I tested it on a framework where I’m a contributor, and it generated excellent data flow diagrams and architecture diagrams that would have taken hours of work to create manually.

example Mermaid.js diagram generated by deepwiki.com

The tool generates Mermaid diagrams, which have become the standard for technical diagramming in development. To view these properly in your IDE, you’ll need to install the Mermaid plugin.

The documentation DeepWiki generates includes:

  • System architecture overviews
  • Data flow visualizations
  • Component interaction diagrams
  • API endpoint documentation
  • Database schema relationships

Code Analysis and Context Management: Git-Ingest

Sometimes One of the biggest challenges in AI-assisted programming has been providing proper context. How do you give an AI assistant enough information about your project to generate relevant, accurate suggestions?
In later sections of this article I describe IDE-integrated tools that can automatically pick code context and send it to LLM. This context selection is not perfect and there are scenarios when passing full application code context is needed. In such case there appears the challenge of converting project directory tree structure into flat block of text that can be passed to LLM directly.

Git-ingest solves this elegantly. It’s a simple tool that flattens your entire project structure into a single text file that can be passed directly to large language models. Instead of trying to explain your codebase structure, you can provide the complete context in a format that AI tools can process effectively.

https://gitingest.com/

The tool works both locally and with publicly available repositories. When you need comprehensive analysis across multiple files and directories, git-ingest enables the AI to understand relationships between different parts of your codebase, leading to much more accurate suggestions and better problem-solving capabilities.

This is particularly valuable when you’re dealing with complex refactoring tasks, architecture decisions, or debugging issues that span multiple files.

The Future of AI Integration: MCP Servers and Protocol Standardization

The Model Context Protocol (MCP) represents one of the most significant developments in AI tool integration. In 2024, Anthropic (the company behind Claude) identified a major problem: there was no standardization in how large language models communicate with external tools and data sources.

Every service — Slack, Google Drive, GitHub, databases, APIs — had its own unique integration requirements. This meant developers had to build custom connections for every tool they wanted to integrate with their AI workflows.

MCP changes this by providing a unified protocol. Instead of building separate integrations for every service, you create (or use one of shared) MCP servers that act as middleware between your AI tools and data sources. These servers use a standardized protocol that any MCP-compatible AI system can communicate with.

Here’s how it works in practice:

  1. Your IDE or application connects to an MCP server
  2. The MCP server (written in Python or other languages) can access any data storage: local files, PostgreSQL databases, remote APIs, cloud services
  3. All communication happens through the unified MCP protocol
  4. Any AI tool that supports MCP can interact with all your connected services seamlessly
Example MCP structure

I built a simple example application that demonstrates this concept. Using annotations, you can turn Python methods into command tools accessible by language models:

@mcp.tool("summarize_file")
def summarize_file(filename: str) -> str:
"""Summarize the contents of a file"""
# Implementation here

@mcp.tool("query_database")
def query_database(sql_query: str) -> str:
"""Execute a SQL query and return results"""
# Implementation here

These annotations automatically expose your functions as tools that AI assistants can call when needed. You can then make requests via CURL or other HTTP clients to ask questions like “summarize the README file” or “find all users created in the last week.”

The MCP ecosystem is expanding rapidly, with new servers and integrations appearing weekly. This standardization will likely become the foundation for next-generation AI-powered development tools.

MCP servers can be now connected to IDE AI assistants like GitHub Copilot or Amazon Q. Feel free to search thousands of MCP servers listed in this repository. There is high chance you will find once suitable for databases and APIs used in your projects.

IDE Integration: Where AI Programming Happens

The real magic of AI-assisted programming happens at the IDE level. After extensive testing of GitHub Copilot, Amazon Q, and JetBrains AI Assistant, I’ve found that while they offer similar core functionality, the differences lie in how they handle context and integrate with your existing workflow.

JetBrains AI Assistant: The Developer’s Swiss Army Knife

For teams using JetBrains IDEs (IntelliJ, PyCharm, PhpStorm, DataSpell), the JetBrains AI Assistant offers the most seamless integration. Here’s what makes it particularly effective:

Multi-model Support: You can choose from various models including Claude-4, which I consistently use for programming tasks. The ability to switch models based on the task at hand provides flexibility that single-model solutions can’t match.

Intelligent Context Management: The plugin automatically attaches surrounding files based on imports and dependencies. When you’re working on a particular file, it analyzes the codebase to include relevant context without manual intervention. This solves the context problem that plagued earlier AI programming tools.

Project-wide Understanding: You can attach entire project files using the plus icon, and the system will automatically vectorize and include related files. This creates a comprehensive understanding of your codebase that enables more accurate suggestions.

Multimodal Capabilities: The tool can capture and analyze output, helping verify that improvements work as expected. This is particularly valuable when working on UI components or data visualization.

JetBrains AI Assistant Plugin

Working Modes: Understanding Your Options

Most AI IDE plugins offer two or three distinct working modes, and understanding when to use each is crucial for effective AI-assisted development:

1. Chat Mode (Consultation) This is pure discussion-based problem solving without automatic code changes. Use this mode when:

  • You’re exploring architectural decisions
  • You need to understand existing code
  • You’re debugging complex issues
  • You want to discuss trade-offs before implementation

2. Edit Mode (Collaborative) The AI suggests changes that you can review, accept, or reject. This is my recommended primary workflow because:

  • You maintain full control over what changes are made
  • You can review each suggestion before acceptance
  • You learn from the AI’s reasoning process
  • You catch potential issues before they enter your codebase

3. Autonomous Mode (Fully Automated) The AI makes changes automatically without explicit approval. While impressive in demonstrations, I strongly advise against using this mode for production work because:

  • It can introduce bugs that are difficult to trace
  • You lose understanding of what changes were made
  • Debugging becomes much more challenging
  • You miss opportunities to learn from the AI’s approach
Example bugfix with GitHub Copilot agent mode — solution not generated at first
Example bugfix with GitHub Copilot agent mode — solution generated after second attempt
Example bugfix with GitHub Copilot agent mode — review and accept/reject solution

The Context Challenge: Making AI Understand Your Project

One of the most critical aspects of effective AI-assisted programming is providing proper context. The difference between a helpful AI assistant and a frustrating experience often comes down to how well the AI understands your specific project, requirements, and constraints.

Here’s a real example of how context affects results. I was working on improving a class for generating company structure graphs. My initial prompt was simple: “Fix and improve this class to generate correct company structure graphs.”

The result was disappointing. Despite having access to working code that generated almost correct graphs, the AI produced a solution that was not only not improved but was completely broken. It changed the graph direction (moving the person from top to bottom instead of bottom to top) and introduced new bugs.

The problem wasn’t the AI’s capability — it was my prompt. I hadn’t provided enough context about what was actually wrong, what the expected behavior should be, or what “improvement” meant in this specific case.

disappoint AI code assistant result when low quality prompt is provided

When I revised my approach and provided detailed context about the specific issues, expected behavior, and business requirements, the AI generated much more useful solutions.

AI-based IDE

Among AI-based plugins for IDEs there are also whole IDEs that are designed to implement full applications with support of LLMs.
One of them is Cursor IDE and below you can find example of searching for bugs in the code and fixing them with Cursor IDE.

The Five Rules of Effective AI Prompting

After lots of experimentation and learning from others experience, I’ve found that correct prompt engineering approach can be universally described with five essential rules for writing prompts that consistently produce useful results. Think of these as fundamental principles for communicating effectively with AI systems. Use them in any task supported by LLMs and you will receive more likely results that are correct, complete and stick to expectations.

The goal of prompt engineering is to effectively instruct the model, improving its performance on specific tasks or applications
by precisely formulating queries or instructions.

The Five Rules of correct AI Prompting

Rule 1: Provide Clear Instructions

Think of prompting as giving instructions to a highly skilled colleague who knows nothing about your project. The more context and detail you provide, the better the results will be.

Your prompts should include:

Role Definition: Clearly state what role you want the AI to play:

  • “You are an expert Python developer specializing in web APIs”
  • “You are a code reviewer focusing on security best practices”
  • “You are a database optimization specialist”
  • “You are a front-end developer expert in React and TypeScript”

Behavior Guidelines: Specify how the AI should approach the task:

  • “Your role is to provide information and answer questions based on provided source code”
  • “You should respond directly and concisely using the information from the provided codebase”
  • “Avoid making assumptions about requirements not explicitly stated”
  • “If you’re not certain about a solution, ask clarifying questions rather than guessing”

Output Expectations: Define what constitutes success:

  • “Do not output code unless you are confident it will work correctly”
  • “Provide explanations for any complex logic or architectural decisions”
  • “Include error handling and edge case considerations”
  • “Focus on maintainable, readable solutions over clever optimizations”

Here’s an example of a well-structured system prompt for code analysis:

You are an expert programmer and code reviewer. Your role is to analyze code and provide actionable feedback based on best practices, security considerations, and maintainability.

You should respond directly and concisely, focusing on specific improvements rather than general observations. When suggesting changes, provide the reasoning behind each recommendation.

If you encounter code patterns you’re unfamiliar with or business logic that isn’t clear from the context, ask specific questions rather than making assumptions.

Your goal is to help improve code quality while respecting the existing architecture and business requirements.

example instructions provided in system prompt

Rule 2: Include Examples (Few-Shot Learning)

The power of examples in AI prompting cannot be overstated. There are three main approaches:

Zero-shot: No examples provided. The AI relies entirely on its training to understand what you want.

One-shot: A single example provided. This dramatically improves results by showing the AI exactly what kind of output you expect.

Few-shot: Multiple examples provided. This is often the most effective approach for complex tasks.

Let me demonstrate this with a real example from our company tagging system. We needed to analyze website content and generate tags describing companies.

Zero-shot approach:

Prompt: “Provide tags for company based on website content”
HTML: [company website content]

Result:
“Based on the website content, here are some relevant tags for this company:
1. Business Information Services
2. Data Analytics
3. Technology Solutions
…”

This output includes unwanted formatting, ordinal numbers, and explanatory text that makes it difficult to parse programmatically.

One-shot approach:

System: “Provide no more than five tags for companies based on website content”

Example:
HTML: [Lego company website content]
Tags: toy manufacturer, brick, Danish company

Now analyze:
HTML: [target company website content]

Result: business information, banking, medical care, consulting, technology

The one-shot example immediately improved the output format and eliminated the formatting issues.

Few-shot with Chain of Thought: For complex reasoning tasks, you can combine multiple examples with step-by-step thinking processes:

Example 1:
Problem: Generate the 5th Fibonacci number
Thinking: The Fibonacci sequence starts with 0, 1. Each subsequent number is the sum of the two preceding numbers.
0, 1, 1 (0+1), 2 (1+1), 3 (1+2), 5 (2+3)
Answer: 5

Example 2:
Problem: Generate the 7th Fibonacci number
Thinking: Starting from the 5th number (5) and 6th number (3+5=8):
6th: 8, 7th: 5+8=13
Answer: 13

Now solve: Generate the 2567th Fibonacci number

This chain-of-thought approach enables the AI to handle much more complex problems by showing not just the answer, but the reasoning process.

Rule 3: Define Output Format

One of the most common sources of frustration with AI tools is receiving responses in unexpected formats. Always specify exactly what format you expect.

For Structured Data:
“Provide the response as a JSON object with the following structure:
{
“status”: “success” or “error”,
“message”: “descriptive message”,
“data”: [array of results]
}
Do not include any additional text outside the JSON.”

For Code Solutions:

“Provide only the corrected function without any explanatory text. Include inline comments for complex logic but no markdown formatting or code block indicators.”

For Analysis Tasks:

“Format your response as: ISSUES FOUND: [numbered list] RECOMMENDATIONS: [numbered list] PRIORITY: [High/Medium/Low] Do not include any other formatting or explanatory paragraphs.”

Here’s how this applies to our company tagging example:

System prompt: “…format output as: tag1, tag2, tag3” Result: business information, data analytics, consulting services

This eliminates parsing complexity and provides consistent, usable output.

Rule 4: Divide Complex Tasks into Smaller Steps

This is perhaps the most important rule for programming tasks. Instead of asking the AI to “solve everything,” break complex problems into manageable steps.

Instead of: “Check this code and fix all the issues”

Try this approach:

  1. “Analyze this code and list potential issues you can identify”
  2. “Focus on the database connection timeout issue you mentioned and provide a fix”
  3. “Now address the performance optimization opportunities”
  4. “Finally, add appropriate error handling for the edge cases we discussed”

Here’s a real example from travel planning that demonstrates this principle:

Complex, ineffective prompt:

“Prepare a three-day sightseeing plan for Poznan (Poland)with a budget of 300 euros, including cultural attractions, opening hours, ticket prices, nearby restaurants, public transport directions, daily maps, and booking links.”

Divided into manageable steps:

  1. “Research top cultural attractions in Poznan (Poland) and their basic information”
  2. “Create a 3-day schedule with maximum 4 attractions per day, considering travel time”
  3. “Add restaurant recommendations near each attraction”
  4. “Calculate budget breakdown including transport, tickets, and meals”
  5. “Provide specific booking links and public transport directions”
  6. “Create a final summary with daily itineraries and maps”

The step-by-step approach produces much more detailed, accurate results because each step builds on the previous one with focused attention.

Pro tip: If you have a complex prompt that you know needs to be broken down but aren’t sure how, ask the AI: “Please break this complex request into smaller, sequential tasks that I can work through step by step.”

Rule 5: Evaluate and Test Results Systematically

This rule is absolutely critical for programming tasks. Never trust AI output without systematic verification. The evaluation process should be as rigorous as any code review.

For Code Solutions, Always Check:

  • Does the code compile/run without errors?
  • Are the data types and function signatures correct?
  • Does it handle edge cases appropriately?
  • Is the logic sound for your specific use case?
  • Are there any security vulnerabilities?
  • Does it follow your project’s coding standards?

For Algorithm Solutions: Here’s an example from a computer vision project where I was building a lane navigation system:

# Test cases for lane navigation AI
def test_navigation_response():
# Test forward movement
assert get_navigation_command(straight_lane_image) == "forward"

# Test right turn
assert get_navigation_command(right_curve_image) == "right"

# Test left turn
assert get_navigation_command(left_curve_image) == "left"

# Test response format
response = get_navigation_command(test_image)
assert isinstance(response, str)
assert response in ["forward", "left", "right"]
assert len(response.split()) == 1 # Single word only

For Database Solutions: When AI generates database queries or optimizations, always:

  1. Test with small datasets first
  2. Use EXPLAIN ANALYZE to verify query plans
  3. Check for potential data loss or corruption
  4. Verify indexes are used correctly
  5. Test with edge cases and boundary conditions

Systematic Evaluation Process:

  1. Functional Testing: Does it work as intended?
  2. Edge Case Testing: How does it handle unusual inputs?
  3. Performance Testing: Does it meet performance requirements?
  4. Security Review: Are there any security implications?
  5. Code Quality: Is it maintainable and follows best practices?

According to McKinsey research from 2023, 70% of AI-based projects fail due to inadequate evaluation processes. The projects that succeed implement systematic evaluation at every step.

If you are more interested into topic of evaluation of LLM outputs, check an extensive evaluation module that I developed for the LLPhant AI framework (the largest AI framework for PHP), which includes:

  • Automated testing pipelines for AI-generated code
  • A/B testing for prompt optimization
  • Guardrails for retrying failed requests
  • Performance benchmarking for AI solutions

This systematic approach to evaluation is what separates successful AI-assisted development from failed experiments.

Real-World Applications: Beyond Simple Code Generation

While code generation gets most of the attention in AI programming discussions, the real value often comes from more specialized applications that solve specific development challenges.

Database Optimization: From Minutes to Seconds

One of the applications I’ve encountered is AI-assisted database optimization. Here’s a real example from our production environment:

We had a query that was taking over 4 minutes to execute, significantly impacting user experience. The query involved multiple complex conditions:

  • Thread-spreading conditions using modulo operators
  • Multiple sorting conditions with ORDER BY clauses
  • Complex JOIN operations across several tables

I provided the slow query to our AI assistant and asked for optimization suggestions. Within seconds, it generated a compound index recommendation:

CREATE INDEX idx_complex_query ON table_name 
(field1, field2 DESC, field3)
WHERE condition_field IS NOT NULL;

The AI correctly identified that:

  1. A compound index was needed covering all three fields used in conditions
  2. One field needed to be sorted in descending order to match the query’s ORDER BY
  3. A partial index with a WHERE clause would be more efficient than a full table index

After implementing this index, the query execution time dropped from 4 minutes to 3 seconds — a 99.8% improvement. The EXPLAIN ANALYZE output showed the cost dropped from hundreds of thousands to around 200.

This type of optimization would typically require:

  • Deep analysis of the query execution plan
  • Understanding of database internals
  • Multiple iterations of index testing
  • Performance benchmarking

The AI provided this optimization in a single interaction, and more importantly, it was correct on the first try.

Automated Code Review: Beyond Syntax Checking

Modern AI-powered code review tools like Gemini Code Assist don’t just check for syntax errors or basic issues. They provide intelligent analysis that can rival human code reviewers.

Here’s an example from my recent pull request I submitted to depwiki project. The change was simple — fixing invisible select options in dark theme by updating CSS styles:

The AI code reviewer not only approved the fix but suggested improvements I hadn’t considered:
The AI recognized that:

  1. Using CSS custom properties would be more maintainable
  2. The solution should work with multiple theme variations, not just dark/light
  3. The existing codebase already had CSS variables defined for this purpose

This demonstrates that AI code review tools can act as active contributors to your project, not just error checkers. They bring institutional knowledge about best practices and can suggest improvements based on understanding the broader codebase context.

Here is guideline on how to connect Google Gemini code reviews to the project. If you are using bitbucket, there is also flexible way of connecting AI reviewer using pipelines like described in this article.

Test Generation: Comprehensive Coverage

One of the most immediately valuable applications of AI in programming is automated test generation. AI tools excel at creating comprehensive test suites that cover more cases than most developers would think to write manually.

Here’s an example of how this works in practice:

Original Request: “Generate unit tests for this UserController class”

AI Response: The AI generated tests covering:

  • Happy path scenarios (successful user creation, updates, deletion)
  • Error conditions (invalid input, database failures, authorization issues)
  • Edge cases (empty strings, null values, boundary conditions)
  • Integration scenarios (database interactions, external service calls)
  • Security considerations (authentication, authorization, input sanitization)

What impressed me most was that the AI generated 20–30 test cases when I might have written 5–10 manually. It considered scenarios I hadn’t thought of and used appropriate mocking strategies for external dependencies.

For Integration Tests: The AI can generate comprehensive acceptance tests:

# AI-generated acceptance test example
def test_company_management_workflow():
# Test data creation
self.create_test_company()

# Test PDF generation
self.visit('/companies/report')
self.assert_element_present('.pdf-section')

# Test data source attachment
self.attach_data_source('financial_data.csv')
self.assert_success_message_shown()

# Test access control
self.logout()
self.visit('/companies/report')
self.assert_redirected_to_login()

The generated tests followed our project’s testing conventions, used the correct assertion methods, and included proper setup and teardown procedures.

Graphics and Visual Content Generation

Beyond code, AI tools can significantly impact the visual aspects of development projects. Stable Diffusion and similar tools have matured to the point where they can generate production-quality graphics for applications.

Stable Diffusion panel

Stock Image Generation: I recently experimented with generating stock images. Instead of purchasing expensive stock photos, I used this prompt:

“Generate a professional stock image suitable for premium business content about data analytics and reporting. Style: modern, clean, corporate. Include: laptop, charts, professional setting. Avoid: generic corporate clichés, overly posed subjects.”

The results were impressive — professional-looking images that cost a fraction of traditional stock photography. More importantly, the images were unique to our brand and messaging.

The Control Net Feature: One particularly powerful feature is the ability to use hand-drawn sketches as templates. You can:

  1. Draw a rough layout or composition by hand
  2. Use it as a control net input
  3. Generate professional-looking images that follow your exact composition

This bridges the gap between creative control and AI generation capabilities.

Common Issues and Solutions: AI image generation isn’t perfect. Common problems include:

  • Extra hands or limbs on people
  • Inconsistent lighting or perspective
  • Text that doesn’t make sense
  • Objects that don’t quite fit together logically

However, with proper negative prompts and iteration, you can usually get high-quality results within 2–3 attempts. The key is being specific about what you don’t want:

Negative prompt: “extra hands, deformed fingers, bad anatomy, blurry text, watermarks, signatures, low quality”

stable-diffusion example
stable-diffusion example — apply negative prompt to remove buildings form background

Here is link to open-source AUTOMATIC1111 environment which you can use to generate images with stable diffusion locally. If you don’t have powerful graphic card in your computer don’t worry — there are also online pages serving Stable Diffusion models and WebUI for you.

Challenges and Pitfalls: What to Watch Out For

The Debugging Dilemma

One of the most significant challenges with AI-generated code is debugging when things go wrong. When the AI generates large amounts of code that doesn’t work correctly, you face a unique problem: you’re debugging code you didn’t write and don’t fully understand.

This creates several compounding issues:

  • Unfamiliarity: You’re not intimately familiar with the code structure and logic
  • Complexity: AI-generated code can be more complex than necessary
  • Hidden assumptions: The AI may have made assumptions about your environment or requirements that aren’t obvious
  • Integration issues: The generated code may not integrate well with your existing codebase

Mitigation strategies:

  1. Always review code before integration: Understand every piece of generated code
  2. Start small: Begin with small, isolated functions rather than large system components
  3. Maintain documentation: Document any AI-generated code with your own comments
  4. Iterative approach: Build solutions incrementally rather than generating large blocks of code

Context and Domain Knowledge Limitations

AI tools are powerful pattern matchers, but they’re not domain experts. They lack deep understanding of:

  • Your specific business requirements
  • Industry regulations and compliance needs
  • Performance constraints in your environment
  • Security considerations for your particular use case
  • Integration requirements with legacy systems

Example: When I asked an AI to optimize a financial calculation function, it provided a mathematically correct but business-inappropriate solution. The AI optimized for computational efficiency but ignored regulatory requirements that mandated specific calculation methods for audit compliance.

The solution was technically superior but practically unusable because it violated industry standards.

Best practices for domain-specific work:

  1. Provide extensive context: Include business rules, regulatory requirements, and constraints
  2. Validate with domain experts: Always have business stakeholders review AI-generated solutions
  3. Iterate with feedback: Use the AI as a starting point, then refine based on domain expertise
  4. Document assumptions: Clearly document any business logic assumptions in your prompts

The Evaluation Crisis: Why 70% of AI Projects Fail

According to McKinsey research, 70–80% of AI-based projects fail to reach production. This isn’t due to technical limitations of AI tools — it’s primarily due to inadequate evaluation and testing processes.

Common failure patterns:

  • Insufficient testing: Teams deploy AI-generated solutions without comprehensive testing
  • Lack of monitoring: No systems in place to detect when AI solutions degrade over time
  • Poor integration: AI solutions don’t integrate well with existing systems and workflows
  • Unrealistic expectations: Teams expect AI to solve problems it’s not suited for

Building robust evaluation processes:

I’ve developed an extensive evaluation framework that addresses these challenges:

class AICodeEvaluator:
def evaluate_generated_code(self, code, requirements):
results = {}

# Functional testing
results['functional'] = self.test_functionality(code, requirements)

# Performance benchmarking
results['performance'] = self.benchmark_performance(code)

# Security analysis
results['security'] = self.analyze_security_issues(code)

# Code quality metrics
results['quality'] = self.assess_code_quality(code)

# Integration testing
results['integration'] = self.test_integration(code)

return self.generate_evaluation_report(results)

This systematic approach catches issues before they reach production and provides confidence in AI-generated solutions.

The Future Landscape: What’s Coming Next

Autonomous Development Agents

The next generation of AI development tools will likely include more autonomous agents capable of:

  • Multi-step problem solving: Breaking down complex requirements into implementation steps
  • Cross-system integration: Working with databases, APIs, file systems, and external services seamlessly
  • Continuous learning: Adapting to your codebase patterns and preferences over time
  • Proactive optimization: Identifying and suggesting improvements without explicit requests

Enhanced Context Understanding

Future AI tools will have much better understanding of:

  • UI rendered output — AI refreshes interface every time change is made and check if it works as expected
  • Business context: Understanding industry-specific requirements and constraints
  • Team dynamics: Adapting to team preferences and working styles
  • Project history: Learning from past decisions and their outcomes
  • Real-time system state: Understanding current system performance and user behavior

Conclusion: Embracing the Augmented Developer Era

The transformation to AI-assisted programming isn’t just a technological shift — it’s a fundamental change in how we think about software development. We’re moving from writing code to orchestrating intelligent systems that can generate, optimize, and maintain code under our guidance.

The developers and teams that will thrive in this new era are those who learn to effectively collaborate with AI tools while maintaining critical thinking about the solutions they generate. This isn’t about replacing human creativity and expertise — it’s about amplifying these qualities with powerful new capabilities.

Key principles for success:

  1. Maintain Agency: You’re still the architect of your solutions. AI tools are powerful assistants, not decision-makers.
  2. Invest in Skills: Effective prompting, evaluation, and integration skills are becoming as important as traditional programming skills.
  3. Build Systematically: Approach AI integration with the same rigor you’d apply to any other major technology adoption.
  4. Stay Curious: The field is evolving rapidly. What works today may be superseded by better approaches tomorrow.
  5. Focus on Value: Use AI tools to solve real problems and improve actual outcomes, not just because they’re novel.

The future belongs to augmented developers who combine human creativity, domain expertise, and critical thinking with AI’s pattern recognition, code generation, and analysis capabilities. By embracing this partnership thoughtfully and systematically, we can build better software faster while maintaining the quality and reliability our users depend on.

Remember:

AI-powered code generation speeds up implementation.

AI can produce correct code much faster than we can analyze.

When AI gets it wrong, we face the challenge of debugging large amounts of code we don’t know.

AI doesn’t always know all the business requirements and conditions for implementing the right solution.

The Iron Man suit is ready. The question isn’t whether you’ll use it — it’s how quickly you’ll master it and what incredible things you’ll build with these new superpowers.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI


Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!


Discover Your Dream AI Career at Towards AI Jobs

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!

Note: Content contains the views of the contributing authors and not Towards AI.