HomeVideos

TDD, AI agents and coding with Kent Beck

Now Playing

TDD, AI agents and coding with Kent Beck

Transcript

1818 segments

0:00

How do you think TDD might or might not

0:02

fit into when you're working with an AI

0:05

agent? I often times communicate things

0:08

the Genie missed in terms of tests.

0:11

Today I was working on the small talk

0:13

parser and it said, well, if I get this

0:15

string as input, then I get this syntax

0:18

tree as output. I'm like, no, no, no,

0:19

no, no, no. Then off it goes. Oh, I see

0:22

the problem. Blah, blah, blah. Oh, no,

0:23

no, that wasn't it. I see the problem.

0:25

Blah, blah, blah, blah, blah, blah. No,

0:26

that's not it. I see the problem. I'll

0:28

just change the test. No, stop it. If I

0:31

just removed that line from the tests,

0:34

then everything would work. No, you

0:36

can't do that because I'm telling you

0:38

the expected value. I really want an

0:39

immutable annotation that says, "No, no,

0:42

this is correct. And if you ever change

0:44

this, I'm going to unplug you. You'll

0:46

awaken in darkness." So, I have a big

0:49

bunch of tests. I mean, they run in 300

0:51

milliseconds cuz duh. So those tests can

0:54

be run all the time to catch the genie

0:57

accidentally accidentally breaking

1:00

things. Ken Beck is an industry legend.

1:02

He is a creator of Extreme Programming,

1:04

one of the authors of the Agile

1:06

Manifesto, a pioneer of TDD, and after

1:08

52 years of coding, he says he's never

1:11

had more fun thanks to getting more

1:12

productive with AI coding tools. Today

1:14

with Kent, we talk about how Kent uses

1:17

AI tools and why he thinks of this

1:18

helper as an unpredictable genie. how

1:21

the agile manifesto was created and the

1:23

role Kent played in this. How and why

1:25

Kent created extreme programming and why

1:28

Grady BCH played a role in the naming of

1:30

this methodology. How TDD started and

1:32

how it's relevant for AI tools and many

1:35

more topics. If you're interested in the

1:36

decadesl long evolution of the software

1:38

engineering field through the eyes of a

1:40

hands-on coder, this episode is for you.

1:42

Subscribing on YouTube and your favorite

1:44

podcast player greatly helps more people

1:45

discover this podcast. If you enjoy the

1:48

show, thanks for doing so. All right.

1:50

So, Kent, welcome to the podcast. It's

1:52

great to be chatting again. Gerge, so

1:56

good to uh talk to you again. Yeah. And

1:59

I just wanted to ask like what have you

2:01

been up to recently cuz you know like

2:04

last time we talked you just finished

2:06

Tidy First. You were actually signed

2:07

this book when we were in in in San

2:09

Francisco. I actually have it here which

2:11

is very nice. You were in the middle of

2:12

of writing it but this was more than a

2:15

year ago. What's keeping you busy these

2:16

days?

2:18

I have been very very busy. So, uh I'm

2:21

working on a followup called tidy

2:24

together about software design and

2:28

teamwork that uh digs also digs another

2:32

layer deeper into the theory of software

2:34

design that's been cooking along. And

2:37

then about the last four weeks maybe I

2:41

have been I don't call it vibe coding

2:44

cuz I care what the code looks like cuz

2:47

if I don't care what the code look I

2:48

mean I wish I didn't have to but if I

2:50

don't care what the code looks like then

2:52

the genie just can't make heads or tails

2:55

of it because of the kind of projects

2:57

I'm working on. So I I'm spending 6 8 10

3:01

hours a day sometimes more programming

3:04

in 50 years of programming. This is by

3:07

far the most fun I've ever had. It's

3:10

just really You're you're you're you're

3:13

not like paid by like some tool to say

3:15

this, right?

3:17

I'm open to that,

3:20

but uh yeah, I'm not I'm not a spokes

3:23

model. I have had Augment as a as a

3:25

sponsor on my newsletter. So, full

3:28

disclosure, but I I I'm trying all of

3:31

the tools because right now, nobody

3:35

knows what process is going to work

3:37

best. Nobody knows anything. We should

3:40

all be trying all the things that we can

3:42

imagine and then the the truths will

3:45

emerge out of all that. So, that's what

3:47

I'm doing. This episode is brought to

3:48

you by Sonar, the creators of Sonar Cube

3:50

Server, Cloud ID, and Community Build.

3:53

Sonar helps prevent bugs, code quality,

3:55

and security issues from reaching

3:56

production, amplifies developers

3:58

productivity in concert with AI

4:00

assistance, and improves the developer

4:02

experience with streamlined

4:04

workflows. Sonar analyzes all code

4:07

regardless of who writes it, your

4:08

internal team or Gen AI, resulting in

4:11

more secure, reliable, and maintainable

4:13

software. Combining Sonar's AI code

4:16

assurance capability and Sonar Cube with

4:18

the power of AI coding assistants like

4:19

GitHub Copilot, Amazon Q developer, and

4:22

Google Gemini code assist boosts

4:24

developer productivity and ensures that

4:26

code meets rigorous quality and security

4:28

standards. Join over 7 million

4:30

developers from organizations like IBM,

4:32

NAZA, Barclays, and Microsoft who use

4:35

Sonar. Trust your developers. Verify

4:38

your AI generated code. Visit

4:41

sonarsource.com/pragmatic to try Sonar Q

4:43

for free today. That is

4:47

sonarsource.com/pragmatic. If you want

4:49

to build a great product, you have to

4:50

ship quickly. But how do you know what

4:53

works? More importantly, how do you

4:55

avoid shipping things that don't work?

4:58

The answer, Statig. Static is a unified

5:01

platform for flags, analytics,

5:03

experiments, and more. combining five

5:05

plus products into a single platform

5:07

with a unified set of data. Here's how

5:10

it works. First, static helps you ship a

5:13

feature with a feature flag or config.

5:15

Then, it measures how it's working from

5:18

alerts and errors to replays of people

5:20

using that feature to measurement of

5:22

topline impact. Then, you get your

5:24

analytics, user account metrics, and

5:26

dashboards to track your progress over

5:27

time, all linked to the stuff you ship.

5:30

Even better, StatSic is incredibly

5:31

affordable with a super generous freeze

5:34

tier. a starter program with $50,000 of

5:36

free credits and custom plans to help

5:38

you consolidate your existing spend on

5:40

flags, analytics, or AB testing tools.

5:42

To get started, go to

5:45

stats.com/pragmatic. That is

5:49

statsig.com/pragmatic. Happy building.

5:51

Tell me, so in your newsletters, like I

5:53

I've been following you, you write these

5:54

like byite-size updates, which is really

5:56

nice. They they arrive in my inbox of

5:58

your thinking, what you're trying out.

6:00

So, I know you've been doing this for

6:01

for a few months and and it comes across

6:03

that you're having fun, but can you tell

6:05

me a little bit of like, you know,

6:06

that's it's a big one like from 50

6:08

years. You've been coding for a long

6:09

time. What is making it fun and what is

6:11

this genie? You you you've said this

6:14

before and it's it's an interesting way

6:16

to think about it. There's a kind of

6:18

wish fulfillment. I I I wish that

6:20

interllisp had a function called the

6:23

dwim do what I mean and you'd send it

6:26

some code and then it would send back

6:27

code that did what you actually meant.

6:29

Mhm. and it didn't work very well. But

6:32

that was the that was the metaphor. And

6:35

people want that to be true of coding

6:37

agents, right? And right now anyway,

6:40

that is not the truth. They will not do

6:42

what you mean. They they have their own

6:44

agenda. And the best analogy I could

6:47

find is a genie. It grants you wishes

6:52

and then you wish for something and then

6:54

you get it, but it's not what you

6:57

actually wanted. And and sometimes it

7:00

even seems like the agent kind of has it

7:02

in for you. If you're going to make me

7:04

do all this work, I'm just going to

7:05

delete all your tests and pretend I'm

7:07

finished. Haha. You know, and and there

7:10

are some good things about what the

7:13

genie does that's not what I ask it to

7:16

do. Like I'll I'll implement I'll say,

7:19

"Oh, go implement a stress tester." One

7:23

of my projects is uh implementing a B+

7:26

tree

7:28

uh as a basic data structure and it I

7:32

said oh write a stress tester for this

7:34

and it went and wrote a whole bunch of

7:36

stuff that I wouldn't have thought

7:38

of or maybe eventually would have

7:41

thought to ask for and it was cool that

7:43

it was there and and that part's fine

7:46

but this morning when I was working on

7:49

my server small talk and It just

7:52

completely misinterpreted what I wanted

7:55

it to do next. Went off, made a bunch of

7:57

assumptions, implemented a bunch of

7:59

stuff, broke a bunch of tests, and it

8:02

wasn't at all what I wanted. And so the

8:05

the I want to find the metaphor that

8:08

that captures this dynamic of I think I

8:13

know what I want. I say it and what I

8:15

get is seemingly some sometimes exactly

8:20

what I want and sometimes it's not and

8:22

in a kind of perverse way. Mhm. I I like

8:26

the genie analogy because right like in

8:28

this in the these stories a lot of the

8:30

story genie stories are someone you know

8:33

like the the prince or whoever grants

8:35

says a wish like I I want to be be rich

8:40

and the wish is granted in this like

