文本记录English

Essential Skills for AI Coding from Planning to Production — Matt Pocock (@mattpocockuk )

1h 36m 12s17,056 字数2,475 segmentsEnglish

完整文本记录

0:14

Yeah, we good.

0:17

>> Okay, folks, we're at capacity. Let's

0:20

kick off. I don't want you waiting here

0:22

for 25 more minutes before we some

0:24

arbitrary deadline. So, welcome. My name

0:28

is Matt. Uh I'm a teacher and I suppose

0:31

now I teach AI. Um

0:35

we have a link up here if you've not

0:37

already been to this which is has the

0:39

exercises for the um stuff we're going

0:41

to do today. This is going to be around

0:43

two hours. So we might just sort of kick

0:44

off two hours from now. Is that right

0:46

Mike?

0:48

>> Yeah. Perfect. Um, and the theory behind

0:52

this talk or at least the thesis under

0:53

which I've been operating for the last

0:55

kind of six months or so is that

0:59

we all think that AI is a new paradigm,

1:01

right? AI is obviously changing a lot of

1:03

things. You guys are obviously

1:04

interested in this and that's why you've

1:05

come to this talk. And

1:09

I feel that

1:12

when we talk about AI being a new

1:14

paradigm, we forget that actually

1:17

software engineering fundamentals, the

1:19

stuff that's really crucial to working

1:21

with humans, also works super well with

1:24

AI. And this is what my keynote is on

1:27

tomorrow. Really, I'm going to sort of

1:28

be fleshing that out a lot more. And in

1:30

this workshop, I'm hopefully going to be

1:32

able to direct your attention to those

1:34

things and uh hopefully show you that

1:38

I'm right, but we'll see. Um, can I get

1:41

a quick heads up first? How many of you

1:44

guys um are coding have ever coded with

1:47

AI? Raise your hand if you've ever coded

1:48

with AI. Perfect. Okay. Uh, keep your

1:51

hand raised.

1:53

Uh, let's all uh share those armpits

1:56

with the world. Um,

1:58

how many of you code every day with AI?

2:01

Cool. Okay. Uh, ra keep your hand raised

2:04

if you've ever been frustrated with AI.

2:08

Okay. Very good. You can put your hands

2:10

down. Thank you for that show of

2:12

obedience. I really appreciate that. Um,

2:14

we are also being live streamed to the

2:15

Gilgood room as well. I've not uh did we

2:18

send someone up to the Gilgood room to

2:20

just check they're okay? Don't know. But

2:22

I see you. Uh, and there is a way that

2:25

you can participate which is we have the

2:27

um a Q&A. We're going to be doing kind I

2:30

have a sort of hatred of Q&As's because

2:31

they're not very democratic. The mostly

2:33

the sort of um most talkative people get

2:36

to um get to participate and share. And

2:39

so we're going to be going through this

2:41

um QA here. So why do we have to wait

2:43

till 3:45? The room is packed. The doors

2:45

are closed. 100% agree. And so if you

2:48

want to uh ask a question, we're going

2:50

to be I would like you to pile into this

2:52

async and then we can vote on each

2:53

other's questions and hopefully get the

2:55

best question surface so the for the

2:57

entire room to enjoy.

3:00

So I want to talk about first the kind

3:02

of weird constraints that LLMs have and

3:07

those weird constraints are sort of what

3:09

we have to base a lot of our work

3:11

around. Now,

3:14

there's a guy called Dex Hy who runs a

3:16

company called Human Layer, and he came

3:18

up with this idea, which is that

3:21

when you're working with LLMs, they have

3:24

a smart zone and a dumb zone. When

3:28

you're first kind of like working with

3:30

an LM and it's like you just started a

3:32

new conversation, you start from

3:34

nothing. That's when the LLM is going to

3:35

do its best work because in that

3:37

situation, the attention relationships

3:39

are the least strained. Every time you

3:41

add a token to an LLM, it's kind of like

3:44

you're adding a team to a football

3:45

league. You think of the number of

3:47

matches that get added every time you

3:50

add a team to a football league. It just

3:51

go scales quadratically. And that's

3:54

because you have attention relationships

3:55

going from essentially each token to the

3:58

other that are positional and the sort

4:00

of meaning of the individual token. And

4:02

so this means that by around sort of 40%

4:05

or around I would say around 100k is

4:08

kind of my new marker for this because

4:09

it doesn't matter whether you're using 1

4:11

million uh context window or 200k. It's

4:15

always going to be about this.

4:17

It starts to just get dumber. So as you

4:21

continually keep adding stuff to the

4:23

same context window, it just gets dumber

4:25

and dumber until it's making kind of

4:26

