# "Software Fundamentals Matter More Than Ever" — Matt Pocock

Matt Pocock

AI Engineer Europe 2026

[Talk page](https://ai.engineer/talks/v4F1gFy-hqg-software-fundamentals-for-ai-coding) · [Video](https://www.youtube.com/watch?v=v4F1gFy-hqg)

## Why Software Fundamentals Matter More in the Age of AI Coding

Matt Pocock argues that AI-assisted development depends on shared design concepts, precise domain language, fast feedback loops, testable architecture, and sustained human ownership of system design.

![Selected presentation frame from "Software Fundamentals Matter More Than Ever" — Matt Pocock at 36 seconds](https://ai.engineer/api/talk-essay-media/2bfa9e9106c7a5bdd6646f4aa464ba354e3c67c6793c9f6202caebc25fa2e3bb)

Why Software Fundamentals Matter More in the Age of AI Coding

### Generated code is not the same as a maintainable system

[0:19](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=19s)

The **specs-to-code** approach promises that developers can describe an application, generate its implementation, and resolve future problems by revising the specification instead of examining the code. Matt Pocock found that repeated generation produced progressively worse implementations. His objection is not to using AI for development, but to treating the underlying codebase as something that can safely manage itself. [0:19](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=19s) [1:27](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=87s)

Drawing on John Ousterhout’s A Philosophy of Software Design and The Pragmatic Programmer, Pocock frames the problem in terms of **complexity** and **software entropy**. A poor codebase is difficult to understand or change without introducing bugs, while a good one remains adaptable. When each change is made without considering the overall system, the design degrades incrementally—even if individual requests appear to have been fulfilled. [2:31](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=151s) [3:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=215s)

That degradation becomes particularly costly with AI because the quality of the existing codebase determines how effectively AI can contribute to it. Pocock’s central claim is that quickly producing code does not make code cheap: difficult-to-change software prevents teams from realizing the benefits of AI-assisted development. The practical implication is that **software fundamentals** become more valuable as implementation becomes easier to generate. [3:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=215s)

![Selected presentation frame from "Software Fundamentals Matter More Than Ever" — Matt Pocock at 187 seconds](https://ai.engineer/api/talk-essay-media/564224775dca3d389d1597bf95c7cfeb029026cc8d90cf51bb35c438e0f2c2de)

Generated code is not the same as a maintainable system

- Repeated specs-to-code generation can progressively degrade a codebase when nobody examines its implementation.
- Complexity makes software difficult to understand or modify without introducing bugs.
- Software entropy accumulates when individual changes ignore the design of the whole system.
- Maintainable codebases help AI contribute effectively, making software fundamentals more valuable.

### Establish a shared design concept before committing to a plan

[4:41](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=281s)

When an AI system builds something different from what its user intended, Pocock interprets the failure as a familiar **requirements-gathering** problem. The developer and the model do not yet share the same understanding of the intended outcome. Borrowing from Frederick P. Brooks’s The Design of Design, he describes a **design concept** as the evolving, intangible understanding held between collaborators, rather than a document that can simply be written once and treated as complete. [4:41](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=281s)

His proposed response is a skill called **Grill Me**, which has the AI repeatedly interview the developer about the plan, explore branches of the design, and resolve dependencies among decisions. Pocock reports that this process can involve dozens of questions and sometimes as many as 100. The resulting discussion can then be converted into a product requirements document or, for smaller changes, directly into issues for an agent to implement. [5:44](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=344s) [6:49](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=409s)

Pocock contrasts this approach with the default plan mode in Claude Code, which he personally considers too eager to create a planning artifact and begin implementation. The distinction is not that plans or requirements documents are unnecessary; it is that a durable plan becomes more useful after the human and AI have developed a shared understanding of what the work is supposed to accomplish. [5:44](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=344s) [6:49](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=409s)

![Selected presentation frame from "Software Fundamentals Matter More Than Ever" — Matt Pocock at 355 seconds](https://ai.engineer/api/talk-essay-media/34b06ce5b8f1c854124b72e8f6736b30fdc9a90b677e27c660828c6b95a58818)

Establish a shared design concept before committing to a plan

- Unexpected AI implementations often reveal a requirements-gathering failure and an incomplete shared design concept.
- Grill Me prompts the AI to interview the developer, explore design branches, and resolve dependent decisions.
- Convert the resulting shared understanding into a product requirements document or directly into implementation issues.
- Establish the shared design concept before committing to a planning artifact and implementation.

Shared understanding before implementation
Repeated questioning resolves design decisions before the conversation becomes an actionable artifact.
- Interview — Question every aspect of the plan.
- Resolve decisions — Explore design branches and dependencies.
- Shared understanding — Align on the intended design concept.
- PRD or issues — Convert the discussion into actionable requirements.
- Agent implementation — An agent picks up the resulting issues.
- Interview → Resolve decisions (explores)
- Resolve decisions → Shared understanding (aligns)
- Shared understanding → PRD or issues (produces)
- PRD or issues → Agent implementation (assigns issues)

### Give the model the same language used by the codebase

[6:49](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=409s)

Excessively verbose or misaligned AI responses can reflect a **language gap** rather than a purely stylistic problem. Pocock compares the situation to a developer working with a domain expert: if the two parties use different terminology, the developer may translate requirements into code that neither side fully understands. He turns to **domain-driven design**, or **DDD**, and its concept of a **ubiquitous language** to bring conversations, code, and domain concepts into alignment. [6:49](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=409s) [7:55](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=475s)

Pocock’s ubiquitous language skill scans a codebase for terminology and produces a Markdown document containing tables of shared terms. Both the developer and the AI can consult that vocabulary during planning and implementation. Based on his reading of the model’s thinking traces, he reports that shared terminology improves planning, makes the model’s reasoning less verbose, and helps implementations stay closer to the intended design; he also notes that he is still exploring DDD rather than presenting himself as having exhausted the subject. [7:55](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=475s) [8:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=537s)

![Selected presentation frame from "Software Fundamentals Matter More Than Ever" — Matt Pocock at 501 seconds](https://ai.engineer/api/talk-essay-media/b7baa14dd1c554e0555b13c588e9490d658bc2be50c858cf8d29ba4b44d36c9b)

Give the model the same language used by the codebase

- Verbose or misaligned AI communication can indicate that the developer and model lack shared terminology.
- Domain-driven design uses a ubiquitous language to align code, developer conversations, and domain concepts.
- The ubiquitous language skill scans the codebase and compiles its terminology into shared Markdown tables.
- Shared terminology can improve planning, reduce verbose model reasoning, and align implementation with the intended design.

### Make feedback frequent, then design code that can actually be tested

[8:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=537s)

Even when the AI understands the intended feature, the implementation may still fail. Pocock recommends **feedback loops** that include static types, browser access for front-end development, and automated tests. His concern is that AI systems often generate large amounts of code before checking whether the result type-checks, passes tests, or behaves correctly in the browser. In that situation, implementation moves faster than the available feedback can reliably guide it. [8:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=537s) [10:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=604s)

His proposed discipline is **test-driven development**, or **TDD**: write a test, make it pass, and then refactor while considering the design. This sequence constrains the model to smaller steps, but Pocock emphasizes that testing remains difficult because decisions about unit size, mocking, and which behaviors to verify are interconnected. Broad tests can become flaky, while narrower tests introduce their own dependency and mocking decisions. [10:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=604s) [11:08](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=668s)

The effectiveness of those feedback loops depends on the architecture underneath them. Pocock argues that **deep modules** provide substantial functionality behind simple interfaces, whereas **shallow modules** offer comparatively little functionality through more complicated or fragmented boundaries. A codebase filled with small, interconnected modules can be difficult for an AI system to navigate and understand; clear, deeper boundaries make it easier to locate relevant behavior and test it through a stable interface. [12:09](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=729s) [13:05](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=785s) [14:14](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=854s)

![Selected presentation frame from "Software Fundamentals Matter More Than Ever" — Matt Pocock at 770 seconds](https://ai.engineer/api/talk-essay-media/e6525cdcfe8c75eee7d2dddb0cef9b22ae75afd4f706114e951c24f1618c7c19)

Make feedback frequent, then design code that can actually be tested

- Use static types, browser access, and automated tests to give AI frequent implementation feedback.
- TDD constrains implementation to small steps: write a test, make it pass, and refactor the design.
- Choose test scope, mocked dependencies, and verified behaviors together because these decisions are interconnected.
- Deep modules hide substantial functionality behind simple interfaces, making behavior easier to locate and test.

Small-step test-driven development
A test guides implementation before refactoring improves the surrounding design.
- Write a test — Specify the next behavior first.
- Make it pass — Implement the behavior in a small step.
- Refactor — Improve the code and consider its design.
- Write a test → Make it pass (guides implementation)
- Make it pass → Refactor (precedes design improvement)

### Own the interfaces, delegate selectively, and invest in design continuously

[13:05](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=785s)

Pocock proposes improving an existing architecture by identifying related pieces of code and gathering them behind **deep module** boundaries. The resulting modules can be tested through their interfaces, creating an architecture that supports TDD instead of fighting it. He also draws a division of responsibility: humans should exercise substantial control over interface design, while AI can take on more of the implementation inside those boundaries. [13:05](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=785s) [14:14](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=854s)

This arrangement also addresses the cognitive fatigue that can accompany faster AI-assisted shipping. Pocock describes treating some deep modules as **gray boxes**: understand their purpose, design and verify the external interface, and avoid scrutinizing every implementation detail. That delegation has limits. He explicitly warns that more critical areas, such as financial functionality, may require greater attention than less critical application modules. [15:17](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=917s)

The strategy only works if the developer maintains an accurate mental map of the system. Pocock argues that modules and interfaces should become part of the team’s ubiquitous language and appear explicitly in product requirements documents, including descriptions of how those boundaries will change. Drawing on Kent Beck, he presents ongoing investment in system design as the essential counterweight to a specs-to-code process that ignores architecture: AI can act as a capable tactical programmer, but the human must retain **strategic ownership** of the system. [16:27](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=987s) [17:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1055s)

![Selected presentation frame from "Software Fundamentals Matter More Than Ever" — Matt Pocock at 815 seconds](https://ai.engineer/api/talk-essay-media/6003b8f8b1617923549357654f40919c5b5ff2997aa624dd3c8d60a20a34d631)

Own the interfaces, delegate selectively, and invest in design continuously

- Group related code into deep modules and verify their behavior through simple external interfaces.
- Keep humans responsible for interface design while delegating internal implementation selectively to AI.
- Treat less critical modules as gray boxes, but scrutinize sensitive functionality such as finance more closely.
- Include module boundaries and interface changes in shared terminology and PRDs while maintaining strategic ownership of system design.

## Key takeaways

- Fast code generation does not eliminate the cost of **complexity**: repeatedly changing software without preserving its overall design can make the codebase harder for both humans and AI to modify. [1:27](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=87s) [2:31](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=151s) [3:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=215s)
- Develop a shared **design concept** through sustained questioning before turning the discussion into a requirements document, implementation plan, or agent-ready issues. [4:41](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=281s) [5:44](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=344s) [6:49](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=409s)
- Use a documented **ubiquitous language** so the developer, AI system, and codebase refer to domain concepts consistently throughout planning and implementation. [7:55](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=475s) [8:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=537s)
- Combine static types, browser access where appropriate, automated tests, and **TDD** so the model receives feedback in small increments instead of validating a large implementation only afterward. [10:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=604s) [11:08](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=668s)
- Prefer **deep modules** with simple, testable interfaces; delegate implementation selectively while maintaining closer oversight of critical functionality. [12:09](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=729s) [13:05](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=785s) [14:14](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=854s) [15:17](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=917s)
- Preserve human **strategic ownership** by explicitly tracking modules, interfaces, and architectural changes as part of everyday planning and system design. [16:27](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=987s) [17:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1055s)

## Slides

### AI Engineer Europe

The opening card displays the AI Engineer Europe logo.

[0:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) [AI Engineer Europe logo in white on black.](https://assets.ai.engineer/sites/aiecode2025/sha256/8ff101b24c02f7e85087bb029657bc6eb7970e19474b26755f1442a0c085f7c6.webp)

AI Engineer
EUROPE

### Presenting Sponsor

Google DeepMind is the presenting sponsor.

[0:05](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=5s) [Presenting sponsor Google DeepMind.](https://assets.ai.engineer/sites/aiecode2025/sha256/64dbbd38edf0b5a4413ca31c774c8fb0166787f0a3874001d145da8aa6240660.webp)

PRESENTING SPONSOR

Google DeepMind

### Platinum Sponsors

[0:10](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=10s) [Platinum sponsors Braintrust, WorkOS, and OpenAI.](https://assets.ai.engineer/sites/aiecode2025/sha256/26485f11edab7fc7d855d387ac10786e076ee06388b604934661e0dbfed3b9db.webp)

PLATINUM SPONSORS

Braintrust
WorkOS
OpenAI

### How do I fix the compiler?

Pocock asks how to stop the LLM producing worse code, then turns to software design principles to explain what a good codebase looks like.

[2:26](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=146s) [Slide asks, “How do I fix the compiler?” alongside the speaker.](https://assets.ai.engineer/sites/aiecode2025/sha256/19a4ebd7bc2820580f39d005cefd914a8f56eaa310047635d7aa4dc48bc0339a.webp)

How do I fix the compiler?

Interface text:
AI Engineer EUROPE
PRESENTED BY
Google DeepMind
WHY SOFTWARE FUNDAMENTALS MATTER MO[illegible]
MATT POCOCK / Author
AIhero

### Failure Mode #1

Pocock frames the gap between an idea in your head and what the AI builds as a communication problem: the conversation is also how the AI gathers requirements.

[4:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=262s) [Slide reads, “Failure Mode #1: The AI didn’t do what I want.”](https://assets.ai.engineer/sites/aiecode2025/sha256/ecadb44f598d2077ab4494949b5847fc261d96880b4ad30d718b9e0c11790823.webp)

Failure Mode #1
The AI didn’t do what I want

AI Engineer
Engineering the future of AI

### No-one knows exactly what they want

Pocock frames prompting as requirements gathering: the AI has to work out what the user needs across a communication barrier.

[4:52](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=292s) [Slide reads, “No-one knows exactly what they want,” attributed to David Thomas and Andrew Hunt.](https://assets.ai.engineer/sites/aiecode2025/sha256/090c72c0e8059155574b2c0cfd761115f27784d37ed34656bf01441c51306f02.webp)

No-one knows exactly what they want

- David Thomas & Andrew Hunt

Interface text:
AI Engineer
Engineering the future of AI

Stage backdrop:
WorkOS
AI Engineer Europe
Tessl
arize

### Ubiquitous Language

Pocock’s skill scans the codebase and writes terminology tables to a Markdown file. He keeps it open while planning with AI and reports that it helps align implementation with the plan.

[9:18](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=558s) [Slide displaying UBIQUITOUS_LANGUAGE.md.](https://assets.ai.engineer/sites/aiecode2025/sha256/e3e66a79f474cb70099d0280ca082fdc6a679207c56279374d67719f0db28d13.webp)

UBIQUITOUS_LANGUAGE.md

AI Engineer
Engineering the future of AI

### Create a Shared Language With the AI

Pocock says a shared language improves planning, makes the AI’s thinking less verbose, and helps align implementation with the plan.

[9:40](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=580s) [Tip 2: Create a shared language with the AI.](https://assets.ai.engineer/sites/aiecode2025/sha256/aaef0de9e879d58e40da20640600e19fcc87e08c8e1f916ab7defc12665a7cdc.webp)

Tip #2
Create A Shared Language With The AI

Interface text:
AI Engineer
Engineering the future of AI

### Code That Doesn’t Work

Pocock introduces a third failure mode: the AI builds the intended thing, but it doesn’t work. He recommends feedback loops to help catch problems.

[9:52](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=592s) [Failure mode 3: Code that doesn’t work.](https://assets.ai.engineer/sites/aiecode2025/sha256/c456f55cb4582abd23a612ed29afdbf1f9a02f9b00536706fdddc2c24600ca37.webp)

Failure Mode #3
Code That Doesn’t Work

AI Engineer
Engineering the future of AI

### Feedback Loops

Pocock recommends static types, browser access, and automated tests to catch broken AI-generated code. He warns that LLMs often write too much before checking feedback; test in small steps.

[10:02](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=602s) [Feedback loops: static types, browser access, and automated tests.](https://assets.ai.engineer/sites/aiecode2025/sha256/e54a99657487f80592a9eef696146d1f9ecbae9307e0e93b983ef4eec64958c7.webp)

Feedback Loops

- Static Types
- Browser Access
- Automated Tests

Interface text:
AI Engineer
Engineering the future of AI

### Deepen Modules

Pocock’s /improve-codebase-architecture skill looks for related code and wraps it in a deep module, with a simple interface that can be tested.

[14:28](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=868s) [Tip 4: Use /improve-codebase-architecture to deepen modules.](https://assets.ai.engineer/sites/aiecode2025/sha256/b6b630bac3bde66d8315d4a3def50657df6d73708d0f2934bec6b27b8ea5e4c6.webp)

Tip #4
Use /improve-codebase-architecture
to deepen modules

AI Engineer EUROPE
arize

AI Engineer
Engineering the future of AI

### Failure Mode #6: My Brain Hurts

Shipping more code can outrun a developer’s ability to keep up. Pocock suggests treating less critical deep modules as gray boxes, focusing on their purpose and testable interface.

[15:02](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=902s) [Slide titled “Failure Mode #6: My Brain Hurts.”](https://assets.ai.engineer/sites/aiecode2025/sha256/9f2a77746d54d19c9a3de11c6034b90cb081375cad83d7265eb9ffab4011318d.webp)

Failure Mode #6
My Brain Hurts

Interface text:
EUROPE
AI Engineer
Engineering the future of AI

## Full transcript

[0:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=0s) [upbeat music] Hello, everyone.

[0:15](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=15s) Having a good conference so far? Yeah. Are you having a good conference so far? Yeah. [cheers] Good. Wonderful.

[0:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=22s) I have a message for you that I hope will be, um, a comforting message for folks who believe that, uh, their skill set is no longer worth anything in this new age, which is I believe that software fundamentals matter now more than they actually ever have.

[0:39](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=39s) And I'm a teacher, and I've been recently teaching a course called Claude Code for Real Engineers. Nice and provocative. And in the process of kind of working on this course, I had to come up with a curriculum about AI coding, which is a bit of a nightmare because things are changing all the time, right?

[1:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=60s) AI is a whole new paradigm. We need to chuck out all of the old rules, surely, so that we can bring in the new stuff.

[1:08](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=68s) And there's a kind of movement that has come up around this, which is the specs-to-code movement, and the specs-to-code movement says that, okay, you can write a specification about how an application is supposed to work, then you can use AI to turn it into code.

[1:23](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=83s) If there's a problem with the application, you then go back to the spec. You don't really look at the code. You just change the spec, you run the compiler again, and you end up with more code.

[1:34](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=94s) Raise your hand if you've heard of that.

[1:37](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=97s) Keep your hand raised if you've tried it. Okay. I've tried it too. You can put your hands down. And what I noticed was I would run it, and I would try not to look at the code,

[1:48](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=108s) but I would look at the code, and I realized I would get code out first of all, and then I would run it, and I would get worse code, and I did it again, I got even worse code, and I got it again.

[1:58](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=118s) I kept running the compiler, kept running the compiler, and I would just end up with garbage. [scoffs]

[2:03](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=123s) You know, raise your hand if that's happened to you. Yes. I don't think this works. The idea that we can just ignore the code and just have the code, let it manage itself, is just sort of vibe coding by another name.

[2:16](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=136s) And I didn't believe that back then. I thought, "Okay, how do I fix the compiler? How do I make it so that it doesn't produce bad code each time or worse code?"

[2:25](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=145s) And so I thought, "Okay, I need to explain to the LLM in English what a good code base looks like." Let me dig out one of my old favorite books, which is A Philosophy of Software Design by John Ousterhout.

[2:37](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=157s) Go on Amazon, get it. Um, and he has a definition for what bad code looks like. He calls it complex code. Complexity is anything related to the structure of a software system that makes it hard to understand and modify the system, right?

[2:53](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=173s) So a, a bad code base is a code base that's hard to change. If you can't change a code base without causing bugs, then it's a bad code base.

[3:01](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=181s) Good code bases are easy to change. So I thought, "Ooh, that was good. Let's try another book. Let's try The Pragmatic Programmer." Go on Amazon, get it.

[3:10](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=190s) They have a whole chapter on something called software entropy, and this is exactly what I was seeing. Entropy is the idea that things tend towards, um, disaster and, uh, floating away from each other and collapse, and this is exactly how most software systems behave too, is that every time you make a change to a code base, if

[3:28](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=208s) you're only thinking about that change, not thinking about the design of the whole system, your code base is gonna get worse and worse and worse, and that's what I was seeing.

[3:37](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=217s) Everything inside the specs to code idea that you just run the compiler again and again was making worse code. Now, there's an idea that sort of drives the specs to code movement, which is that code is cheap.

[3:50](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=230s) Raise your hand if you've heard that phrase before, that code is cheap. Yeah.

[3:55](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=235s) Well, I don't think this is right. I think code is not cheap. In fact, bad code is the most expensive it's ever been because if you have a code base that's hard to change, you're not able to take all of the bounty that AI can offer 'cause AI in a good code base actually does really, really well.

[4:15](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=255s) And this means good code bases matter more than ever, which means software fundamentals matter more than ever. That's the thesis of this talk.

[4:22](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=262s) So let's actually get into practical stuff. I'm gonna talk about different failure modes that you may have experienced or you may not have experienced yet with AI and how you can avoid them by just going back to old books and looking at good software practices.

[4:34](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=274s) Sound good? So the first one is that the AI didn't do what I wanted. You know? I, I thought I had a good idea in my head, and the AI just did something totally different, or it did some, uh, like specs that I...

[4:47](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=287s) You know, it just made something I didn't want. Raise your hand if you've hit this mode.

[4:51](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=291s) Cool. Okay. Well, this is what they say in The Pragmatic Programmer, is that no one knows exactly what they want. It's that you and the AI, there is a communication barrier there, right?

[5:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=304s) And so when you're talking to the AI, that's kind of like the AI doing its requirements gathering. It's basically t- working out from you what it is that you need.

[5:12](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=312s) And I realized that there was another book, Frederick P. Brooks, The Design of Design, and it talks about this idea called the design concept. It's that when you have more than one person designing something together, you have this idea sort of floating between you, this ephemeral idea of the thing that you're building, and that thing that you're

[5:32](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=332s) building or the idea of it is called the design concept. It's not an asset. It's not something you can put in a markdown file. It is the invisible sort of theory of what you're building.

[5:44](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=344s) And so I thought, "Okay, that's what's going on. Me and the AI don't share a design concept." So I came up with a skill. This skill is very, very simple.

[5:53](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=353s) It's called Grill Me, and it looks like this. Interview me relentlessly about every ax- aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, which is another thing from Frederick P.

[6:06](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=366s) Brooks, resolving dependencies between decisions one by one. This skill is like, uh, the repo containing this skill has, like, thirteen thousand stars or something. Like, it just went nuts, went viral.

[6:17](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=377s) People love this thing. It-- these couple of lines means the AI asks you, like, forty questions, sixty questions. I've had it ask, uh, people a hundred questions before it's satisfied they've reached a shared understanding.

[6:29](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=389s) And it means it turns the a-AI into a kind of adversary, where it's just continually pinging you ideas and trying to reach a shared understanding. And that means that the conversation that you then generate, you can take that and turn it into a product requirements document or something.

[6:45](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=405s) Or if it's a small change, you can just, uh, do, uh, turn it directly into issues.

[6:52](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=412s) And then your AFK agent will then pick it up. And don't at me on this, but I personally believe this is better than the default plan mode in the, the tool that I use, which is called Claude Code.

[7:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=424s) Plan mode is extremely eager to create an asset. It really wants to, uh, just create a plan and start working. Whereas I think it's a lot nicer to reach a shared design concept first.

[7:18](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=438s) So that's tip number one. Now, failure mode number two is that the AI is just way too verbose. It's like you're almost talking across purposes with the AI. Raise your hand if you, uh, feel this, if you ever experienced that failure mode.

[7:32](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=452s) Yeah. It's kind of like the AI is, like, talking, just using too many words to try to communicate what it's doing. It's not like you're talking, uh, using the same language.

[7:42](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=462s) And this to me felt very, very familiar, right? If you've ever been a developer for a long time and you've worked with, let's say, domain experts, someone building an application, um, let's say the domain expert wants you to build something on, uh, I don't know, microchips.

[7:55](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=475s) You have no idea what microchips are. You need to establish some kind of shared language, right? Because otherwise they're gonna be using terms you don't understand. You're gonna be translating that into code that maybe you don't even understand, and certainly the domain expert won't.

[8:07](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=487s) And so there's this kind of language gap between you and the domain expert. And so I went back to domain-driven design, DDD. This is something I'm still kind of on the edge of exploring, but everything I'm reading about DDD is just music to my ears.

[8:24](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=504s) I freaking love it. And DDD has a concept of a ubiquitous language.

[8:30](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=510s) With a ubiquitous language, conversations among developers and expressions of the code and conversations with domain experts are all derived from the same domain model. It's essentially a markdown file full of a list of terms that you and the AI have in common, and you really focus on those terms, and you really make sure that they're aligned with

[8:48](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=528s) what it actually means, and you use them all the time in the code, when you're talking about the code, when you're talking to domain experts, or in our case, when you're talking with AI.

[8:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=537s) So I made a skill. This skill is the ubiquitous language skill. Basically just scans your code base, looks for terminology, and then, um, creates a markdown file. Creates the ubiquitous language markdown file, a bunch of markdown tables with all of the terminology.

[9:14](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=554s) And this, then I pass it to the AI, and I'm able to read it too, and I actually have it open all the time when I'm grilling with the AI and planning and that.

[9:23](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=563s) And what I noticed by reading the thinking traces of the AI, it not only improves the planning, but it allows the AI to think in a less verbose way, and actually means that the implementation is more aligned with what you actually planned.

[9:37](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=577s) So this has absolutely been a powerhouse. It's, I mean, unbelievably good. So that's tip number two: create a shared language with the AI. So okay. Let's imagine that you've aligned with the AI.

[9:49](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=589s) You know what it is you're supposed to be building. The AI has built the right thing, but it doesn't work. Raise your hands if that's happened to you.

[9:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=597s) Yep. Just doesn't work. Well, there's an obvious thing that we can do to make that better, which is we can use feedback loops. We can use, um, static types, you know, if you're not using TypeScript, uh, that's crazy.

[10:10](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=610s) Uh, if you're not using, uh, if you're building a front-end app and you're not giving it the LLM access to the browser, so it can look around, absolutely needs that.

[10:19](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=619s) And you obviously also need automated tests. And one sort of thing I notice here is that even with these feedback loops, the LLM doesn't use them very well. It doesn't kind of like get the most out of its feedback loops in the way that a veteran developer would.

[10:36](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=636s) And so it does... What it tends to do is just does way too much at once. It will produce, like, huge amounts of code and then think, "Oh, I should probably type check that actually," or, "I should, uh, you know, maybe check a test on that or maybe do something like that."

[10:50](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=650s) And this, in The Pragmatic Programmer, they describe as outrunning your headlights, as essentially driving too fast because the rate of feedback is your speed limit. The rate of feedback is your speed limit, which means that you should be testing as you go, taking small, deliberate steps.

[11:08](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=668s) And the AI by default is really not very good at that. So skill number three is TDD. You should be using test-driven development because TDD forces the LLM to really take small steps.

[11:23](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=683s) You create a test first, you make that test pass, and then you refactor the code to make it nicer and consider the design.

[11:32](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=692s) The issue here is that testing is really hard. Testing has always been hard. And the reason for that

[11:41](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=701s) is there are a ton of different decisions you need to make when you write a test. You need to figure out how big a unit do you want to test.

[11:50](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=710s) You need to figure out what to mock. You need to figure out what behaviors do you even want to test in the first place. And all of these decisions are dependent.

[11:57](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=717s) So if you are testing a really big unit, like an entire, uh, massive application, then it might be quite flaky. You might not wanna test that many behaviors. You know, if you only test this unit, you need to mock this unit.

[12:09](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=729s) You know, it's all interlinked. And I've been thinking about this for years, for my entire development career.

[12:15](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=735s) And what we notice is that good codebases are easy codebases to test, right? So here we're starting to get back to the idea of code being important, is that the better your codebase is, the better your feedback loops are because you're able to, um,

[12:31](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=751s) give better feedback to the LLM, it produces better code.

[12:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=755s) And so I thought, what does a good codebase, what does a testable codebase look like? Again, we go to John Ousterhout. He talks about having deep modules in your codebase.

[12:46](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=766s) Not shallow modules, not lots of modules that expose like kind of, um, lots of functions. They should be relatively few large, deep modules with simple interfaces. Let's compare them quickly.

[12:59](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=779s) Deep modules, lots of functionality hidden behind a simple interface, hiding the complexity. You can look inside the deep module if you want to, but you don't need to. You can just use the interface.

[13:09](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=789s) Shallow modules, not much functionality, complex interface. And I'll just wait for you to take the photos.

[13:18](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=798s) Shallow modules in a codebase kind of look like this, where you have a ton of different tiny little blobs that the AI has to walk through and navigate, and this is really hard for the AI to explore, actually.

[13:31](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=811s) And so often what you'll see is if you have a codebase like this, which AI is really good at creating codebases like this, is that you'll have a situation where AI doesn't understand what your code is doing.

[13:41](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=821s) It will attempt to explore the code, but because it's poorly laid out and filled with shallow modules, it doesn't maybe get to the right module in time, or doesn't understand all the dependencies, all that stuff.

[13:51](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=831s) It doesn't understand your code. And so what does a codebase full of deep modules look like? Well, it looks like this,

[14:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=840s) where it's the same code, but it's just structured inside boundaries where you have these interfaces on the top.

[14:08](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=848s) And these interfaces, you should probably have a lot of control over them and design them really well. Otherwise, you know, AI might mess up the design. But the implementation, you can kind of leave that to the AI a bit.

[14:21](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=861s) So how do you turn a codebase that looks like this into a codebase that looks like that? Well, I've got a skill for that. Improve codebase architecture. Turns out this is not-- It, it's quite complicated to do this, but it's a s- like a set of steps that you can reusably do again and again.

[14:40](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=880s) You just sort of explore the codebase, look for opportunities where there's code that's kind of lo- um, related, and wrap all of that in a deep module.

[14:50](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=890s) And this is a testable codebase because the boundaries around this code are so, so simple. You test at the interface, you verify using that interface, and you're good to go.

[15:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=900s) And so this is a codebase that rewards TDD.

[15:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=904s) But how about failure mode number six, which is your... Okay, let's say your feedback loops are working. Let's say that things are kicking into gear. You're able to ship more code than you ever have before, but your brain can't keep up,

[15:16](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=916s) right? Uh, raise your hand if you felt more tired than you have ever before in your development career. Yeah, me too. It's knackering. And I think that this is a codebase that actually makes it harder for your brain because you, as well as the AI, need to keep all of that information in your head.

[15:34](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=934s) Whereas this, not only is it simpler for you to read and understand, it also means you can kind of treat these modules or these deep modules as gray boxes.

[15:47](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=947s) You can kind of say, "Okay, I'm gonna just design the interface, but I'm not gonna worry too much or not review the implementation too much." You can do this obviously with, uh, things that are less critical in your application.

[16:00](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=960s) Can't do this with, uh, you know, various things like, uh, uh, finance or whatever. But in many, many modules in your app, you don't need to think about the implementation too much as long as you have a testable boundary outside the module, and as long as you understand its purpose and can design it from the outside.

[16:15](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=975s) I have found this has really saved my brain because I can just go, "Okay, the AI, I'll let you handle what's inside the big blob. I'm just gonna test from the outside and verify it."

[16:26](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=986s) So that's tip number five: Design the interface, delegate the implementation.

[16:32](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=992s) But this means that whenever we're touching the code, whenever we're planning stuff, we need to think about and be aware of the modules in our application. We need to know that map really well.

[16:42](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1002s) It needs to be part of our ubiquitous language. We need to build it into our planning skills as well. So my write-a-PRD, inside the PRD, I'm specific about the module changes and the interfaces inside those modules, how they're being modified.

[16:55](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1015s) I'm thinking about them all the time. And this comes from Kent Beck: Invest in the design of the system every day. And this is the core of it, right?

[17:04](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1024s) Because specs-to-code, we are not investing in the design of the system. We are divesting from it. We're getting rid of that. Whereas this, I think, is absolutely key.

[17:16](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1036s) And so code is not cheap. That's the message I want you to take away. Code is important. And if we think about AI as a really great on-the-ground programmer, a kind of tactical programmer, a sergeant on the ground making the code changes, you need someone above that.

[17:35](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1055s) You need someone thinking on the strategic level, and that's you. And that requires software fundamental skills that we've been using for twenty years, for m- longer.

[17:46](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1066s) Now, if you are interested in any of the skills I put up here, it's in the GitHub repo [REDACTED:username]. And if you're interested in the training that I do or, uh, any free stuff, I'm on YouTube, I'm on Twitter, but I'm also at aihero.dev, where I have a newsletter that you can check out.

[18:01](https://www.youtube.com/watch?v=v4F1gFy-hqg&t=1081s) Thank you so much. I hope that this gives you confidence in this new AI age- [audience clapping] that you can actually make a good impact. Thank you. [outro music]