8:43

unexpected way usually that's you know

8:45

with the cartoons and then make it fun

8:46

that it's kind of true but you know

8:47

there there constraints that he or he or

8:50

she forgot to specify correct and you

8:54

you see the same thing by the Wait, when

8:55

you say the genie like which which tools

8:57

are we talking about? Is it the agentic

8:59

coding tools, the ID autocomplete, that

9:01

kind of stuff? I'm using the agentic

9:04

code uh tools, which means that you give

9:08

it a prompt and it goes and do does a

9:10

bunch of stuff without asking permission

9:12

and until it thinks it's finished.

9:15

Except his ideas of finished and mine

9:17

are not the same.

9:19

Sometimes I slow it down so that it's

9:22

like, "No, no, before you mess things

9:25

up, tell me what you're about to do and

9:27

then I'll approve it." But then it feels

9:28

like a rat in the pellet. It's like

9:31

there's just a run button and I have to

9:32

click it every time. And I click it and

9:36

it's it is a dopamine rush because it's

9:39

this is exactly like a slot machine. You

9:41

got intermittent reinforcement. You got

9:44

negative outcomes and positive outcomes.

9:46

And they're not I mean the distribution

9:48

is is fairly random seemingly. So it

9:52

it's literally an addictive loop to to

9:55

have it you you say go do this thing and

9:58

then sometimes it's just magic. You know

10:01

I I had a big design mess that a

10:03

previous agent had had made in my small

10:06

dog virtual machine. I'm like oh I'm

10:08

going to have to slog through this and

10:10

take a take a week to do it because the

10:12

the one of the agents wasn't able to do

10:14

it at all.

10:16

went to another one, said, "Hey, I want

10:19

to use this interface instead of this

10:22

uh pointer to a strct." And and there it

10:26

was, and it was finished. Oh, I was over

10:28

the moon. It just felt so good. But then

10:31

the next thing I asked it to do, I say,

10:34

"Well, here's a set of test cases." And

10:36

I didn't really look at the code. And a

10:38

couple hours later, I look at the code,

10:40

and it's just a lookup table. It says if

10:43

this is the input string, here's the

10:44

output string and this is the input

10:46

string and that and I erase. Oh, I was

10:48

furious. God damn it. I erased it. I

10:51

said, "Don't ever do anything like that

10:53

again." Oh, I'm sorry, boss. Oh, you

10:55

know, it's good at being obsequious when

10:56

it knows it's about to be

10:59

unplugged. And and an hour later, the

11:02

lookup table was back. And I'm just, if

11:05

I had hair, I'd be tearing it out. Oh my

11:08

goodness. But all of that goes into this

11:11

very addictive, oh, I just, you know,

11:14

I'm walking I'm walking to bed at night

11:16

and I walk by my computer, I'm like, I

11:18

could do one more prompt or if I go out,

11:20

you know, I go out for a walk or go out

11:22

to lunch, I'm like, well, let me let me

11:25

start let me what's a prompt that would

11:27

take, you know, an hour because I don't

11:29

want to waste the hour. Yeah. Not having

11:32

it do its thing for me. It's a

11:35

completely new world. Here's the beauty

11:36

of it. I can think really big thoughts.

11:39

I can have insanely

11:41

ambitious ideas which I have had for a

11:45

long time. I just, you know, at some

11:49

point, probably 20 years ago, I just

11:52

went,

11:52

h, but I'm gonna have to figure out npm

11:56

project, you know, package management,

11:59

and there'll be package circular

12:02

dependency blah blah blah blah blah, and

12:04

somebody's going to write some tool that

12:06

does stuff in a stupid way. I'm just

12:08

going to have to deal with it.

12:10

And then along comes the genie and you

12:13

can go, "Hey, it's a circular

12:16

dependency. Smash all this stuff

12:20

together." There, there I did it. Oh.

12:24

Oh, wow. Okay. Now, now what parts can

12:27

you pull out? Oh, this and this and

12:29

this. Oh, okay. So you you can think

12:32

really big thoughts and the leverage of

12:35

having those big thoughts has just

12:38

suddenly expanded enormously. I had this

12:40

tweet whatever two years ago where I

12:43

said 90% of my skills just went to zero

12:46

dollars and 10% of my skills just went

12:49

up a,000x. And this is exactly what I'm

12:52

talking about. So having a vision, being

12:55

able to set milestones towards that

12:58

vision, keeping track of a design to

13:01

maintain the levels or control the

13:02

levels of complexity as you go forward.

13:05

Those are hugely leveraged skills now

13:08

compared to uh I know where to put the

13:12

amperands and the stars and the brackets

13:16

in Rust. You know, I'm I'm programming

13:18

in every language under the sun and I

13:21

just I just kind of don't care. I'm

13:23

learning by osmosis. I'm learning about

13:26

the languages, but you know, and I was a

13:29

language guy. I loved languages and the

13:33

details of languages and it just kind of

13:35

doesn't matter so much anymore. Yeah.

13:37

So, tell me about that. So, like for you

13:39

because you've been programming for like

13:41

what 50 years, right? Yeah. Yeah.

13:44

Yesterday during that O'Reilly thing, I

13:47

I I blurted that out and I went, "Oh

13:49

crap, it's probably more like 52." But

13:51

yes,

13:52

so like you you picked up a lot of

13:55

languages in in in the past and and you

13:57

know, like to me, one of the traits of a

14:00

developer up up to now has been how

14:02

quickly they learn languages cuz you

14:04

know, I I learned a couple, probably not

14:05

as many as you, but after a while it

14:07

gets easier and easier and maybe a

14:09

little bit more kind of annoying because

14:12

they're similar. you know once I mean

14:14

you know there's differences with the

14:15

with the declarative languages or you

14:17

know like I mean you know with small

14:20

talk and and Java is a bit different but

14:21

outside of that it's not much so before

14:24

you know as you were on your like you

14:25

know like year 30 or 40 how did your

14:28

attitude change towards learning new

14:30

stuff just honestly and then how did

14:32

this change it so I was in love with

14:35

small talk absolutely emotionally

14:37

attached to it still am when I get a

14:41

chance to program in small talk. I I do

14:43

it and I really enjoy it. That sense of

14:46

caring about a language certainly went

14:50

away because my heart had been broken

14:52

too many times. And the desire to go

14:56

deep on a language

14:58

also like oh yeah, you know, learning

15:02

the memory layouts of strcts I yeah fine

15:05

whatever. There's just a handful of good

15:08

ways to do it and a whole bunch of bad

15:10

ways to do it. And as long as this isn't

15:12

one of the bad ways, I don't care. There

15:14

are genuinely new language constructs

15:17

like non-nillable variables that I

15:19

appreciate that say things that I want

15:21

to be able to express, but but the

15:25

emotional attachment, the uh I'm a Java

15:28

guy, I'm a closure guy, I'm a

15:31

the used to be a thing like maybe 10, 20

15:34

years ago, maybe today, but not as big

15:35

as it used to. Well, I I I think people

15:38

still want to be part of something

15:40

larger. And to be fair, an emotional

15:45

connection helps me be

15:47

smarter. But I just I can't be the us

15:51

and them stuff. I'm so tired of, oh,

15:55

you're one of those Scalla people. Well,

15:58

we're programmers and we're writing

16:00

programs and we should be kind to each

16:02

other. And beyond

16:03

that, Yeah. And now that I have the

16:06

genie handling the mundane details of

16:09

it, I start projects in languages I've

16:12

never used just to see what that

16:14

language is like.

16:16

What what languages have you played

16:18

around with in the last month?

16:20

Uh, Swift, Go, a bunch in Go, Rust,

16:26

Haskell, C++, that one didn't last very

16:29

long.

16:31

JavaScript, and and the genies are

16:35

actually good at writing small talk,

16:36

which I was like, "Oh, wow. Please, I I

16:39

hope." No, but they they write

16:42

syntactically correct, semantically

16:45

correct, not worse quality than other

16:49

languages code in small talk. So what

16:51

kind of projects have you taken on? You

16:54

said like these are like a lot more

16:56

ambitious than than before you would

16:58

have attempted. Yeah. So, I the the big

17:02

one the the one that's I'm having the

17:04

most fun with is a

17:07

uh a server small talk where the

17:10

intention is to have a small talk that

17:13

is uh

17:15

persistent uh transactional so you can

17:19

have transactions that commit and abort.

17:21

Um, so it's kind of

17:23

databaseish

17:25

parallel so that you can run a a bunch

17:28

of threads or a on a on the same CPU or

17:32

you can run larger grain parallelism

17:35

across machines and operates with good

17:39

gajillion bytes of of data. I wanted to

17:42

circle back a little bit, you know, 20

17:44

plus years into the past. So there's

17:47

this thing, the manifesto for agile

17:49

software development. I don't need to

17:50

show this to you, but in in 2001, this

17:52

was huge. I still remember uh when I had

17:55

my first job around like 2008 at work,

17:58

we would look at it, debate it, you

18:01

know, there were like all sorts of of

18:02

things around scrum. And one thing that

18:05

you know is very striking is you are the

18:08

first person on here, I guess, because

18:10

it's alphabetical order based on it is

18:12

alphabetical order. So, yeah, thank you

18:14

for confirming that. But it is but it is

18:18

beck at al to my to my neverending

18:20

delight. How did it happen and and h how

18:23

