Uncle Bob Martin (@unclebobmartin)

xcancel.com · 2026-07-24 · by Long Nguyen ·generic
I’m significantly older than you. I started coding in the late 60s. My current strategy is to not read any of the code written by my agents. That’s the only way I can take advantage of their productivity. What I do instead is to surround the agents with extreme constraints. Unit tests, gherkin tests, QA procedures, quality metrics, mutation testing, test coverage, and a plethora of others. In the end, I have very high confidence in the code they produce because they’ve had to run the gauntlet of all of my constraints and tests.

Uncle Bob Martin (@unclebobmartin)

[](https://xcancel.com/ori%5Fpomerantz/status/2080024439345828249#m)

I am trying to use Claude to help me write something, but I just don't feel comfortable letting it edit my files. Does anybody else feel the same? If I am responsible for code, I NEED to understand it, psychologically if for no other reason. Started programming in 1983. Old?

206

5

328

85,799

Replying to @ori\_pomerantz

I’m significantly older than you. I started coding in the late 60s. My current strategy is to not read any of the code written by my agents. That’s the only way I can take advantage of their productivity. What I do instead is to surround the agents with extreme constraints. Unit tests, gherkin tests, QA procedures, quality metrics, mutation testing, test coverage, and a plethora of others. In the end, I have very high confidence in the code they produce because they’ve had to run the gauntlet of all of my constraints and tests.

Jul 23, 2026 · 11:44 AM UTC

302

883

9,647

1,785,681

Sort replies: Relevant Recent Liked

[](https://xcancel.com/WahyuCodes/status/2080376764011020684#m)

Replying to @unclebobmartin @ori\_pomerantz

i am trying to do the same exact things, I am curious, what deterministic tools you can recommend for quality metrics? because that is such a non deterministic thing to measure.

5

1

37

27,608

[](https://xcancel.com/unclebobmartin/status/2080394473146597835#m)

GitHub.com/unclebob/crap4jav….

GitHub - unclebob/crap4java: Crap analyzer for my java projects. Crap analyzer for my java projects. . Contribute to unclebob/crap4java development by creating an account on GitHub. github.com

2

5

238

23,519

[](https://xcancel.com/m0nkeypatch/status/2080259566382489839#m)

Replying to @unclebobmartin @ori\_pomerantz

While you're ensuring product quality through testing, what about the quality of the code itself? Lately I have been wondering, that does it even matter anymore, now that changing code is so cheap and easy? Or am I missing something?

9

24

26,828

[](https://xcancel.com/unclebobmartin/status/2080279364592119978#m)

I think it matters still, and I think it matters a lot. Messy code slows my agents down. I've seen them wrangle with their own messes without resolution. I finally had to step in and untangle their own mess. So I don't let them create those tangles. I constrain the hell out of function sizes, cyclomatic complexity, and test coverage. That seems to keep them moving smoothly.

8

7

234

23,768

more replies

[](https://xcancel.com/prahladyeri/status/2080270121491464489#m)

Replying to @unclebobmartin @ori\_pomerantz

By doing so, you've trapped yourself into the Chinese room argument. If the LLM generates all the code and you're merely testing it with constraints, then are you really the engineer (Chinese translator) here?

10

40

25,120

[](https://xcancel.com/unclebobmartin/status/2080276871158129078#m)

I am the engineer because I am accountable.

18

36

711

26,537

[](https://xcancel.com/theRedding/status/2080381605563285987#m)

Replying to @unclebobmartin @ori\_pomerantz

What’s your favorite type of thing to have them build? I don’t know any coding but so far I’ve got a personal context social media app, a semantic suggestion writing and notes app, and an IR remote made from an ESP32 that is controlled by Siri.

1

2

5,894

[](https://xcancel.com/unclebobmartin/status/2080392873271243193#m)

Mostly games and tools.

1

14

4,582

[](https://xcancel.com/MarkoVelich/status/2080376394777813471#m)

Replying to @unclebobmartin @ori\_pomerantz

Works fine until they start changing tests :)

1

4,761

[](https://xcancel.com/unclebobmartin/status/2080394782774276585#m)

That’s why we overload the tests with mutation testing, QA procedures, gherkin tests, and so on. It’s not just one test they have to change. it’s a lot of tests. And that makes it harder to change the tests.

3

23

4,367

[](https://xcancel.com/repojournal/status/2080385427781857772#m)

Replying to @unclebobmartin @ori\_pomerantz

If we cannot trust the outcome of what AI makes and AI has proven over and over again that it will not listen to us at all times what gives us the confidence that it will stay within the guardrails of our constraints just because we asked it to? If AI simply makes the judgement call to change the test to what it wants or to have false positives how do we know? Hidden in between the test checks, haven’t we seen bugs where test pass and QA passes too? In our writing of code how many times have we seen cases where our assumptions simply turned out to be wrong and we need to take a different direction entirely. How do we handle these sorts of cases with AI? Are comfortable walking in a future where we cannot say what a software does? We cannot say a software does something simply because the test we setup pass.

7

48

42,397

[](https://xcancel.com/unclebobmartin/status/2080388562701209774#m)

You mean they’re about as reliable as people. So you keep an eye on them.

4

6

509

29,861

more replies

[](https://xcancel.com/brunocalza/status/2080263986801434650#m)

Replying to @unclebobmartin @ori\_pomerantz

and who writes all those tests? Do you feel the work shifted more towards QA, or you’re doing the same amout of QA, but now skipping the implementation part?

1

27

20,079

[](https://xcancel.com/unclebobmartin/status/2080278104849744349#m)

My agents write the unit tests. I don't review those. They also write the gherkin acceptance tests and the QA procedures. I review those. Sometimes thoroughly, and sometimes as a spot check, depending on criticality. I also, periodically, do a final manual test.

7

9

334

18,418

more replies

[](https://xcancel.com/matiasbaldanza/status/2080381698458431936#m)

Replying to @unclebobmartin @PeladoNerd @ori\_pomerantz

Honest question: who writes the gauntlet? Quis custodiet ipsos custodes? I know I’m being a smartass, but I’m asking seriously. If the constraints are doing the heavy lifting, then the quality of those constraints becomes the real engineering problem. How do you engineer the system that keeps the agents honest? My current approach is to have my agents do it, too. I discuss the high-level requirements with them, then spend a bit of time trying to poke holes in the result. But I wonder if there’s a better way.

2

16

16,726

[](https://xcancel.com/unclebobmartin/status/2080392677753790875#m)

I have the agents write the tools that check the constraints. Those tools are deterministic. They are relatively small programs that check the quality of the code or check the coverage of the tests or manipulate the code and look for errors.

5

3

112

12,722

more replies

[](https://xcancel.com/scottekuhn/status/2080265953678356563#m)

Replying to @unclebobmartin @ori\_pomerantz

I’m with you @m0nkeypatch, I’m thinking that the code quality is less important now, unless it’s inefficient. If it works and passes the tests then it’s good enough. What I wonder is if building the constraints is AI driven as well in Uncle Bob’s workflow.

1

7

11,739

[](https://xcancel.com/unclebobmartin/status/2080277353981182334#m)

I have the agents build the unit tests. I don't review those. I also have the agents build the gherkin and QA procedures. I do review those, to one degree or another. I set the constraints on the metric analysis and coverage tools.

2

28

9,934

[](https://xcancel.com/cheese%5Fbig80393/status/2080507080121954785#m)

Replying to @unclebobmartin @ori\_pomerantz

Test driven development is back in vogue now. I've found that being unreasonably strict about constraints to be very effective in keeping agents in line

210

[](https://xcancel.com/bline163/status/2080513425877401771#m)

Replying to @unclebobmartin @ori\_pomerantz

I keep ready your lost and I love them. But makes me think the new coders are the QA team because they know how to test software. With good coverage who cares who writes the code. But I would think you'd need performance tests in there too.

118

[](https://xcancel.com/certainly%5Fno%5F/status/2080508308805570648#m)

Replying to @unclebobmartin @ori\_pomerantz

Do you read / write the tests, or do agents do those too?

146

[](https://xcancel.com/BorisKosoric/status/2080466725821194321#m)

Replying to @unclebobmartin @ori\_pomerantz

"Thats the only way I can take advantage of their productivity". Really? Reading a couple hundred lines per MR takes like an hour or two, usually much less. I still saved many hours or usually days it would have taken time to figure out the solution and write all the code.

559

[](https://xcancel.com/realFelixRobles/status/2080413600628297927#m)

Replying to @unclebobmartin @ori\_pomerantz

My question, is it LIFO or FIFO. I mean, in terms of garbage in/garbage out.

717

[](https://xcancel.com/eboygarcia/status/2080435186756681994#m)

Replying to @unclebobmartin @ori\_pomerantz

@unclebobmartin this is so helpful!, If you have a long post imposing constraints on agents, I would love to read and learn along.

464

[](https://xcancel.com/DSkirp18500/status/2080518088454504807#m)

Replying to @unclebobmartin @ori\_pomerantz

I'm curious to see the full list of all your tests that you run against code generated by AI. I wonder what else we need to be adding to that list.

62

[](https://xcancel.com/mretsal/status/2080337206917398590#m)

Replying to @unclebobmartin @theo @ori\_pomerantz

I guess you are also doing adversarial reviews? I use Claude Code but my methodology consists on never delivering code that's not reviewed by GPT 5.6 Sol + Kimi K3 + GLM. All these 4 combined level up my confidence on what I'm delivering. But I'm not reading the code either.

1

1,494

[](https://xcancel.com/tiwariprt/status/2080516873393959125#m)

Replying to @unclebobmartin @nvk @ori\_pomerantz

How do you ensure they don’t cheat or hallucinate test results. The same weakness applies isn’t it ?

36

Load more

[](https://xcancel.com/unclebobmartin/status/2080257779395154409#m)

xcancel.com · 22 images · 63 links

Comments (0)

No comments yet