~5m56:39LIVE: Uncle Bob on Software Fundamentals in the Age of AI
Aug 19, 2026
Read: ~5m · You save: 52 min
Uncle Bob on Software Fundamentals in the Age of AI
Uncle Bob Martin on AI's impact on software development. Learn why clean code, fundamentals, and structured design still matter. Dive into AI-powered coding, testing, a
Robert C. Martin, widely known as "Uncle Bob," a veteran programmer with over half a century of experience, discussed the evolving landscape of software development in the era of artificial intelligence. Martin, author of the influential book "Clean Code," shared his insights on how AI agents are impacting programming practices and the enduring importance of fundamental software engineering principles.
Martin's early career began in 1964 at the age of 12 with a programmable model computer. He continued to develop his programming skills through self-study and professional roles, starting his first job at 16 and a full-time programming career at 18. His book, "Clean Code: A Handbook of Agile Software Craftsmanship," has become a cornerstone text for developers seeking to write high-quality, maintainable software.
The Impact of AI Agents on Development
Martin described his initial skepticism towards AI agents, including early versions of Grok and ChatGPT. He found that while these agents could generate code, they often produced "messy" results, requiring significant cleanup. This led him to a realization: AI agents are fast and can perform tedious tasks that humans find burdensome.
This observation prompted Martin to revisit earlier, impractical software development innovations. He recalled "CRAP" (Code Realization Analysis Process), a metric combining code coverage and cyclomatic complexity to identify "crappy" functions, and mutation testing, which involves systematically altering code to ensure test suites fail. Both were too time-consuming for human developers to implement in daily workflows.
Martin now leverages AI agents to run these tools automatically. His current principle is to have agents execute these analyses and cleanup processes, aiming to minimize his direct interaction with the generated code. He verifies the quality through metrics like CRAP scores and spot checks, trusting the agents to handle the code generation and initial quality assurance.
The Necessity of Clean Code and Structure
A key theme in Martin's discussion was the persistent need for well-structured and clean code, even with AI assistance. He argued that messy code, or "dog-doo," can overwhelm AI agents, causing them to enter unproductive loops or even fail entirely. He recounted instances where agents became stuck, inadvertently breaking one part of the code while fixing another, or simply giving up.
Martin contrasted two approaches to guiding AI agents: "steering," which involves providing detailed instructions and rules, and "deterministic tools," which are automated checks that enforce quality standards. He found that AI models often treat detailed instructions as mere guidelines, a phenomenon he attributed to the "lost in the middle" effect within their context windows, where information at the beginning and end of a prompt is prioritized over the middle.
Consequently, Martin advocates for minimizing initial prompts to maximize their impact and relying on deterministic tools for post-generation quality assurance. He noted that while these tools can slow down the agents, they maintain a higher productivity margin compared to human developers.
Multi-Agent Systems and Workflow Design
Martin is exploring multi-agent systems, where specialized agents handle different stages of the development process. This approach offers advantages in parallel processing and context window management. His proposed workflow includes:
- Specifier Agent: Converts human-written requirements into Gherkin (Given-When-Then) acceptance tests and QA procedures.
- Coder Agent: Writes unit tests and production code to implement the specified story, ensuring Gherkin tests pass.
- Cleaner Agent: Runs CRAP analysis and general code reviews to clean up the mess left by the coder agent.
- Hardener Agent: Executes mutation testing to identify and fix surviving mutants, ensuring comprehensive test coverage.
- QA Agent: Transforms QA procedures into executable scripts to validate system functionality with deterministic results.
This multi-stage process, while taking longer than a single agent's output, is still faster than human development cycles and yields higher quality results. Martin emphasized that this is an investment in the codebase's long-term health.
Strategic vs. Tactical Programming and Learning
Martin distinguished between tactical programming (executing specific tasks) and strategic programming (directing the overall course). He believes AI agents excel at tactical tasks but struggle with strategic planning. For aspiring developers, he recommends a rigorous learning path:
- Write Code: Spend significant time writing code to understand the fundamentals and the challenges AI agents face.
- Be Treated as an Agent: New developers in AI-heavy environments should be assigned tasks similar to those given to agents, subjected to deterministic tools, and expected to be initially unproductive while learning.
- Understand the Fundamentals: Gain a deep understanding of low-level concepts like assembly language to grasp what happens "behind the scenes."
- Study Foundational Literature: Read classic software engineering books from authors like Tom DeMarco and Ed Yourdon to develop a sense for strategic thinking, filtering out archaic elements.
Martin stressed that software fundamentals remain crucial because they provide the means to organize the inherent complexity of software, a complexity that even AI models need to manage. He believes those who dismiss fundamentals will eventually learn their importance the hard way.
The Enduring Relevance of Fundamentals
Martin concluded by drawing parallels to historical technological advancements, such as the introduction of compilers and higher-level programming languages. Each innovation was met with concerns about job displacement and the devaluation of existing skills. However, he argued that fundamental principles persist because they address the core challenge of managing complexity.
He stated that software is arguably the most complicated endeavor humans have undertaken. Fundamentals, therefore, are essential for organizing this complexity in a way that is comprehensible to both humans and AI models, which are, after all, modeled after human cognition. Martin predicts that those who disregard these fundamentals will eventually encounter limitations, just as he has observed AI agents hitting a "wall."
Uncle Bob's Programming Journey
Uncle Bob introduces himself, sharing his long history as a programmer starting in 1964 at age 12. He recounts early programming experiences with model computers and learning languages like Fortran and Cobol, writing programs on paper. He began his professional career at 16 and has been programming for over 50 years.
- Robert C. Martin (Uncle Bob) has been a programmer for over half a century.
- He started programming in 1964 at the age of 12.
- His first program was on a model computer using pegs and tubes.
- He learned programming languages like Fortran and Cobol by reading books.
- He wrote programs on paper and executed them mentally.
- Began professional coding at 16 and has been a programmer ever since.
Introduction to AI and Early Experiences
Uncle Bob discusses his influential book 'Clean Code' and its impact. He then shares his initial surprise and exploration of AI tools like ChatGPT and Grok around late last year. He describes his early experiences using AI agents for coding, noting they were fast but often produced messy code ('dog dew') that required significant cleanup, making him slower.
- 'Clean Code' is a highly influential and frequently quoted book in software engineering.
- Uncle Bob began experimenting with AI tools like ChatGPT and Grok around Christmas last year.
- Initial AI coding attempts were fast but generated messy code ('dog dew').
- Using AI agents for coding initially made him slower due to the need for cleanup.
- He found AI agents to be fast but frustrating due to the mess they created.
Early Innovations: CRAP and Mutation Testing
Uncle Bob reflects on two early, impractical software innovations: CRAP (Code Coverage, Cyclomatic Complexity) and mutation testing. He explains how CRAP scores code quality based on coverage and complexity, and mutation testing involves altering code to see if tests fail. While recognizing their value, he found them too time-consuming for practical use in the early 2000s.
- CRAP (Code Coverage, Cyclomatic Complexity) was an early metric for code quality.
- Mutation testing involves altering code (e.g., flipping signs) to check test suite effectiveness.
- Both CRAP and mutation testing were considered great ideas but impractical due to time constraints in the early 2000s.
- Running these tools on large projects took excessive time (e.g., overnight for mutation testing).
- These tools were set aside due to their impracticality at the time.
AI Enables Practical Application of Old Tools
Uncle Bob explains how AI's speed and willingness to perform tedious tasks make these previously impractical tools (CRAP, mutation testing) viable again. He now uses AI agents to run these checks automatically, cleaning up the code and ensuring test coverage. His current principle is to let agents handle the tedious work, allowing him to focus on higher-level tasks and verification.
- AI agents' speed and willingness to do boring work make CRAP and mutation testing practical.
- AI agents can now run these tools automatically, cleaning up code and ensuring test coverage.
- Uncle Bob's current principle: let agents handle tedious tasks, focus on verification.
- He aims to reach a state where he doesn't need to look at the generated code directly.
- Verification involves checking CRAP scores, spot-checking code, and running other tests.
Why Bad Code Still Matters with AI
The discussion addresses why 'bad code' (dog dew) matters even with fast AI. Uncle Bob explains that AI agents, like humans, can become overwhelmed by messy code, leading to circular logic, errors, and eventual failure or giving up. This necessitates automated checks rather than just 'steering' the AI with instructions, as instructions can be lost in the AI's context window.
- Messy code ('dog dew') can overwhelm AI agents, causing them to slow down, make errors, or fail.
- AI agents can get stuck in loops, inadvertently breaking code while trying to fix it.
- The threshold for messy code exists for AI, similar to humans.
- Deterministic tools (like CRAP, mutation testing) are preferred over 'steering' instructions.
- Instructions can be lost in the AI's context window ('lost in the middle' phenomenon).
Steering vs. Automated Checks: The 'Lost in the Middle' Problem
Uncle Bob contrasts 'steering' AI with automated checks. He found that AI agents treat detailed instructions like 'guidelines' (Pirates of the Caribbean metaphor) and can lose information from long prompts due to the 'lost in the middle' phenomenon in their context window. Deterministic tools, however, remain reliable and are applied after the AI generates code.
- AI agents treat detailed instructions as 'guidelines' rather than strict rules.
- The 'lost in the middle' phenomenon affects AI context windows; early/late information is prioritized.
- Long prompt documents get their middle sections ignored by the AI.
- Deterministic tools (automated checks) do not suffer from the 'lost in the middle' issue.
- The strategy is to minimize initial prompts and rely on post-generation automated checks.
Multi-Agent Systems: Balancing Speed and Quality
The conversation explores the trade-off between productivity and quality when using automated checks. While these checks slow down AI agents, they ensure higher quality. Uncle Bob aims to maintain a productivity margin (2-4x faster than humans) while improving quality. He describes a multi-agent system where specifiers, coders, cleaners, hardeners, and QA agents work sequentially, sacrificing some speed for significantly better results.
- Automated checks sacrifice AI productivity for higher code quality.
- The goal is to maintain a productivity margin (e.g., 2-4x) while improving quality.
- A multi-agent system involves sequential roles: specifier, coder, cleaner, hardener, QA.
- This pipeline takes about an hour for a task a single agent might do in 5 minutes with questionable results.
- The multi-agent approach offers a significant productivity and quality improvement over human developers.
Detailed Multi-Agent Pipeline
Uncle Bob discusses the advantages of multi-agent systems: parallel processing and better context window management by focusing agents on single tasks. Disadvantages include startup times. He outlines his specific pipeline: a specifier creates Gherkin/QA docs, a coder writes unit tests and code, a cleaner runs CRAP analysis, a hardener performs mutation testing, and a QA agent executes tests.
- Multi-agent systems allow parallel execution and better context window control.
- Disadvantages include agent startup time and context re-initialization.
- Specifier: Creates Gherkin (Given-When-Then) and QA procedure documents.
- Coder: Writes unit tests and implementation code, ensuring Gherkin tests pass.
- Cleaner: Runs CRAP analysis and general code review.
- Hardener: Executes mutation testing rigorously.
- QA Agent: Converts QA procedures into executable scripts.
AI Trajectory and Context Window Dynamics
The concept of 'trajectory' in AI context windows is discussed, where initial instructions influence subsequent AI behavior. Uncle Bob agrees, noting that AI can get confused by unrelated topics entering the context. He emphasizes keeping the AI's direction clear and consistent. The conversation also touches on the 'smart zone' and 'dumb zone' of context windows, where early tokens have more influence.
- The 'trajectory' of AI behavior is influenced by initial instructions and context.
- Unrelated topics entering the context window can confuse the AI.
- Maintaining a clear and consistent direction for the AI is crucial.
- The 'smart zone' (early context) and 'dumb zone' (middle context) affect AI attention.
- Deterministic tools help maintain trajectory and avoid AI confusion.
The Importance of Module Design for AI
Uncle Bob explains that well-designed modules with disciplined interfaces are crucial for both humans and AI. Compartmentalization helps AI focus, preventing confusion. He contrasts this with shallow modules having wide interfaces. He also notes that AI pays attention to interface names and structure, and reads tests to understand code, making good structure beneficial.
- Well-designed modules with clear interfaces are essential for AI comprehension.
- Compartmentalization helps AI focus on specific tasks, avoiding confusion.
- Deep modules (small interface, hidden complexity) are beneficial for AI.
- AI models pay attention to interface names and code structure.
- AI models read tests to understand code functionality.
Adapting Clean Code Principles for AI
Regarding changes to his 'Clean Code' principles, Uncle Bob notes that AI agents can handle higher complexity thresholds than humans. He adjusts CRAP scores (e.g., from 4 to 6 or 8) to allow larger functions. He also states that human disciplines like Test-Driven Development (TDD) shouldn't be strictly enforced on AI, as AI behaves differently; allowing AI to write a function then its test is more natural for them.
- AI agents can handle higher complexity thresholds than humans.
- CRAP score thresholds can be raised for AI (e.g., from 4 to 6 or 8).
- Human disciplines like TDD are not necessarily optimal for AI.
- AI agents naturally tend to write a function then its corresponding test.
- It's unwise to impose human disciplines on AI; focus on human values and adjusted thresholds.
Agile vs. Spec-Driven Development with AI
Uncle Bob rejects heavy upfront planning ('spec-driven development') with AI, comparing it to the failed waterfall model. He found that AI agents struggle to follow rigid, extensive plans, leading to constant revisions. He advocates for an agile approach: develop a few stories, review architecture, then proceed iteratively, acknowledging that some manual organization might still be needed.
- Heavy upfront planning ('spec-driven development') with AI is prone to failure, similar to the waterfall model.
- AI agents struggle to adhere to rigid, detailed plans.
- The agile approach (iterative development with feedback) is more suitable for AI.
- Develop a few stories, review architecture, then iterate.
- Manual organization might still be necessary at the end of development cycles.
The Enduring Importance of Software Fundamentals
Uncle Bob argues that software fundamentals remain critical because software is inherently complex. Fundamentals provide the structure to manage this complexity for both humans and AI models. He dismisses the idea that fundamentals are obsolete due to AI, stating that those who ignore them will eventually learn their importance the hard way.
- Software is the most complex thing humans attempt to do.
- Fundamentals organize complexity, making it conceivable for humans and AI.
- AI models are still modeled after human cognition, hence fundamentals apply.
- The belief that fundamentals don't matter with AI is misguided.
- Those who ignore fundamentals will eventually face consequences.
Learning Programming in the Age of AI
The conversation draws parallels between AI and previous abstraction layers (compilers, assembly). Each advancement initially sparked fears of obsolescence, but fundamentals persisted. Uncle Bob advises aspiring programmers to gain deep understanding by writing code, starting from basics (binary, assembly) up to AI tools, and suggests treating new developers like agents initially to learn the process.
- AI represents the latest abstraction layer in computing, similar to compilers or assembly language.
- Past abstraction layers initially caused fears of job loss and skill devaluation.
- Fundamentals remain relevant across different abstraction levels.
- Aspiring programmers should learn by writing code, starting from low-level concepts.
- New developers in AI-heavy environments should initially be treated like agents, performing tactical tasks.
Developing Strategic Programming Skills
Uncle Bob believes learning strategic programming requires deep understanding gained through hands-on experience. He suggests new programmers should spend time writing code and then be treated like agents, performing tactical tasks under supervision. This 'gauntlet' approach, though initially unproductive, builds crucial understanding. He recommends studying older books on software engineering principles for foundational knowledge.
- Strategic programming requires deep understanding, best gained through practice.
- New programmers should write code extensively and perform tactical tasks like agents.
- This 'gauntlet' experience, though slow, builds essential skills.
- Older books (e.g., by Tom DeMarco, Ed Yourdon) offer valuable foundational knowledge.
- Learning involves both theoretical study and practical, hands-on experience.
Fundamentals Remain Crucial Despite AI
Uncle Bob argues that software fundamentals are essential for organizing complexity. He dismisses claims that they are obsolete due to AI, stating that those who ignore them will learn their importance the hard way. He likens AI to previous abstraction layers, where fears of obsolescence proved unfounded, and core principles remained vital.
- Software fundamentals are key to managing complexity in software development.
- AI does not negate the need for these fundamentals.
- Ignoring fundamentals will lead to negative consequences, albeit potentially delayed by AI's capabilities.
- Historical parallels exist with previous technological advancements (e.g., compilers, assembly).
- Core principles remain relevant regardless of the tools or abstraction layers used.