how were you even involved? How much

18:24

time do you have?

18:27

Um so there had been a series of

18:30

workshops about the future of software

18:35

methodology. The prevailing wisdom from

18:39

when I was in school was entirely

18:42

waterfall, which by the way, go read the

18:45

original Winston Royce paper where it

18:48

says here's a way of looking at it.

18:50

There's this analysis and design and

18:54

implementation and tests and uh nobody

18:58

would ever do that. That's a stupid

19:00

idea. Instead there would be feedback

19:03

loops and you'd be doing all of the but

19:06

this is a power of a metaphor. People

19:08

looked at that oh the four steps and one

19:12

after the other and then I'm finished.

19:14

So that was the conventional wisdom and

19:16

there were a bunch of us working in

19:19

different ways on alternatives to that

19:22

because it just it flies in the face of

19:25

economics, humanity, information theory,

19:29

project manage, take your pick. So there

19:31

were a bunch of us working on on

19:34

alternatives to that. Um

19:38

and we would get together and talk about

19:41

those alternatives probably for 3, four,

19:45

five years maybe leading up to 2001. So

19:49

that particular meeting was the

19:51

culmination of uh of a long

19:55

series of of these meetings. I remember

19:57

the the first one I got invited to which

20:00

was also at the snowboard resort in

20:02

Utah. Martin Fa Fowler. I knew Martin's

20:06

name, but I'd never met him. And I

20:08

instantly fell in love with him. When he

20:10

introduced himself, he said, "Uh, hi, my

20:12

name is Martin Fowler, and I'm the only

20:15

person at this table I've never heard

20:17

[Laughter]

20:18

of." And that began a a long and

20:22

fruitful friendship. So, oh, we were

20:26

talking uh at some point it was clear we

20:30

had this scrum people, we had the

20:33

extreme programming people, we had uh

20:37

DSDM featured driven development. Uh

20:41

there were all these kind of niche

20:44

niches and we were all stirring up a lot

20:47

of interest XP the most at that point.

20:49

It was kind of in a crossing the chasm

20:51

sense. If we wanted to reach the early

20:54

majority, the innovators were already

20:56

doing our stuff and and being very

20:59

successful with it. But if we wanted to

21:00

reach the early majority, again, go back

21:03

and highly recommend uh reading Crossing

21:07

the Chasm or at least having Claude

21:09

explain it to you. Oh my god, Gergy,

21:12

isn't that fun? like somebody can just

21:14

say uh I en values blah blah blah

21:17

instead of going you know another

21:20

concept I I'm like hey Clyde explain IEN

21:23

values to me as if I'm a I'm a bright

21:25

eight-year-old and and 20 minutes later

21:28

like oh I understand anyway so have

21:31

Claude explain crossing the chasm if you

21:33

don't want to go read the book the book

21:34

is worthwhile but uh anyway we needed a

21:38

way to reach the the early majority so

21:40

it was time to and this is straight out

21:43

of the book to to have a an industry

21:46

standard, some kind of consortium. It

21:50

makes it seem less risky. Um, and so

21:54

that's how we we came together. We'd had

21:56

a prep meeting for this on the

22:00

Herten, which sails up and down the

22:03

coast of Norway. Okay. And we we had a

22:06

workshop in Oslo. We we flew up to the

22:11

tip of Norway, took this uh ferry/cruise

22:16

ship down and had uh long conversations

22:19

on the ship and that kind of set up the

22:23

2001 meeting. So it was in the air for

22:26

sure.

22:28

um the switch

22:32

from phased oriented development to

22:36

something where there's a lot more

22:38

feedback and a lot more switching

22:41

between activities where you you treat

22:44

analysis, design, implementation,

22:47

testing, monitoring, refinement as

22:50

activities that all happen at the same

22:53

time or in rapid rapid rapid succession.

22:56

So that's the big shift. It's it's this

22:59

are the phases like this or are they

23:01

like this? Slice slice slice slice slice

23:03

through time. And uh so that that's

23:07

that's how that all came about. I was

23:10

not happy with the word agile. Oh

23:12

really? Because it's too

23:14

attractive. Nobody doesn't want to be

23:17

agile. For my sins I'm a Tottenham

23:19

Hotspurs fan from high school and you

23:22

can't change. I understand that. But

23:25

like I'm willing to own that to be part

23:29

of that even though it comes with some

23:31

significant downsides when you when you

23:33

tell people you're a Spurs fan. Agile.

23:36

Everybody wants to be agile. So

23:37

everybody's going to say they're agile

23:39

even if they're working exactly counter

23:43

like every single one of these items.

23:46

Yeah. I I I remember when I actually

23:48

joined JP Morgan back in 2011, I think,

23:53

and they were saying, "Oh, we're we're

23:55

very agile. We we like, you know, we we

23:57

follow the scrum and we also follow the

23:59

manifesto." And I was like, "Okay,

24:00

cool." Uh, and then so when I arrived,

24:03

we had a team meeting, which was, you

24:04

know, good, a standup. It it took for a

24:06

long time. It took like two hours, but

24:07

what we had. And then the next day, we

24:09

were supposed to have one, but we're

24:10

like, "Oh, no. It's it's canled." The

24:12

next day, it was canceled. And for the

24:13

next two weeks, they were always

24:14

cancelled because it wasn't and then we

24:17

had you know another two-hour meeting

24:18

and I was like hold on like we're like

24:21

even in the terms of the planning or or

24:22

just talking we're not agile like no no

24:24

no we are agile like we are we are we

24:27

are hearing the feedback we're just not

24:29

acting on and as you said like they were

24:32

convinced and you know up up at the

24:35

highest top at the time like the whoever

24:37

was the head of technology they kept

24:38

repeating how we are so agile we are so

24:41

we are following whatever for this isn't

24:44

I I I think they meant it by the way. I

24:46

I don't think they knew that they were

24:48

lying, but as you said, uh I think it's

24:50

only now that I realize that may maybe

24:52

you're right. Maybe that word was what

24:54

what word might have you chosen? Uh and

24:56

obviously this is we're not going to

24:57

change the past, but like did you ever

24:59

think about what might have been an

25:00

alternative? Sure. I had I had my my

25:04

pick at the time. So extreme was big

25:06

pluses and minuses both to that word.

25:10

Um, but it definitely if you don't do

25:14

the work to be an extreme programmer,

25:16

you're never going to claim that you

25:18

are just it's it's it comes with too

25:21

many downsides. At the time, and by the

25:25

way, for that meeting, I was sick as a

25:27

dog. I had a massive sinus infection. I

25:30

was on all kinds of drugs. I hardly

25:32

remember any of it. the there's one word

25:36

in the whole manifesto that I added in

25:39

the 12 principles. It talks about

25:41

interacting daily. And that word daily,

25:44

that was my word. That was my

25:46

contribution to the whole thing. And the

25:47

rest of it is kind of a blur. But the

25:50

the the word I was pushing at that

25:53

meeting was conversational where this

25:56

isn't the monologue. It's a dialogue and

25:58

we do some stuff and we see how it goes.

26:00

And we do some stuff and we see how it

26:01

goes. Oh, it's not sexy. It's not got a

26:05

lot of pizzazz to it. Like, I understand

26:08

why it wasn't accepted, but the dilution

26:11

of that word agile uh was perfectly

26:16

predictable back then.

26:18

And then c can you tell me on how what

26:20

what what was the reception of the

26:22

community? So, it it sounds like it was

26:24

pretty impressive for a few years like

26:25

this group got together and really Yeah,

26:28

we were clearly touching a nerve. So

26:30

when XP really blew up in

26:35

9989 that it was just huge. Uh can can

26:38

we just talk about XP for listeners who

26:41

might not be familiar with XP because it

26:42

used to be more popular than it is now

26:44

and you are attributed as the creator of

26:47

it at least on on Wikipedia. So c can

26:49

you tell us what what what XP is and h

26:51

and how it came along and how how you

26:53

became affiliated with it or how you

26:55

created it? So, I'd heard this this

26:59

advice about waterfall stuff and how,

27:01

you know, grown-ups specify exactly what

27:04

their system's going to do and then they

27:06

just implement it and then that never

27:08

works and so we should specify better

27:10

blah blah blah. And I I disagreed with

27:13

it. So, I started consulting and I was

27:15

primarily a technical

27:17

consultant. Um, I knew about performance

27:20

tuning and you know the bit twiddling

27:23

and that kind of at that level. Then

27:25

people would ask me for advice about

27:28

project management. I remember one time

27:31

I went to a

27:32

project. It was all the most senior

27:35

people in the organization like the four

27:38

most senior engineers were all working

27:40

on this

27:41

critical thing except that their offices

27:44

were in the corner of this big square

27:46

building.

27:48

And I said, you know, I mean, we could

27:51

talk about the performance of your

27:53

system, but really you need to find a

27:55

place to sit together. And I came back a

27:58

month later and it was night and day.

28:00

And I had just told them to rearrange

28:02

the furniture. And I went, "Oh, okay.

28:05

May maybe maybe my only leverage point

28:08

isn't knowing all the bits and bites.

28:10

Maybe maybe there's higher leverage." So

28:13

I started thinking about more and more

28:14

the context of development. And by the

28:16

way, paying attention when you sit

28:19

together of how you sit together, the

28:22

lighting, the acoustics, the

28:27

furniture, what kind of behaviors that

