HomeVideos

He Saved Us All

Now Playing

He Saved Us All

Transcript

506 segments

0:00

There is a computer scientist that is

0:02

super wellknown, but a lot of the things

0:04

that he did during his career are well,

0:07

they're unknown. I have a good feeling

0:09

like you know him by his shortest path.

0:12

Yes, today we are talking about Edgar

0:13

Dystra, of course, creator of Dystra's

0:15

shortest path algorithm. By the way, you

0:18

don't love him at his shortest path, you

0:19

don't deserve him at his longest. And

0:21

today we're going to be celebrating

0:23

Edgar Dystra by giving him the highest

0:26

known achievement any programmer can

0:28

possibly receive in their lifetime. The

0:31

programmer of the month at the startup

0:34

touring award, Nobel Peace Prize,

0:37

programmer of the month. The thing about

0:39

Dystra is he didn't just do the shortest

0:41

path, which by the way, the way he comes

0:43

up with the shortest path is just out of

0:46

control, but he actually comes up with

0:48

many more things that we use to run

0:50

operating system and distributed

0:52

systems. He also did a lot of

0:53

foundational work that ends up appearing

0:55

in a lot of the modern languages that

0:57

you use today. And he prevented one of

0:58

the greatest disasters in all of

1:01

programming. And to top it all off, the

1:03

man has some oneliners that are just

1:07

So today we celebrate Edgar Dystra,

1:10

programmer of the month. Now, before we

1:13

begin, a quick word from the sponsor.

1:15

>> She's seen the latest database CEO

1:17

monthly.

1:17

>> Whoa, nice uptime. I'd love to get my

1:20

data in that.

1:21

>> You mean you haven't even connected yet?

1:23

We can use my Planet Scale account.

1:26

>> It's called Planet Scale and it's really

1:28

rad. Those database queries are super

1:30

fast. Branches, migrations, query

1:32

insights too. My SQL and Postgress are

1:35

easy to use. Yeah, go planet scale. Get

1:38

data.

1:41

>> It's Postgress.

1:42

>> Planet Scale. The easiest MySQL or

1:44

Postgress database to use. Your

1:46

developers or parents help you hook it

1:47

up. Data sold separately.

1:50

>> Welcome back. All right. Before we get

1:51

to know Dystra, the legendary computer

1:54

scientist, let's learn a little bit

1:55

about his early years. Dystra was born

1:58

in Roderdam in 1930. He described his

2:01

father at one time the president of the

2:03

Dutch Chemical Society as an excellent

2:05

chemist and his mother, a brilliant

2:07

mathematician who had no job. Huh,

2:10

sounds like any mathematician I know. In

2:13

1951, Dystra's father suggested he

2:15

attend a 3-week course on programming in

2:18

Cambridge. It turned out to be an idea

2:20

with farreaching consequences. Yes, that

2:22

little tiny suggestion by his father.

2:24

Those three weeks changed the course of

2:26

computing history by getting Dyster to

2:28

get off the track of physics and onto

2:30

the real and pure science of computing.

2:33

Now, the early part of Dyra's career

2:35

started off in the center of

2:37

mathematics. This is where he studied

2:40

computing and defended his PhD thesis.

2:42

He was there from 1952 to 1962. Now, he

2:46

received his PhD in 1959, but he

2:49

actually created the shortest path

2:51

algorithm in 1956,

2:54

and the story for it is just so dang

2:56

good. One morning, I was shopping in

2:58

Amsterdam with my young fiance and

3:00

tired, and we sat down on the cafe

3:02

terrace to drink a cup of coffee, and I

3:04

was just thinking about whether I could

3:05

do this. Of course, this being the

3:07

shortest path from Rotterdam to

3:09

Gronigen, Grroning, Gronigan, the n the

3:12

name is Gronagen. So he was already

3:14

thinking about the shortest path and

3:16

then I designed the algorithm for the

3:18

shortest path and as I said it was about

3:19

a 20inute invention. In fact it was

3:21

published in 1959 3 years later. The

3:24

publication is still readable. It is in

3:26

fact quite a nice one. Was really just

3:28

patting himself on the back by the way.

3:30

That entire paragraph mogged everybody

3:33

several times over. He was just off

3:35

having a nice cup of coffee. A little

3:37

tired from shopping. H man. I just not

3:40

you know it's kind of difficult here.

3:42

Let me just do a quick invention that's

3:45