stupid decisions. Raise your hand if

4:28

that feels familiar to you. Yeah. Cool.

4:31

So this means that we kind of want to

4:34

size our tasks in a way that sticks

4:37

within the smart zone, right? We don't

4:39

want the AI to bite off more than it can

4:41

chew. And this goes back to old advice

4:44

like Martin Fowler in refactoring uh

4:46

like uh the pragmatic programmer talks

4:48

about this. Don't bite off more than you

4:50

can chew. Keep your tasks small so that

4:53

you as a developer, a human developer

4:55

don't freak out and don't start acting

4:57

and going into the dumb zone.

5:01

But how do you tackle big tasks? How do

5:04

you take a large task like I don't know

5:07

cloning a company or something or just

5:09

doing something crazy? And how do you

5:12

break it into small tasks so they all

5:13

fit into the dumb zone? One way of

5:16

course you could do is I mean kind of

5:18

what the AI companies maybe want you to

5:20

do or the natural way of doing it is

5:21

just keep going and going and going. You

5:23

end up in the dumb zone charging you

5:24

tons of tokens per request. You then

5:26

compact back down. We'll talk about

5:29

compacting properly in a minute. And you

5:31

keep going, keep going, keep going,

5:32

compact back down, keep going, keep

5:33

going, keep going. And I think that's

5:36

doesn't really work very well because

5:38

the more sediment, we'll talk about that

5:40

in a minute. So the theory here is then,

5:43

and this is what I was doing for a

5:44

while, is I would use these kind of

5:48

multi-phase plans where I would say,

5:50

okay, we have this sort of number four

5:53

thing here, this large large task. Let's

5:55

break it down into small sections so

5:57

that we can then kind of chunk it up and

5:59

do each little bit of work in the smart

6:01

zone. Raise your hand if you've ever

6:03

used a multi-phase plan before. Yeah,

6:06

really common practice, right? This is

6:08

kind of how we've been doing it.

6:09

Certainly, this is how I was doing it up

6:11

until December last year really.

6:14

And any developer worth their salt will

6:16

look at this and go, "This is a loop,

6:19

right? This is a loop. We've just got

6:21

phase one, phase two, phase three, phase

6:23

four. Why don't we just have phase n,

6:27

right?

6:29

Phase n where we essentially just say,

6:31

okay, we have, let's say, a plan

6:33

operating in the background and then we

6:35

just loop over the top of it and we go

6:37

through until it's complete. And this is

6:39

where um raise your hand if you've heard

6:41

of Ralph Wiggum as a software practice.

6:44

Okay, cool. Raise your hand if you've

6:45

not heard of Ralph Wigum as a software

6:46

practice. Actually, that's more like it.

6:48

Okay. So there's this idea called Ralph

6:50

Wigum uh which is kind of um sort of

6:52

based on this which is essentially

6:56

all you need to do is sort of specify

6:58

the end of the journey where you just

7:00

say okay we create a PRD a product

7:02

requirements document to say okay let's

7:05

describe where we're going and then we

7:07

just say to the AI just make a small

7:09

change make a small change that gets us

7:11

closer and closer to there and Ralph

7:14

works okay but I prefer a little bit

7:16

more structure so that's kind where we

7:18

got to in terms of thinking about the

7:21

smart zone. And that's kind of where I

7:23

want you to first start thinking about

7:25

here. Another weird constraint of LLM is

7:29

LLM are kind of like the guy from

7:30

Momento, right? They just continually

7:32

forget. They could just keep resetting

7:34

back to the base state. Let me pull up

7:36

this diagram.

7:38

I sort of I I I really should use

7:41

slides, but I just prefer just like

7:42

randomly scrolling around a infinite uh

7:45

TL draw canvas. Thank you, Steve.

7:48

Um,

7:49

so let's say another concept I want you

7:52

to have is that every session with an

解锁更多

免费注册以访问高级功能

互动查看器

观看带有同步字幕、可调节叠加层和完整播放控制的视频。

免费注册以解锁

AI 摘要

获取由 AI 立即生成的视频内容摘要、要点和结论。

免费注册以解锁

翻译

一键将字幕翻译成 100 多种语言。以任何格式下载。

免费注册以解锁

思维导图

将字幕可视化为交互式思维导图。一目了然地了解结构。

免费注册以解锁

与字幕聊天

提出关于视频内容的问题。直接从字幕中获取由 AI 驱动的答案。

免费注册以解锁

从您的字幕中获得更多

免费注册并解锁交互式查看器、AI 摘要、翻译、思维导图等。无需信用卡。

    Essential Skills for AI Coding… - 完整文字记录 | YouTubeTranscript.dev