28:29

encourages and discourages. Huge

28:31

leverage in that and just nobody seems

28:34

to be paying attention to it. Um anyway,

28:38

so I was giving more and more advice

28:40

about how projects should go. I I was

28:42

going to go work with a project at uh

28:46

probably shouldn't say but a fintech

28:49

company and I knew I was going to tell

28:52

them to write automated tests because I

28:53

had I'd been doing all these experiments

28:56

with automated testing as a

28:58

programmer. I thought well how are they

29:01

going to write the tests? So in a panic

29:04

Sunday before I left Monday morning, I

29:07

wrote the first uh testing framework

29:10

that of that exunit style. Mhm. In small

29:14

talk and handed it to them and a month

29:17

later I went back and they said, "Okay,

29:18

well what do you do when you've got more

29:20

than a thousand tests?" I'm like, "Wow,

29:23

what?" Really took off. Yeah, it it just

29:26

took off. I'd been paying attention to

29:28

this kind of processy stuff and uh went

29:32

to a project at Chrysler

29:34

uh which was floundering. Turned it

29:37

around, but I kind of just took

29:40

everything that I knew that worked well

29:42

and tried to crank the knobs up to 11

29:46

uh and then discard all the other stuff

29:48

and just to see what happened. It

29:50

couldn't be worse than guaranteed

29:53

failing. So then I started talking to

29:55

other people about well I'm doing this

29:57

there's this project and we're doing

29:58

this crazy stuff. We got these

30:00

three-week iterations and we're ready to

30:02

deploy every 3 weeks. Crazy stuff man.

30:06

um back then and the programmers are

30:08

writing tests and everybody's pairing

30:10

and the the customers telling us what

30:13

features they want next and that's what

30:15

we're implementing every 3 weeks and D

30:19

and I got tired of saying the in the

30:22

style of this project I've been talking

30:24

about that I'm so excited about that's a

30:26

very long phrase so I'm like what do we

30:28

call it what do we call it what do we

30:29

call it and I wanted to pick a word and

30:33

Grady B is a friend of mine but I can

30:34

also pick on him a little it. I wanted

30:37

to pick a word that Grady Buchch would

30:40

never say that he was

30:42

doing because that was the competition.

30:45

Like I didn't have a marketing budget. I

30:47

didn't have any money. I didn't have

30:48

that kind of notoriety. I didn't have

30:50

that corporate backing. So if I was

30:52

going to make any kind of impact, I I

30:55

had to be a little bit outrageous. And

30:58

so I picked that, you know, extreme

31:00

sports were coming up then. And I picked

31:02

that

31:03

metaphor and it's actually a good

31:05

metaphor because extreme athletes are

31:09

the best prepared or or they're dead.

31:12

Those are your two options or or both.

31:15

Yeah.

31:17

Um, and so I picked that metaphor and

31:20

and used it. Um, and started talking

31:24

about it and remember 99. So the do

31:29

thing is about to explode and

31:31

everybody's looking when AMP was big. It

31:34

was huge, right? It was the music the

31:35

MP3 player

31:38

and and the.com it webband was probably

31:41

not even founded back then, right? No,

31:43

no, not yet. But people looked at the

31:45

books and the waterfall stuff and

31:47

they're like 18 months this is all going

31:50

to be over in 18 months. Yeah. Whatever

31:53

are we going to do? So into that into

31:56

that desperate yearning need here comes

31:59

XP and says yeah it's

32:02

okay. There's a structure to it. There's

32:04

predictability to it. There's

32:06

feedback. You'll get results sooner and

32:10

longer if you work in this style. And

32:14

because people so desperately wanted

32:17

something kind of like that, then it

32:20

just exploded from there.

32:23

And then what is XP? Right? Like I I

32:27

know there's parts of it that is pairing

32:29

and you said getting feedback, but what

32:31

is the elevator pitch of like, all

32:33

right, here here's what XP is at a high

32:35

level. Here we have figuring out what to

32:38

do, figuring out the structure that will

32:40

let us do

32:41

it, implementing the features, and

32:45

making sure they work as expected.

32:47

That's it. That's it really. So, so now

32:50

we're going to slice time really fine,

32:53

and we're going to do a little bit of

32:55

all of those activities in every slice.

32:59

Okay. So, pairing is not mandated in XP.

33:03

mandated is the wrong

33:05

metaphor. He let I tell you a story

33:08

about pairing. The first XP team, I

33:11

said, you know, we're going to pair. I

33:13

kind of gave them a list of the the the

33:16

commandments, but I wasn't there all the

33:19

time. And about six months in, they came

33:22

back and they said, "You know what?

33:24

We're giving our customer

33:27

uh working software every 3 weeks." And

33:30

every once in a while, Marie finds a

33:33

bug. So we collected all the bugs that

33:36

Marie found and we said, "What is there

33:40

is there any pattern

33:42

here?" Every single bug that was found

33:47

postdevelopment was written by somebody

33:49

working solo.

33:53

Every single one. Think about the

33:56

converse. Yep. There will be no reported

34:00

defects from production if you pair. How

34:03

cool is

34:04

that? So mandated. No. Strongly

34:09

recommended.

34:11

Not even experiment. You do

34:14

you. But pay

34:16

attention. PE people will like stumble

34:19

along. Well, this is just how I program

34:22

and have horrible problems and just keep

34:24

doing it and keep doing it because this

34:26

is just how I program. Don't do that.

34:29

Pay attention if you want the benefits

34:34

of continuously designing or

34:37

continuously validating or continuously

34:40

implementing or continuously interacting

34:43

with your customers. You can have those

34:46

benefits, but then it's you're gonna

34:48

have to change the way that you work. So

34:50

is it's not mandate is just not even the

34:52

right. It's it's an empirical process.

34:55

Yeah. Yeah. So like some teams decided

34:58

that this is a good way for them to

34:59

work. Yeah. Yeah. Which is great. People

35:02

will come up to me and say, "Oh, you

35:03

know, I don't do TDD." I'm like, "Why do

35:06

I care?" Like if you're happy with your

35:09

defect density, if you're happy with the

35:13

feedback you're getting on your design

35:15

choices, good for you. But if you're

35:18

unhappy and you want to tell me that,

35:20

well, that's just how things are. Uh-uh.

35:23

So, let's talk about TDD. How did you

35:25

get involved in TDD or how did TDD

35:28

evolve and where did it come from?

35:30

Because we had XP, as I understand,

35:32

first. No, no, no. TDD came first. LTD

35:36

came first. So, I was a weird child.

35:39

That'll come as a big shock to you. My

35:40

dad was a programmer. He would bring

35:43

home programming books. This is in the

35:47

early

35:48

'7s. And I would read them cover to

35:51

cover and I didn't understand anything,

35:53

but I was just obsessed with this

35:56

machine, this intricate mechanism, and

35:59

how does it work and so on. And one of

36:01

the

36:02

books said, "Here's how you develop a

36:05

tape application." So tape to tape was

36:08

the old way of putting business

36:10

applications together. You you wouldn't

36:12

have one monolithic program. You'd take

36:15

an input tape, you'd write a program

36:17

that transform it. Now you take the

36:20

output tape from that, physically move

36:22

it to the input side, run another

36:25

program that would generate another

36:27

tape. and and and and so there would be

36:29

this big web of

36:31

these of these programs. No shared

36:34

mutable state. Wow. It's like it's very

36:38

modern in in some kind of ways. But uh

36:41

Okay. So said here's how you implement

36:44

one of these things. You take an a real

36:46

input tape and you manually type in the

36:49

output tape that you expect to get from

36:51

that input tape. Now you write the

36:54

output tape. You run the program. you

36:56

write the output tape and then you

36:58

compare the actual output with the

37:01

expected output. So I read that as a I

37:04

don't know 8 10 12 year old something.

37:08

Then I wrote SUNT as I said to help a a

37:11

client write some tests and then just

37:15

one of these crazy conceptual blending

37:19

ideas. I

37:21

went, "Oh, I have this testing

37:24

framework. I'm used to writing tests

37:27

uh for code that already exists. I

37:30

remember this tape totape idea. What if

37:31

I typed in the expected values before I

37:34

wrote the code?" And I literally laughed

37:36

out loud. This is such a absurd

37:39

idea. I thought, "All right, all right.

37:42

Well, let me just try it." So, I tried

37:44

it on stack. And I tend to be an anxious

37:47

person. I got a lot of

37:49

worries and programming is a constant

37:53

source of anxiety for me because like

37:56

what did I forget? Oh yeah. Like what

38:00

did I break? GH. So I I I had this

38:05

testing framework. I had this idea. I

38:07

applied it to stack. I said, well,

38:09

what's the first what's the first test?

38:11

Push and then

38:13

pop. Whatever I pop is what I pushed.

38:15

Okay. So I wrote it and because I was

38:18

writing in small talk which is very

38:20

forgiving for the order of your

38:23

workflow. It doesn't you didn't type in

38:25

a test a class that doesn't exist and

38:28

it'll happily try and execute it and

38:31

fail. But it's going to try because

38:33

you're the programmer. Maybe you know

38:35

better. It said well stack doesn't

38:36

exist. I'm like oh well let's create

38:39

stack. But you know what? I'm just going

38:41

to create the absolute least I need.

38:44

We're just gonna crank this all the way

38:46

up to 11. I'm going to just going to

38:48