going to blow the minds of the world,

3:47

make gaming super awesome, and also make

3:49

networks possible. Oh yeah, he's also

3:51

going to do it in 20 minutes without a

3:53

whiteboard, just his brain. You know,

3:55

sometimes I like to pretend myself a

3:57

smart man, but I this this is just

4:01

mogging, okay? There's nothing there's

4:02

nothing I can do in the light of his

4:04

intellect, okay? [laughter]

4:06

I am like a caveman. I feel like the guy

4:09

on idiocracy trying to put the square

4:11

block into the round hole. Now, right

4:13

around when he defended his PhD thesis,

4:16

he started to work on the Algo 60

4:18

compiler. Now, this was an impressive

4:20

feat. First off, Alol is a computing

4:22

language that's going to be a highlevel

4:24

language. This is one of the first ones

4:26

kind of really entering the scene. And

4:27

second, it's not just that you're

4:29

building a compiler which had relatively

4:31

low amounts of study comparison to what

4:33

we have today, but it's also the machine

4:35

that it ran on. The most obvious problem

4:37

the pair faced, by the way, the pair

4:39

would be Mr. uh Dykes run along with it,

4:42

Dr. Zonavald, was that the machine

4:44

designated to run the software, the

4:45

Dutch Electrologica X1 computer, had a

4:48

memory of only 4,096

4:51

words. Now, you may not be familiar with

4:52

the term word. That's just going to be a

4:54

chunk of memory. Specifically for this

4:56

machine, it was 27 bits per word. I know

4:59

this was I mean, during this time,

5:01

computing was so out of control, powers

5:03

of two weren't even the standard. 27

5:06

bits. What? What are we going to do with

5:09

27 bits? I bet he would kill a bite for

5:12

some more memory. By comparison, the

5:14

memory of a present-day laptop is larger

5:16

by a factor of a million. But towards

5:18

the end of his 8-month stint with Algo

5:20

60, he separated ways. Algo 60 was

5:23

designed by an international committee.

5:25

And although Dyster attended several

5:26

meetings during the design process, his

5:28

name does not appear among the 13

5:29

editors of the final report. Apparently,

5:31

he disagreed with a number of majority

5:33

opinions and withdrew from the

5:35

committee. This was perhaps the first

5:37

public sign of his fiercely held

5:39

independence. In 1962, he ends up

5:42

leaving the mathematical center and

5:43

heads on over to the Einhovven

5:45

University of Technology where a lot of

5:47

his work, the things that you use, the

5:49

things that you rely on happened and you

5:52

probably don't even know they happened.

5:54

What? You just a jerk maneuver right

5:57

there. Now when Dyster goes to the

5:59

university, he starts working on the

6:01

multi-programming operating system where

6:03

his love of parallel programming was

6:05

fostered and he ended up coming up with

6:07

a lot of really cool concepts. This work

6:10

was taken from EWD123.

6:12

Hey, you're probably wondering what the

6:14

heck is an EWD123.

6:16

Well, it's actually pretty simple. EWD

6:18

is just Edgar's initials, but the 123 is

6:20

the 123rd post in his little kind of

6:24

blogging series kind of handwritten

6:26

letters that he would send out to other

6:27

academics. He effectively was a YouTuber

6:29

in his day. He's just like me except for

6:32

he was smart and probably pretty

6:34

good-looking. An extensive 87page report

6:38

titled cooperating sequential processes.

6:40

Now, you're probably like thinking like,

6:41

"Hey, Prime Prime, is that is that the

6:43

Go thing? Is that Goof Funks?" No, no,

6:44

no, no, no, no, no. This is kind of the

6:46

first version of it. Later on, Tony

6:48

with some inspiration from Edgar

6:51

Dystra ended up writing communicating

6:53

sequential processes which became the

6:55

foundation of Go Funk. Now, in the same

6:58

report, he introduced the first known

6:59

synchronization primitive which he

7:02

termed semaphore. Yes, he created the

7:05

semaphore which was the basic and the

7:07

first kind of version of a mutex. A

7:09

semaphore of with one that's just a

7:11

mutex. Obviously not modern sweet

7:14

amazing mutexes with the threads in

7:16

recursion and all these kind of things

7:18

but the very first standard version just

7:21

a semaphore. Now you may not be familiar

7:23

with what a semaphore is. It's pretty

7:25

simple. Let's imagine you have this

7:27