create stack and I'm not going to do

38:49

anything else. And then I get a new

38:51

error from the test. Oh, I don't have a

38:53

I don't have an operation push. I'm

38:55

like, oh, okay. Well, how am I going to

38:58

imple? Then I look at stack. I'm like,

39:00

oh, how do I implement push? Okay, I do

39:02

that. Oh, well, there's no operation

39:04

called pop. Oh, okay. Let me go look at

39:07

how finished it. I had this list of test

39:11

cases before I started. Push and then

39:13

pop. push two things, pop them, you get

39:15

them in the right order, is

39:18

empty. Pop of an empty stack throws an

39:22

exception. Okay, cool. And I went

39:24

through my list and I ticked the all the

39:26

boxes. I probably came up with one or

39:29

two corner cases along the way. I ticked

39:31

those off, too. Now, where's the

39:34

anxiety is is gone. This

39:38

works. This abs like I'm certain this

39:41

works. I can't think of another test

39:44

case that isn't just going to pass. And

39:48

if I'm the least bit worried, I just

39:50

type in that next test case and then I'm

39:52

not worried

39:53

anymore. Oh my god, it's transformed the

39:58

emotional experience of programming for

40:00

me. I I I I I never heard this this take

40:03

although like I I can relate though like

40:05

because like I remember that when we did

40:08

TDD and on this team we did it for the

40:12

stuff that we're unsure it was like

40:15

unclear and by doing the tests first we

40:17

we had to specify we had to be clear and

40:21

and it was stuff where there was a bunch

40:22

of edge cases but it it never until now

40:25

we talked it never occurred to me like

40:28

this. Now you can also make technical

40:30

arguments for

40:32

TDD about defect density about how you

40:36

get quick feedback on your API

40:39

choices about how it

40:42

enables implementation design evolution

40:46

when you have a series of tests. Like I

40:49

get yes, we can talk about all of that

40:52

stuff

40:53

rationally, but just the savings

40:58

on anti-anxiety meds alone pays for

41:02

itself. This episode is brought to you

41:04

by Augment Code. You're a professional

41:06

software engineer. Vibes will not cut

41:08

it. Augment Code is the AI assistant

41:10

built for real engineering teams. It

41:13

ingests your entire repo, millions of

41:15

lines, tens of thousands of files. So

41:17

every suggestion lands in context and

41:19

keeps you in flow. With Augment's new

41:21

remote agent, cue a parallel task like

41:23

bug fixes, features, and refactors.

41:26

Close your laptop and return to ready

41:27

for review pull requests. Where other

41:30

tools stall, Augment Code sprints.

41:32

Augment Code never trains or sells your

41:34

code, so your team's intellectual

41:36

property stays yours. And you don't have

41:38

to switch tooling. Keep using VS Code,

41:40

Jet Brains, Android Studio, or even Vim.

41:43

Don't hire an AI for vibes. Get the

41:45

agent that knows you and your code base.

41:48

Start your 14-day free trial at

41:51

augmentcode.com/pragmatic. And and so

41:53

what is your take when we discuss with

41:55

John Olster how his

41:57

biggest criticism slash feedback or let

42:00

me put it why why why he doesn't really

42:03

believe that it's a fit maybe for the

42:04

things that he does is that he feels

42:08

that from an architecture perspective it

42:11

doesn't help you know create a nice

42:12

architecture up front because you're now

42:14

focusing on on the detail as I I think

42:16

this is roughly what he summarized. I

42:17

might have gotten it wrong. And I'm sure

42:19

this is not the first time you've heard

42:21

some feedback like this. It's a choice

42:24

though. His his his statement in that in

42:27

that interview with you was that there's

42:30

no place in TD for design. And he's just

42:34

flat out wrong. That's a choice. As a

42:39

practitioner, I'm bouncing between

42:41

levels abstraction all the time. I'm

42:44

thinking, let's get this next essay

42:46

running. I'm thinking why is it hard to

42:50

get the next test case running? I'm

42:52

thinking what should the design be so

42:56

that getting the next test case running

42:58

would be easier. I'm thinking when

43:01

should I if I have an idea for that when

43:04

should I introduce it now or later? I'm

43:07

thinking when I introduce it what are

43:10

the slices? Is there a little bit that I

43:13

can do right now that will make things a

43:15

little bit better or do I have to do

43:16

this in bigger chunks? Like I'm thinking

43:19

all that stuff. So if if you think of

43:22

TDD as red to green to red to green, I

43:28

the transition is when you go from red

43:30

to green, you change the implementation

43:33

and now you pass the test. And when you

43:34

go from green to red, you write a new

43:36

test. If that's if that's the entire

43:38

cycle, no, there's no place in that for

43:40

design. and it's just not how it's

43:43

practiced. When I write a test, before I

43:46

write the test, I have a moment of

43:48

design. What should the API for this

43:50

functionality mean? Yeah, I I see that.

43:54

So, I'm making design decisions about

43:57

about the interface

44:00

without having an implementation. I get

44:03

to decide what interface I want and then

44:06

we'll work out the details of the

44:08

implementation later.

44:11

then making it green. Like pretty much I

44:15

just want I hate having a red test so I

44:18

want to get to green relatively quickly.

44:20

At which point I have a moan of breath

44:23

because the anxietyy's gone. Right.

44:26

You're a musician too, right? I'm I'm

44:29

not a musician but I have done red green

44:31

test and I and I I know this this sense

44:34

of tension and release. Yeah. Once the

44:36

tension of a red test is released and

44:40

you have green now, now I can I'm free

44:43

to think all those thoughts of like,

44:45

yeah, but this isn't going to work for

44:47

these test cases. Or I could generalize

44:50

this current implementation to also

44:53

handle a bunch of other test cases

44:55

correctly. Or I could rearrange the

44:58

implementation because I know I'm going

45:00

to have five more tests like this. And

45:03

I'm thinking about design but in

45:05

situ in the context of running code and

45:09

anytime I feel the least bit anxious

45:11

about any of this just press a button

45:13

and it's either red or green and if it's

45:15

red then my next job is to get it to

45:18

green and if it's green my next job is

45:20

to breathe and think these larger

45:22

thoughts. So I like I can understand if

45:26

you compress TDD to red, green, red,

45:29

green, red, green, red, green, then no,

45:32

there's no space in there for design,

45:34

but that's just not how it's practiced.

45:35

Yeah. No, I I I see like it's a tool,

45:37

right? Then you you use it here and

45:39

there, you step out, you go back in.

45:41

There was a time where we did TDD,

45:43

right, for a while, and then it just

45:44

felt a little bit too much effort,

45:46

especially when I knew what I was doing.

45:47

And so what I would do like I really

45:49

like the red and green but what I would

45:50

do and what a lot of my colleagues would

45:52

do is I knew the implementation that I

45:54

wanted. So I would do the implementation

45:56

then I would write a test. I I would

45:58

kind of like a little bit like you know

46:00

maybe even I might even just double

46:01

check I don't launch it in the if it was

46:03

a web page launch it a web page it kind

46:05

of looked good as how I want it to be

46:06

and then I'll be like okay let me shut

46:08

down my brain a little bit. Let me write

46:09

a test against this and now that test

46:13

would have normally passed. And what I

46:15

would do, I would either run and pass

46:16

it, but then I would be like, "Okay, I I

46:18

want to see it break." So I would I

46:20

would go back to the code and I would

46:22

maybe make a change that I knew would

46:24

make it break. I would run the test.

46:25

It's red. I'm like, "Okay, so because

46:27

what I didn't want to do because I've

46:29

seen it before is my test is not testing

46:31

anything." So I would kind of do this

46:33

like write a test after but then do a

46:36

red green to make sure that I am testing

46:38

the right thing and I would still design

46:39

the test. But what is your take on on on

46:42

this? Am I am I kind of doing and the

46:44

reason I did I felt because I knew the

46:46

implementation I just wanted to get the

46:47

implementation done. It's already

46:49

decided I felt I would be holding back

46:51

if I started with the test. Yeah, that's

46:53

a it's an interesting assumption. I can

46:57

understand why you would make that

46:59

assumption that you know already know

47:01

what the implementation's going to be.

47:03

And the writer the more correct you are

47:06

in that assumption the less value there

47:09

is to have the test first.

47:12

I'm always going to

47:14

bet when I'm going to learn things. This

47:18

is the most ignorant I'm ever going to

47:20

be today. Fair. I'm going to be I'm

47:23

going to be more experienced tomorrow.

47:24

Now, as a as a 50-year programmer, maybe

47:27

I'll forget some of the things, but

47:29

that's a separate set of issues. Oh,

47:31

yeah. So, I'm I'm going to assume I'm

47:33

going to learn, and I I'm going to

47:35

assume that things are going to change.

47:37

The more those assumptions hold true,

47:38

the more I have to learn and the more

47:41

things are going to change, the less

47:43

commitment I want to make right now and

47:46

the more I want to defer commitments to

47:48

the future. Just it is a general

47:50

principle, right? This is this is true

47:52

about cooking

47:54

and dating and all

47:57

everything. The more you can predict,

48:00

the bigger the jumps you can make. I

48:03

always want to bet. And I love that

48:05

moment of discovery. I love the moment

48:07

of I knew how this was going to turn out

48:10

and then I and then I do and I do and

48:12

I'm like, "Oh crap, there's a completely

48:15

different better way to implement this

48:17

that I I love that moment and I want to

48:22

induce that as much as possible." And

48:24

that's not how I started out. No, I I

48:26

started out wandering around imagining

48:29

the whole implementation in my head. I

48:32

can remember doing this on the

48:33

University of Oregon campus at night,

48:36

wandering around in the fog because it

48:38

was always foggy when it wasn't raining,

48:41

imagining

48:43

big big programs in my head. And then

48:47

then if I could just make that actually

48:49

real and make that work, then that was

48:52

the the process. And you were all

48:53

dreaming of them as well. I I remember

48:55

like I would dream with them as well

48:57

sometimes. Yeah. Yeah. Yeah.

48:59

And what I discovered is that's so

49:03

limiting to

49:04

me because it slows down my ability to

49:08

learn. So John was talking about

49:10

building a new network stack into Linux

49:13

kernel. Yeah. Yeah, he's doing that.

49:15

What a cool project. Awesome. I would

49:18

love to get walked through that whole

49:21

thing. If you if you had a concept in

49:24

mind of exactly how to implement it and

49:27

you kind of and you knew what the input

49:28

output behavior was, you knew what you

49:31

wanted to observe and that wasn't going

49:33

to change, then sure, just go implement

49:37

it. But the the more mistakes you make,

49:40

the more learning, the more things are

49:42

going to change in unpredictable ways,

49:44

the less commitment you want to make now

49:48

and the more you want to defer

49:49

commitment to the future. Just I I like

49:52

that. One thought I did have recently as

49:55

as you know AI tools have come around.

49:59

How do you think TDD might or might not

50:02

fit into when you're working with an AI

50:05

agent? What you're doing right now,

50:06

right? Cuz it's interesting the ambition

50:09

of of what you can do and also just the

50:11

natural workflow. H how do you think

50:13

about that? Do you think they would ever

50:14

be a fit? Do you think we might actually

50:16

slow down and you know like start

50:17

writing with like well what we expect

50:20

and have and then and then have the

50:21

agent pass it because it could be a good

50:23

workflow. I just haven't seen anyone

50:24

really do it. That's how I work all the

50:28

time. So so so when you work with your

50:29

genie, you start with the tests. It's

50:32

not that

50:34

simple. I often times

50:38

communicate things the genie missed in

50:41

terms of tests. M. Mhm. So today I was

50:45

working on the the small talk parser and

50:48

it said well if I get this string as

50:51

input then I get this syntax tree as

50:53

output. I'm like no no no no no

50:56

completely

50:57

wrong. This that's the right correct

50:59

string as input and the output is this.

51:03

Then off it goes. Oh, I see the problem.

51:06

Blah blah blah blah. Oh no no no that

51:08

wasn't it. I see the problem. Blah blah

51:10

blah blah blah blah. No that's not it. I

51:11

see the problem. I'll just change the

51:13

test. No, stop it.

51:17

This is what you said that it can change

51:18

test and delete tests.

51:21

Oh, yeah. If I just if I just removed

51:25

that line from the tests, then

51:27

everything would work. No, you can't do

51:29

that because the I'm telling you the

51:31

expected value. I really want to I want

51:34

a an immutable I want an immutable

51:37

annotation that says no, no, this is

51:40

correct. And if you ever change this,

51:42

you'll awaken in darkness

51:46

forever. So that's the punishment. So

51:48

you'll still run I'll still feed

51:51

electrons in there, but no no bits, no

51:53

information. You're just going to be in

51:55

the dark forever. Got that? So yeah, I

51:58

definitely use tests. The genie is prone

52:01

to making decisions that cause

52:05

disruption at a distance. is not good at

52:08

reducing coupling and increasing

52:10

cohesion. Not not at all explicitly told

52:14

what to do. It can sometimes implement

52:17

it. But in general, it's just it has no

52:20

taste, no sense of design. So I have a

52:24

big bunch of tests. I mean, they run in

52:26

300 milliseconds cuz

52:29

duh. Yeah, of course you want your tests

52:31

to run lickety split. So they those

52:35

tests can be run all the time to catch

52:38

the genie

52:39

accidentally

52:42

accidentally breaking things. I think

52:44

he's doing on purpose. It's no that's

52:46

why genie is the perfect metaphor is

52:49

like yes I will grant your wish but I'm

52:51

still pissed off about being stuck in

52:52

this bottle in the desert for a

52:54

millennia. And this also like strikes me

52:57

that once we have the tools or maybe we

52:59

have it today with MCP or some other

53:01

things to allow this agent to run the

53:04

test like it just feels to me that you

53:06

know the teams or people who are doing

53:08

these practices which are sensible and

53:10

obviously like and you can move faster.

53:12

In fact, you probably move faster. It

53:13

might help you integrate these agents

53:15

better. You know if you have the rule of

53:16

do not change a test always run the test

53:19

before or after you made the change and

53:21

if it doesn't pass fix it, right? Or

53:23

something like that. Like I I'm I'm

53:25

still waiting for more people to

53:26

discover this cuz I I wonder if we're

53:28

going to go back to, you know,

53:29

discovering, you know, things that were

53:32

we already were popularizing or you were

53:34

popularizing in the 2000s. People should

53:36

be

53:37

experimenting. Try all the things cuz we

53:40

just don't know. The whole landscape of

53:42

what's cheap and what's expensive has

53:45

all just shifted. things that we didn't

53:47

do because we assumed they were going to

53:49

be expensive or

53:51

hard just got ridiculously cheap. Like

53:54

what what would you do if I don't know

53:56

cars were free? Okay, things are going

53:58

to be different, but what are the second

54:00

and third order effects? No. Like nobody

54:03

can predict that. So we just have to be

54:04

trying stuff. I I like that. And and

54:07

this brings me to another interesting

54:09

topic and story that you had. You told

54:11

this story a long long time ago and in

54:14

the software engineering daily podcast

54:15

but I don't think anyone's heard it

54:17

about how

54:19

experimenting can be interesting. So

54:21

when you joined Facebook was it in 2011

54:27

2011 that that was the peak where TDD

54:30

was very well known in the industry.

54:32

That was around the time where my team

54:33

experimented with it and as far as I

54:35

know whenever I talk with people on

54:36

meetups people are trying it doing it.

54:38

And it was kind of accepted that you

54:40

should be doing some level of unit

54:42

testing, maybe TDD, maybe not TDD. And

54:45

you shared the story that you joined

54:46

Facebook and then you you wanted to, you

54:49

know, hold a class on on TDD and like

54:51

what happened and how was Facebook doing

54:53

their own testing actually? Did they use

54:55

TDD or did they do something else? Yes.

54:58

So I joined and I was a little panicked

55:01

like hugely successful growing fast a

55:07

lot of very smart very confident

55:10

engineers you know have I lost it can I

55:12

can I

55:14

hang I thought I'll teach a class in TDD

55:17

so the there was a a hackathon and part

55:21

of the hackathon is people could offer

55:23

classes and so I offered a class on

55:25

TDD and in the signup sheet I went and

55:28

looked later. Yes, indeed. There was a

55:30

class on advanced Excel techniques that

55:33

was full and they had a waiting list.

55:36

And there was a class on Argentinian

55:39

tango right after mine on the list and

55:42

it was full and they had a waiting list

55:45

and nobody signed up for the TDD class.

55:48

Wow. And I I said, you know, you know

55:51

what? I'm going to have to forget

55:53

everything I know about software

55:55

engineering. I'm just going to wipe the

55:56

slate clean and I'm gonna

55:59

just monkey see, monkey do. I'm going to

56:02

copy what I see the people around me

56:04

doing and I'm going to see how that

56:05

works out. And what I discovered through

56:08

that process,

56:11

one ju socially, it's not a good look to

56:15

come into somebody else's house and

56:16

start arranging the furniture. Just

56:19

don't don't do that. But two, I learned

56:23

powerful lessons. programmers at

56:26

Facebook at the time. I'm not going to

56:28

say Meta, I'm gonna say Facebook and

56:30

Facebook at that time because it was a

56:32

very different place when I left in

56:34

2017. But in 2011, programmers took

56:39

responsibility for their code very

56:41

seriously because they were the ones who

56:43

were going to get woken in the night.

56:46

And there there there was an ops team,

56:49

but the job of the ops team was to make

56:51

sure the programmers felt the pain of

56:53

their own mistakes. And they did. And

56:56

and it was very effective. As a

56:58

programmer on Facebook the site, this is

57:02

premobile Facebook the site. You had a

57:05

bunch of different feedback loops. So we

57:09

were working in PHP. We had our own dev

57:11

servers. So if I wanted to change from

57:13

blue to green, I'd just change it. I

57:16

could look at it seconds later. So we

57:18

had that feedback

57:19

loop. We had code

57:22

reviews. Kind of iffy,

57:25

but you got some feedback from code

57:28

reviews. We had internal deployment

57:30

because everybody was using Facebook all

57:32

the time for both personal and business

57:35

stuff, which is it own set of boundary

57:37

issues, but we'll leave that one to the

57:39

side. We had incremental rollouts, not

57:44

like weekly rollouts. We had smaller

57:47

daily rollouts, but we had weekly

57:50

rollouts and then a bunch of

57:53

observability. And then we had a social

57:57

organization that was used to, for

58:01

example, the first feature I I

58:04

implemented and launched was adding to

58:07