thing right here which is a lock and you

7:29

can put a number on it. Let's just say

7:31

we have a number of one and you have a

7:33

bunch of threads that are all going into

7:34

this trying to say reach or touch some

7:38

sort of value or mutate some sort of

7:39

value. Well, you can't have all these

7:41

extremely and well-drawn straight lines

7:44

go in and mutate the same value at the

7:46

same time. That creates a data race. So,

7:49

what you do is you have a little lock

7:50

and whichever one arrives first takes

7:53

this number and down like decrements it

7:56

atomically. Oh no, it's at zero. Nobody

7:58

else can go in. So, this guy goes in,

8:00

does whatever, you know, maneuvers he

8:02

needs to and gets on out. Next person

8:04

can go in, decrement, do whatever they

8:07

need to, and go out. The next person

8:09

goes in, does whatever it needs to, and

8:11

leaves. Each time they leave, you can

8:13

imagine they increment the number, and

8:14

the next person decrement, increment,

8:16

decrements, increments. You get the

8:18

idea. This effectively allows only so

8:21

many things through at the same time.

8:23

Now, there's probably a bit more

8:24

complication that's going on, but this

8:26

is just like the simplest way to look at

8:28

it. He also identified the deadlock

8:30

problem, which he named the deadly

8:32

embrace. Now, you're thinking,

8:35

what is this, a Greek tragedy? Is this

8:37

is this this is Odysius going out

8:38

somewhere? Yes, the deadly embrace,

8:40

which by the way, amazing name. Also,

8:43

pretty sure it's a slay the spire card

8:46

if I'm not mistaken. If it was up to me,

8:48

I think we should continue to call it

8:50

the deadly embrace and not a deadlock.

8:52

To give you the simplest explanation,

8:54

let's pretend we had some sort of

8:56

database resource and it was like a

8:58

mutex. You can only have one person

9:00

owning that resource at a time. And

9:02

let's pretend that there's two different

9:04

threads running. We have A and we have

9:06

B. Now, these guys can run

9:07

independently. They don't rely on each

9:09

other. Everything's fantastic. And A

9:11

goes, "Hey, I want to use the database."

9:12

But unfortunately, B already has a lock

9:15

on the database. So A is just going to

9:17

sit there and wait. You know, it's just

9:18

going to be a happy little boy hanging

9:20

out, having a good time. Well, what

9:22

happened if B is like, "Hey, the result

9:23

from A." What's going to happen? Well,

9:25

A's waiting for B, but B's waiting for

9:27

A. Deadly embrace. They've embraced each

9:31

other. deadly like [laughter]

9:33

this is. See, this is why I'm not the

9:36

smart guy. This is why I don't have my

9:38

own crime 123. The mutual exclusion

9:41

problem along with deadlock detection

9:43

and prevention are now mandatory topics

9:46

in courses on operating systems and

9:47

parallel programming. Yes, Dystra is

9:50

effectively the father of parallel

9:52

computing. And you didn't even know

9:54

that, did you? Kids these days. In 1968,

9:58

Dystra ended up penning a nice little

10:01

article here called go-to statement is

10:03

considered harmful. Now, the thing is is

10:05

that originally it was not called that

10:07

in the book we programmers, which I

10:10

might have written a forward to. You

10:12

learn that he originally titled it a

10:14

case against the go-to statement in

10:16

which Nicholas Worth, the editor,

10:18

renamed it to Go-To Statements

10:20

Considered Harmful, which became such a

10:22

popular paper, you probably even knew

10:24

about that paper whether or not you read

10:26

it. Now, here's the thing. Back in those

10:28

days, in 1968, the largest possible

10:31

program was some IBM OS totaling right

10:34

around 1.7 million lines of code. I just

10:37

want you to think about that for a

10:38

second. There were 1.7 million line code

10:43

projects

10:44

with just go-to statements, hundreds if

10:47

not tens of thousands of them all over

10:50

the place. Like programming had to be

10:53

just insane during those days. And Dyrup

10:57

had to go and argue, which took a decade

11:00

to convince people, hey yo, go to that's

11:02

not good. That's not good at all. If you

11:04

don't know what a go-to is, you can

11:06

imagine you just have like a bunch of

11:07

lines of code anywhere in here. You can

11:09

just be like go to and then you can say

11:12

some sort of offset, some sort of label

11:14

into another location and it will just

11:16

go over there whatever there is. Now at

11:21