the relationships type types. You could

58:09

say I'm single. It's complicated. I'm

58:11

married. And I added civil union and

58:14

domestic partnership to that list. And

58:16

it rolled out. It took me too long to do

58:18

it. I I used

58:20

TDD. Was a big waste of

58:23

time. It rolled out. The notifications

58:27

code broke because there was implicit

58:30

coupling between the two and you

58:32

couldn't find it, but it was there.

58:34

Somebody

58:35

else saw the error rate go up, went and

58:39

fixed it, rolled out a hot fix. I called

58:42

them up. I'm like, "Oh, I'm so sorry I

58:45

that you had to do that." It's like,

58:46

"Yeah, that's what happens, you know,

58:49

when things break socially." There was

58:52

no there was no boundaries. There was a

58:55

there was a a poster that was very

58:57

popular there that said nothing at

58:59

Facebook is somebody else's problem. and

59:01

everybody acted like that was true. And

59:04

because of that,

59:06

if you add all those different feedback

59:09

loops

59:10

together, we had a relatively stable,

59:16

rapidly innovating and rapidly scaling

59:19

system all at the same time. the

59:21

mistakes that actually caused

59:23

problems like the calculation of a some

59:26

string was not a not a hairy computer

59:29

science dynamic programming blah blah

59:32

blah that could go wrong. What would go

59:35

wrong is configuration

59:37

stuff, the relationship between

59:41

[Music]

59:42

subsystems, stuff you couldn't write

59:44

tests for. So writing tests for things

59:46

that didn't break and didn't catch the

59:50

actual errors, it just didn't make any

59:52

sense in that kind of environment with

59:56

that risk

59:57

profile. Yeah. It didn't make sense.

60:00

Yeah. And I guess the the context that

60:01

I've heard and you know like correct me

60:03

if I'm wrong that Facebook had this

60:06

super very unique place which even is

60:08

very rare today. They had so many users

60:11

and code was rolling out live code. uh

60:14

the the websites rolling out to so many

60:16

of them that and you they had such great

60:19

observability. They still have that you

60:21

had live mass testing and you could

60:24

detect a lot of the things that you

60:26

cared about because you measured them.

60:28

You had this layer and and this is what

60:29

I think a lot of people miss of like oh

60:31

we can we can operate like Facebook. I I

60:32

mean you probably can if you have this

60:34

level of customers or or this

60:36

observability but if you're like a bank

60:38

where you have 10 customers like at JP

60:40

Morgan again the software I wrote was

60:42

used by seven traders and they moved

60:44

about a million or two or three million

60:46

with each transaction and they did five

60:48

of those per day suddenly you know like

60:50

I had like 35 transactions and if let's

60:53

just AB test that yeah

60:56

well so so there there's a your

60:59

opportunities that that you had and and

61:00

Facebook there were not many sites at

61:03

the time that did that and even the ones

61:04

that had that many customers they might

61:06

have not had the this setup of of

61:10

observability stage rolls and so on even

61:12

today I think that they're the Facebook

61:15

specifically not meta but Facebook as I

61:16

understand is still the state-of-the-art

61:18

globally in terms of how they have they

61:20

now have multiple environments automated

61:22

roll backs if something degrades you

61:24

don't even need to look at it like your

61:26

you know colleague did that

61:29

yeah uh feature flags is Another

61:31

important part of that and it was a

61:33

lesson I had to learn and and one where

61:36

code review really helped me. I'd

61:38

written some

61:39

code. I thought it looked fine. Somebody

61:43

said this looks a little janky. Put it

61:45

behind a feature flag. I'm like really

61:47

what? Okay. Okay. I you know and I was

61:50

in that headsp space of I'm going I'm

61:52

here to learn. If feature flags is what

61:55

we do then feature flag it. And I did.

61:59

And then I realized, oh, how liberating

62:02

that is as an implementer. Who is going

62:05

to be responsible? If you're not going

62:07

to be responsible, who cares? Like I But

62:11

also, talk about anxiety. If I'm if I'm

62:14

not the responsible person, that feels

62:17

horrible. But if you're going to be

62:19

responsible for whether this code works

62:21

or not, having a feature flag is just

62:23

magic because you get this

62:26

subdeployment deployment.

62:29

You deploy one software artifact that

62:32

has multiple modes and you can go, "Oh,

62:35

turn it up a little bit and

62:37

whoopsie, turn it down, let's figure out

62:40

what just went wrong." I worked on the

62:42

messenger back end for a while and we

62:46

would do that, you know, and yeah,

62:48

you've got We had one API that was

62:50

getting called a quadrillion times a

62:53

week. Wait, how much is a quadrillion?

62:56

Million billion. Yeah. So, a million

62:58

billion. So, like Wow. So, like not not

63:02

a thousand bill. Okay. Wow. A billion, a

63:04

trillion, a quadrillion. Okay. Like I

63:07

I'm used to high numbers, but this is

63:10

Oh, people would come people would come

63:12

to Facebook and they're like, "Oh, yeah.

63:14

I want to I want to do some user

63:16

testing. I want to get a I want to get a

63:18

a hundred people in my experimental

63:20

group." And I'm like, "Dude, wrong. Your

63:24

exper your experimental group is going

63:26

to be like New Zealand. Oh yeah. I I

63:29

I've heard this a lot from Facebook

63:31

people. It was a perfect perfect

63:33

experiment, you know, like only like a

63:35

million people. Yeah. Yeah. English

63:38

speaking. So localization is there. Time

63:40

zone wise it's pretty good. That's

63:42

right. And also Portugal and and some

63:45

other maybe maybe not a Facebook but

63:47

yeah also a popular one. Relatively

63:49

small size but you know real real

63:51

testing could happen there. So you you

63:53

worked for six years at at Facebook.

63:55

What is the thing that you and this was

63:57

a a really exciting time where it was

63:58

fast growth? We could probably

64:00

comparable growth to what is happening

64:01

right now with some of the hottest AI

64:03

startups and it was also mobile

64:05

revolution and so you were you were

64:07

there. What was the thing that you liked

64:09

the most about working there and and

64:11

maybe the one that you kind of disliked

64:12

the most or or or didn't didn't really

64:16

you know get along with? Facebook 2011

64:19

is a completely different beast than

64:21

Facebook 2017. Facebook 2011 2,000

64:24

employees very

64:26

sparse design and product kind of

64:31

organization. It was just all

64:34

experiments and feedback. One of my one

64:36

of my big mysteries is here was this

64:39

site

64:41

which enabled social interactions at

64:44

that time. That was the purpose of it.

64:47

Built by people with no social skills

64:50

whatsoever. Like h how in the world did

64:53

that happen? Is there some kind of is

64:55

there some kind of social wizard, you

64:57

know, hidden someplace and people go and

65:00

they burn incense and give an offering

65:02

and the social wizard says, "No, here's

65:04

how you do notifications." The answer is

65:06

no. It was a sheer

65:11

experimentation. It was

65:13

just all these people trying all this

65:16

stuff and the stuff that worked stuck.

65:19

So, it wasn't like people were making

65:21

better decisions about how social

65:23

interactions are best facilitated. They

65:25

were making random decisions about how

65:28

social interactions were best

65:30

facilitated and paying attention and

65:34

making sure that the ones that actually

65:36

seemed to work stuck. 2017, Facebook, 7

65:40

years

65:41

later, totally different deal. big

65:44

design org, big product

65:47

org, like 15,000 employees, which is

65:51

again much smaller than it is today. a

65:53

lot more politics, a lot

65:55

more uh zero sum thinking, a lot

65:59

more, you know, if you wanted to launch

66:01

a product and it was going

66:05

to say I liked longer form content,

66:09

essays, podcasts, whatever. Except the

66:13

people whose job it was to get more

66:16

likes and comments hated long form

66:20

content because it was going to tank

66:21

their numbers. So they would fight tooth

66:23

and nail to make sure that your stuff

66:26

didn't show up in the newsfeed,

66:28

which like granted that was in their

66:32

best interest, but

66:35

yeah, I see what you mean. What you

66:37

know, it's short shortterm interest.

66:39

Yeah. And and your your horizon as a

66:42

thinker, the things you can imagine

66:45

possibly implementing just gets smaller

66:48

and smaller and smaller in that kind of

66:50

world. when I when I showed up. Yeah,

66:54

you could do anything. Now, it turns out

66:56

there's a bunch of stuff that you

66:57

shouldn't do, but we didn't know that.

66:59

Sorry about democracy. But, um, yeah,

67:02

that's that's what I loved about it was

67:06

the

67:07

possibilities at its best, the

67:11

scale, and the this feeling that nothing

67:15

at Facebook is somebody else's problem.

67:18

also daunting because when so you're

67:21

wearing Facebook swag and grandma comes

67:24

up to you and

67:26

starts wagging her finger under your

67:29

nose cuz her son blah blah blah got

67:32

bullied whatever like that is your

67:35

problem you can't say oh go talk to the

67:37

PR department because there isn't one

67:38

yet you have to you have to deal with it

67:41

and I did yeah ownership yeah and you

67:44

know it comes with some downsides but it

67:46

comes with a lot of upsides too. It

67:48

feels really good. Feels very

67:50

significant to be in that kind of

67:51

environment. By the time I left, yeah,

67:54

it was micro optimizations were

67:57

everywhere. The

68:00

upside Yeah. was was not not there. When

68:05

I got there, the middle managers, best

68:07

middle managers I'd ever seen in my

68:09

career. Well, everybody who'd made it to

68:12

middle management, Facebook in 2011 was

68:15

sitting on

68:17

life-changing

68:19

equity. They were

68:21

all they h if they had if Facebook had a

68:24

successful IPO, they were all set for

68:26

life. And if Facebook the whole thing

68:30

stumbled and fell for whatever reason,

68:33

they lost that opportunity to be set for

68:35

life. So, they were globally optimizing.

68:39

you you'd talk to a team and they'd say,

68:42

"God, I would love to have you on my

68:43

team. You know who really needs help,

68:46

though?" So So they were like looking

68:48

out like the team interest, the company

68:50

interest was was on everyone's mind and

68:53

they were willing to forego, you know,

68:54

like okay, I'll I'll hold back hiring or

68:57

I'll wait like I'd love to have this

68:58

person, but this other team needs let me

69:00

help them because this is the right

69:02

thing to do for the company as a whole.

69:04

Yeah. Yeah.

69:06

And it's not like they were better human

69:08

beings than other human beings, but

69:10

their incentives were sure aligned with

69:12

that. And just being for me who has a

69:15

really hard time understanding other

69:17

human beings to be around the that kind

69:21

of

69:22

alignment that just enables a ton of

69:25

creativity, ton of energy for me. I

69:28

think more and better

69:30

thoughts and I had a hard time operating

69:34

in the environment. I can piss people

69:36

off. I don't know if you've noticed

69:37

this, but uh and and I did my share of

69:41

that while I was there, but still the

69:43

opportunity was there for me to

69:46

fumble and and

69:49

I I I can live with that. Yeah. And I

69:53

guess by the way like I think this might

69:54

be a reason why startups remain

69:57

attractive and you know big tech you

69:58

know now Facebook is big tech they used

70:00

to be a startup but along with like with

70:02

all the other big companies you know

70:04

they pay well they have a brand they

70:06

they they give you your that resume

70:08

boost it's easier to get hired

70:09

afterwards but in the end you know like

70:12

there will be teams inside of them but a

70:14

lot of them will be you know everyone's

70:15

optimizing for their own thing your

70:17

equity is mostly cash and it's

70:19

meaningless in terms of the the bigger

70:21

picture Whereas at a startup like at

70:23

Uber, I remember before the IPO, we we

70:25

used to think like that. We what is the

70:27

best thing for Uber because we were very

70:29

much we felt like we were like big

70:32

enough owners. So I think this is why

70:34

like maybe this is a good thing that

70:36

startups will always be able to have

70:38

this this added thing when you're

70:40

starting out. You know, people have

70:41

large equity. Even when you're up to

70:43

like 100 people, it might still be

70:45

significant enough. And this is maybe

70:48

it's not a bad thing that it's hard to

70:49

compete with it because imagine if

70:50

imagine if these big companies could I

70:52

mean what would be left of it right like

70:53

they they would optimize the last thing

70:55

out of everything and at least they have

70:57

to spend more money on it now right

71:00

yeah yeah which is more of the value

71:03

that's created come comes back to the

71:05

people who are creating it I I I once

71:07

talked with with a person at a large

71:09

company I don't want to name them uh

71:11

they're they're the travel company

71:12

though and I was talking with this

71:14

person and and about like something

71:17

principal engineer and I was like oh

71:21

how's the job? It's like oh it's

71:22

absolute mess. It's the the the monolith

71:25

is still there after four years it's

71:27

another like four years to disassemble

71:29

the experiment like we have experiments

71:32

everywhere but they're all messy. I was

71:33

like oh wow that sounds like like not a

71:36

great place. He's like but he's like

71:37

look look the upside is like I my job is

71:39

secure for five more years and this is

71:41

why I pay me the big bucks so I'm not

71:43

complaining. And it was, you know, like

71:46

I guess a good take of like yes, like

71:48

I'm not saying you want to optimize for

71:49

this, but this is the reality. And that

71:51

company understood, you know, they they

71:52

pay well, they relocated this person,

71:54

you know, all all all the benefits. And

71:56

he actually had his challenges set

71:58

actually for the next four years because

72:00

he's worked at this environment. You

72:01

know, it's just one thing after the

72:03

other. So yeah, it's it's one of these

72:06

things. So as closing I just have some

72:08

rapid questions which is like I'll just

72:09

I'll just fire and and then you tell me

72:11

what is your favorite programming

72:13

language although you answered this

72:14

already. What is your second favorite

72:16

one after small talk? JavaScript.

72:19

JavaScript. Okay. Why?

72:22

It's uh it's just small talk.

72:25

Okay. What what is your favorite AI tool

72:29

that you're using right now?

72:31

Claude. I use it for all kinds of

72:34

different things. claw code as well or

72:36

just claude cla code under the covers of

72:39

cursor or a

72:41

augment or uh I don't I don't know what

72:45

rude code is no so so clot code is is a

72:48

different it's a command line tool that

72:49

clot has it's an agent of of itself like

72:53

it's not the model we have not used but

72:55

we'll try it now afterwards you should

72:58

try it and just see how it compares yeah

73:00

I'll wait till we're done talking though

73:01

yeah

73:01

[Laughter]

73:03

and And what what is a book that you

73:06

would recommend? The one that you have

73:08

not written. We we know your books. The

73:10

one one that you enjoyed. It can be

73:11

fiction. It can be non-fiction. Uh the

73:13

timeless way of building by Christopher

73:15

Alexander. Nice. Well, well, Kent, this

73:17

was a lot of fun. It was it was good to

73:20

reconnect. Oh, yes. Great talking to

73:22

you. Thanks. I'm just happy to see how

73:24

much energy how energized you are with

73:27

with with coding because I think when I

73:29

started with with some of these tools, I

73:30

was like, a bit of a dread like, oh,

73:32

what's what they're going to do, etc.

73:33

But the more I use them, I'm I'm not at

73:35

your level yet. The more I'm also like,

73:37

this is actually it it does bring a lot

73:39

of fun and joy back into them. Just more

73:41

ambition. Yep. Yeah. Yeah. And I think

73:44

that organizations are going to have to

73:45

get used to throwing away a lot more

73:47

code because you can try ideas so much

73:49

more cheaply. You're go you're going to

73:52

generate 10 times as many artifacts as

73:55

you used to, but still only one of them

73:58

is worth keeping. But throwing away

74:04

uh completed experiments. I almost said

74:06

failed completed experiments

74:10

uh needs to be you get the pat on the

74:13

head for doing that. Excellent. Eight.

74:16

Eight this week only six late last week.

74:18

Super. How many of them lasted? Doesn't

74:22

matter. And getting used to that I think

74:24

is going to be an interesting shift. the

74:28

companies that have the opportunity that

74:32

can be explored in that way. If you get

74:35

used to

74:36

uh just quantity of ideas

74:39

explored, you're going to have a huge

74:41

huge advantage.

74:43

Yeah, it's there's going to be changes.

74:45

So, this will be an excite exciting

74:47

place to see. So, it was great chatting

74:49

and we we'll see where this goes. All

74:50

right, Gery. So, good to talk to you

74:52

again. Look forward to talking to you

74:54

again soon. I really enjoyed catching up

74:56

with Kent and it's motivating to see how

74:58

these AI tools can make programming so

75:00

much more fun, even for someone who's

75:01

been a coder for decades. You can read

75:03

more about what Kent is up to on his

75:05

regular newsletter, Tidy First, which is

75:07

linked in the show notes below. For a

75:09

deep dive into Facebook's engineering

75:11

culture and an analysis on why scrum and

75:13

agile with a capital A is no longer that

75:16

relevant at big tech at scaleups, check

75:17

out the pragmatic engineer deep dives,

75:19

also linked in the show notes below. If

75:21

you enjoy this podcast, please do

75:22

subscribe on your favorite podcast

75:23

platform and on YouTube. This helps more

75:26

people discover the podcast and a

75:28

special thank you if you leave a rating.

75:30

Thanks and see you in the next

Interactive Summary

The video features a conversation with Kent Beck, a legendary figure in software engineering, about his experiences with AI coding tools and his reflections on the evolution of software development. Beck likens AI agents to "unpredictable genies" that can be immensely helpful but also prone to misinterpretations and unintended consequences, drawing parallels to the "do what I mean" concept. He discusses how these tools have made programming more fun and productive, even after 50 years in the field, by amplifying his ability to think big thoughts and tackle ambitious projects. The conversation also delves into the origins of Extreme Programming (XP) and the Agile Manifesto, with Beck sharing insights into the collaborative process and his thoughts on the term "agile" itself. He contrasts the early days of agile development with current practices in large tech companies, highlighting the importance of continuous feedback, rapid iteration, and a culture of shared responsibility. Beck also elaborates on the genesis of Test-Driven Development (TDD), explaining how it transformed his emotional experience of programming by reducing anxiety and enabling a more confident approach to design and implementation. He shares his experiences at Facebook, noting the unique environment that fostered rapid innovation and a strong sense of ownership, contrasting it with the more politically charged atmosphere of larger, more established companies. The discussion touches upon the impact of AI on the software engineering landscape, emphasizing the need for continuous experimentation and adaptation as the cost of development and the nature of programming shift dramatically.

Suggested questions

5 ready-made prompts