one point this made sense before we had

11:23

any sort of highle language. If

11:25

statements are just gotos, right? If

11:27

this condition is true, continue else go

11:30

to the end of the statement. That

11:32

actually makes a lot of sense. So you

11:34

can imagine why gotos were around. Now

11:37

if this war didn't happen and Dystra

11:39

didn't really lead the charge against

11:40

the go-to statements and people were

11:42

kind of just okay with second best, we

11:46

could have had JavaScript with goto

11:48

statements. I you think React is bad

11:52

now? Imagine server components with

11:54

gotos and you have to be like use client

11:56

go to jumping into like server code. It

12:00

would have just been nuts. But honestly,

12:02

there's just like this small part of me

12:04

that thinks JavaScript it deserves a

12:06

go-to. And this kind of war against the

12:08

go-to became a larger war in which

12:10

Dystra argued that we need to be using

12:12

if statements and for loops and higher

12:14

level constructs to easier understand

12:17

the program that we're writing. This

12:18

became structured programming. It became

12:20

the like mantra of his that we need to

12:23

have easily comprehendable programming

12:26

languages. Thank you, Dystra. I mean, I

12:28

still know it resulted in JavaScript,

12:30

but you get the idea. Thank you, Dystra.

12:31

And still at Einhovven in 1972, he did

12:34

receive the ACM touring award. Now,

12:37

remember touring award, Nobel Peace

12:39

Prize, programmer of the month. Don't

12:41

forget that. Widely considered the

12:43

second most important prize in computing

12:45

science, he was recognized for

12:47

fundamental contributions to programming

12:49

as a high intellectual challenge for

12:52

eloquent insistence and practical

12:54

demonstration that programs should be

12:55

composed correctly, not just debugged

12:58

into correctness. for illuminating

13:00

perceptions of problems at the

13:01

foundation of programming design. This

13:03

statement right here is actually just

13:05

like I mean in today's LLM world, this

13:08

is kind of like this almost hilarious

13:10

view. It's almost like we have inverted

13:12

what Dystro would consider good cuz I I

13:15

always often wondered would Dystra like

13:18

LLMs doggy. Hi, what do you want from

13:21

me? I'm trying TO DO A YOUTUBE VIDEO.

13:24

Silly dog. You know, I often wonder what

13:27

would Dystra think of today's LLM world.

13:30

Well, we do have a little bit of a hint

13:32

the not just debugged into correctness

13:34

part of his touring award because when

13:36

he left Einhovven University in 1984 and

13:40

went to Austin, Texas up until his

13:42

retirement in 1999, he spent the

13:44

majority of his work working through

13:47

proofs and formal proofs for

13:48

programming. He believed that all

13:51

programs should be provably correct, not

13:53

just, hey, I think this is correct. not,

13:55

hey, I believe we have something that

13:57

works. We have enough unit tests to

13:59

prove that all the bugs we've ever found

14:01

haven't happened again. But he wanted to

14:03

believe that all things could be always

14:06

correct. Would he look on to this time

14:08

and think, what the hell's happening? Or

14:11

would he be stoked? because it is such a

14:13

uniquely magical period of time in which

14:16

we can speak English and out comes

14:20

computer program like that is it is

14:23

whether you like them or not that is

14:25

just absolutely magical. That is

14:27

something I never thought I could ever

14:29

see. In fact, I I have largely operated

14:32

under the assumption that a program

14:33

can't tell if it's going to halt. And

14:35

now we have things that appear to know

14:38

when a program is going to halt. It's

14:40

honestly kind of a a magical experience

14:42

that we live in. So, would he look at

14:44

this with disdain and say that we're all

14:46

bunch of slop cannon coding bums? Or

14:49

would he actually look at this and go,

14:51

"This is amazing. What a new and

14:54

incredible time period." Well, this is

14:56

where we get to a lot of his quotes. And

14:58

I think when you read through his

14:59

quotes, you probably get a little bit

15:00

better of an idea of what he might or

15:03

might not think during this time. It is

15:05

practically impossible to teach good

15:07

programming to students that have had

15:08

prior exposure to basic. As potential

15:11

programmers, they are mentally mutilated

15:13

beyond hope of regeneration. Damn, dude.

15:17

I started on Q Basic.

15:20

Dude, I'm getting second hand destroyed

15:22

right now. The use of cobalt cripples

15:24

the mind. Its teaching should therefore

15:26

be regarded as a criminal offense. Hey,

15:30

Admiral Grace Hopper, still love you.

15:32

You you might get yourself a little

15:34

programmer of the month. Okay. APL is a

15:36

mistake carried through to perfection.

15:38

It is a language of the future for the

15:40

programming techniques of the past. It

15:42

creates a new generation of coding bums.

15:44

Program testing can be used to show the

15:46

presence of bugs, but never show their

15:48

absence. It's actually an incredible

15:50

insight for this, especially in just our

15:52

world of, hey, just put the guy put the

15:55

guidelines on the slop cannon and bro,

15:56

you got yourself something amazing on

15:58

the other side, which is really this,

16:00

like, can you know all the outcomes? Do

16:02

you can you actually control for all

16:04

these things or are you accidentally

16:06

letting sinister bugs run loose in your

16:09

system? This is one of my personal

16:10

favorites. If in physics there's

16:12

something you don't understand, you can

16:14

always hide behind uncharted depths of

16:16

nature. You can always blame God. You

16:18

didn't make it so complex yourself. But

16:21

if your program doesn't work, there is

16:23

no one to hide behind. You cannot hide

16:26

behind an obstinate nature. If it

16:28

doesn't work, you've messed up. Well, I

16:31

mean, now we have Claude. Okay, Claudius

16:33

Maximus. We can we can blame Claude,

16:35

stupid Claude, for not supporting

16:37

openweight models. My other big favorite

16:39

one. Object-oriented programming is an

16:42

exceptionally bad idea which could have

16:44

only originated in California.

16:47

I mean something so beautiful. I mean it

16:50

just makes me so stoked. Also this one

16:52

reminds me of Lacun Lunquin. Laquan Lun

16:56

the guy the used to be guy from

16:57

Facebook. The effort of using machines

16:59

to mimic the human mind has always

17:01

struck me as rather silly. I'd rather

17:03

use them to mimic something better.

17:05

Which is totally right. Right. Because

17:07

like Stockfish is better than all of

17:10

humanity at chess. Like [laughter]

17:12

we as a collective whole couldn't beat

17:15

Stockfish. So having like human

17:17

intelligence, I don't know, it's

17:20

probably not all that good. And

17:22

obviously before we go, I do have to

17:23

give you a couple little fun facts. He

17:25

also never purchased a computer. Yes,

17:27

the man who carried computer science on

17:30

his shoulders never purchased a

17:32

computer. I married a Dutch marriage

17:34

rights require you to state your

17:36

profession and I stated I was a

17:38

programmer. The municipal authorities of

17:40

the town of Amsterdam did not accept it

17:42

on the grounds that there was no such

17:44

profession. Bro, imagine, dude, we

17:46

already have a hard enough time with

17:48

Arch Linux users, but imagine getting

17:50

rejected because they're like, "Arch

17:51

Linux, that's not even a real operating

17:52

system, bro. You can't get married. You

17:55

No. No. No marriage for you. You and

17:57

your fake profession of programming.

18:00

Okay, buster." Yeah, that's a that's a

18:02

real one. Well, this is to you, Edgar

18:04

Dystra, and we appreciate and celebrate

18:06

your contributions to all of the field

18:09

of computing. And this is why you win

18:11

this month's programmer of the month

18:14

from the startup, multi-billion, of

18:16

course. And hopefully this title makes

18:18

more sense. The man who carried computer

18:20

science on his shoulders. We could

18:22

literally have go-to statements in

18:24

JavaScript right now. So, you better

18:26

thank him. I want to see some thank yous

18:27

in the comments. By the way, just

18:29

special shout out to Kristoff Apt. Uh,

18:31

amazing article. I left out so many

18:34

amazing details. I strongly recommend

18:37

you go and read the entire dang thing.

18:39

The name is the shortest pathogen.

Interactive Summary

This video celebrates the life and profound contributions of computer scientist Edsger Dijkstra. Beyond his famous shortest path algorithm, which he famously invented in 20 minutes, Dijkstra pioneered foundational concepts in operating systems, concurrent programming, and structured programming. He introduced key synchronization primitives like semaphores, identified critical problems such as deadlocks, and campaigned against the use of 'go-to' statements. The video also touches on his 'EWD' series of technical writings and his unique, often controversial, perspectives on programming languages and formal correctness, highlighting why he remains a pillar of computer science.

Suggested questions

4 ready-made prompts