bsdcan 2009 programmers learn what they live •if a programmer reads good code she will write good...

137
! ! !"#$%& ())* "+,&-,.- 1

Upload: others

Post on 07-Aug-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

! !

!"#$%&'())*'"+,&-,.-

1

Page 2: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Thinking about thinking in code

George V. Neville-Neil

BSDCan 2009

Ottawa, Canada

Page 3: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

What is this about?

3

Page 4: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

What is this about?• This is not about any particular BSD

3

Page 5: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

What is this about?• This is not about any particular BSD

• This presentation is about how we think about coding

3

Page 6: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

What is this about?• This is not about any particular BSD

• This presentation is about how we think about coding

• The opinions expressed are those of the author and do not reflect the opinions of any BSD project...

3

Page 7: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

What is this about?• This is not about any particular BSD

• This presentation is about how we think about coding

• The opinions expressed are those of the author and do not reflect the opinions of any BSD project...- Yes, this is a bit of a rant

3

Page 9: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

4

Page 10: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

4

Page 11: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

Bill Gates

4

Page 12: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

Bill Gates

4

Page 13: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

Bill Gates

People who build software are soooo much more innovative than people who build cars.

4

Page 14: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

Bill Gates

People who build software are soooo much more innovative than people who build cars.

4

Page 15: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

A ChallengeIf GM had kept up with technology like the computer industry has, we would all be driving $25 cars that got 1000 MPG.

Bill Gates

People who build software are soooo much more innovative than people who build cars.

Or are we?

4

Page 16: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Just how is GM doing?

5

Page 17: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How about Microsoft?

6

Page 18: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

MSFT vs. GM Who’s Better?

7

Page 19: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

GM’s Original Product

8

Page 20: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

GM’s Latest Product

9

Page 21: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Sometimes you take a wrong turn

10

Page 22: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

and you never recover...

11

Page 23: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Changing Internals of Autos

12

Page 24: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Are we assembly line programmers?Automobiles

• Assembly Line

• Modular Design

• Unified UI

• Just In Time Delivery

Software

• Waterfall Model

• Modules

• Objects

• Components

• Re-use

• Design Patterns

13

Page 25: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Parts Used in Construction

14

Automobile

• Engine

• Brakes

• Drive Train

• Wheels

• Transmission

• Door Locks

• Exhaust System

Operating System

• Kernel

• Scheduler

• Memory

• VM

• I/O

• Filesystem

• Sockets

Page 26: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

MSFT’s Early Product

15

Page 27: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

MSFT’s Latest Product

16

Page 28: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Early Innovation?

17

Page 29: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Still thinking differently?

18

Page 30: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

One of “our” early products

19

Page 31: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

One of our recent products

20

Page 32: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Never forget your history!

21

Page 33: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Well, perhaps that’s just UIs

22

Page 34: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Well, perhaps that’s just UIs

22

• Users force us to provide these types of systems.

Page 35: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Well, perhaps that’s just UIs

22

• Users force us to provide these types of systems.

• Paradigm shift is hard.

Page 36: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Well, perhaps that’s just UIs

22

• Users force us to provide these types of systems.

• Paradigm shift is hard.

• If we make it too different it won’t sell.

Page 37: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Well, perhaps that’s just UIs

22

• Users force us to provide these types of systems.

• Paradigm shift is hard.

• If we make it too different it won’t sell.

• We’re just implementing the marketing spec!

Page 38: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Well, perhaps that’s just UIs

22

• Users force us to provide these types of systems.

• Paradigm shift is hard.

• If we make it too different it won’t sell.

• We’re just implementing the marketing spec!

• What’s under the hood is totally different!

Page 39: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Changing Internals of OSs

23

Page 40: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How Different Are We?• BSD

• C

• Kernel

• VM

• Processes

• Threads

• Events UI

• Linux

• C

• Kernel

• VM

• Processes

• Threads

• Events UI

• Windows

• C

• Kernel

• VM

• Processes

• Threads

• Events UI

• Mac OS

• C/C++

• uKernel ?

• VM

• Processes

• Threads

• Events UI

24

Page 41: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Why do we fail to provide new models?

25

Page 42: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Why do we fail to provide new models?

• What we were taught?

25

Page 43: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Why do we fail to provide new models?

• What we were taught?

• What the people want?

25

Page 44: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Why do we fail to provide new models?

• What we were taught?

• What the people want?

• What we want?

25

Page 45: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Why do we fail to provide new models?

• What we were taught?

• What the people want?

• What we want?

• These are the best models?

25

Page 46: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Why do we fail to provide new models?

• What we were taught?

• What the people want?

• What we want?

• These are the best models?

• Our languages and environment dictate our models?

25

Page 47: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How do most programmers program?

26

Page 48: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How do most programmers program?• Text structured in various (non)sensical ways

26

Page 49: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How do most programmers program?• Text structured in various (non)sensical ways

• Edit, Compile, Link, Run, Debug cycle

26

Page 50: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How do most programmers program?• Text structured in various (non)sensical ways

• Edit, Compile, Link, Run, Debug cycle

• Edit, run, edit, run, edit, run

26

Page 51: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How do most programmers program?• Text structured in various (non)sensical ways

• Edit, Compile, Link, Run, Debug cycle

• Edit, run, edit, run, edit, run

• Three basic types of languages

26

Page 52: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?

27

Page 53: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?• Algol

27

Page 54: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?• Algol- Procedural

27

Page 55: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?• Algol- Procedural

• Lisp

27

Page 56: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?• Algol- Procedural

• Lisp- Functional

27

Page 57: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?• Algol- Procedural

• Lisp- Functional

• Prolog

27

Page 58: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

But what are your options?• Algol- Procedural

• Lisp- Functional

• Prolog- Insanity

27

Page 59: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!

28

Page 60: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code

28

Page 61: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code- Almost always

28

Page 62: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code- Almost always

• Unsafe languages lead to unsafe code

28

Page 63: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code- Almost always

• Unsafe languages lead to unsafe code- Almost always

28

Page 64: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code- Almost always

• Unsafe languages lead to unsafe code- Almost always

• Confusing languages lead to confusing code

28

Page 65: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code- Almost always

• Unsafe languages lead to unsafe code- Almost always

• Confusing languages lead to confusing code- Almost always

28

Page 66: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How we think in code matters!• Sloppy languages lead to sloppy code- Almost always

• Unsafe languages lead to unsafe code- Almost always

• Confusing languages lead to confusing code- Almost always

• Lowering the barrier to entry has lowered the quality of code

28

Page 67: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How many words is a comic worth?

29

Page 68: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live

30

Page 69: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live• If a programmer reads good code she will write

good code

30

Page 70: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live• If a programmer reads good code she will write

good code

• If a programmer sees good abstractions he will write good abstractions

30

Page 71: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live• If a programmer reads good code she will write

good code

• If a programmer sees good abstractions he will write good abstractions

• If a programmer works with good programmers her code will improve

30

Page 72: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live• If a programmer reads good code she will write

good code

• If a programmer sees good abstractions he will write good abstractions

• If a programmer works with good programmers her code will improve

• If a programmer works with poor programmers his code will suffer

30

Page 73: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live• If a programmer reads good code she will write

good code

• If a programmer sees good abstractions he will write good abstractions

• If a programmer works with good programmers her code will improve

• If a programmer works with poor programmers his code will suffer

• Don’t read crap code!

30

Page 74: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Programmers learn what they live• If a programmer reads good code she will write

good code

• If a programmer sees good abstractions he will write good abstractions

• If a programmer works with good programmers her code will improve

• If a programmer works with poor programmers his code will suffer

• Don’t read crap code!

• Don’t hang out with crap programmers!

30

Page 75: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Everything has been discovered!

31

Page 76: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Everything has been discovered!• “Everything that can be invented has been

invented.” Charles Duell (?)

31

Page 77: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Everything has been discovered!• “Everything that can be invented has been

invented.” Charles Duell (?)

• Turns out not to be true

31

Page 78: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Will the real Charles Duell...

32

Page 79: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Will the real Charles Duell...• "Our future progress and prosperity depend

upon our ability to equal, if not surpass, other nations in the enlargement and advance of science, industry and commerce. To invention we must turn as one of the most powerful aids to the accomplishment of such a result." Charles Duell

32

Page 80: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel

33

Page 81: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

33

Page 82: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

33

Page 83: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

• Tree

33

Page 84: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

• Tree- Dictionary

33

Page 85: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

• Tree- Dictionary

– Locking API

33

Page 86: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

• Tree- Dictionary

– Locking API> Spin Lock

33

Page 87: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

• Tree- Dictionary

– Locking API> Spin Lock

• Stop fighting over the scraps

33

Page 88: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Stop Re-inventing the Wheel• There does not need to be another list

implementation

• No one needs another hash table

• Tree- Dictionary

– Locking API> Spin Lock

• Stop fighting over the scraps

• Stop re-implementing your school projects

33

Page 89: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Invent Some New Wheels

34

Page 90: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Invent Some New Wheels• UNIX should not be the end of the family tree

34

Page 91: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Invent Some New Wheels• UNIX should not be the end of the family tree- No matter how much we love BSD

34

Page 92: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Invent Some New Wheels• UNIX should not be the end of the family tree- No matter how much we love BSD

• Can you imagine if Vista is what our grandchildren will use?

34

Page 93: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Invent Some New Wheels• UNIX should not be the end of the family tree- No matter how much we love BSD

• Can you imagine if Vista is what our grandchildren will use?

• MacOS X? (XI?)

34

Page 94: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Invent Some New Wheels• UNIX should not be the end of the family tree- No matter how much we love BSD

• Can you imagine if Vista is what our grandchildren will use?

• MacOS X? (XI?)

• Linux?

34

Page 95: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels

35

Page 96: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers

35

Page 97: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first

35

Page 98: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

35

Page 99: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

35

Page 100: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like

35

Page 101: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme

35

Page 102: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl

35

Page 103: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl- Python

35

Page 104: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl- Python- Haskell

35

Page 105: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl- Python- Haskell- C++

35

Page 106: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl- Python- Haskell- C++- ...

35

Page 107: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl- Python- Haskell- C++- ...

• Don’t specialize too much

35

Page 108: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

How to Find New Wheels• Read some papers- Read the abstracts first- Ignore most of them, most are pointless

• Look at code you wouldn’t normally touch

• Learn a computer language you don’t like- Scheme- Perl- Python- Haskell- C++- ...

• Don’t specialize too much

• Lose your religion!

35

Page 109: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

You must be willing to

36

Page 110: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

You must be willing to• break things

36

Page 111: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

You must be willing to• break things

• look stupid

36

Page 112: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

You must be willing to• break things

• look stupid

• be wrong

36

Page 113: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

You must be willing to• break things

• look stupid

• be wrong

• learn from others

36

Page 114: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies

37

Page 115: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies• Hubris

37

Page 116: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies• Hubris

• Not starting projects

37

Page 117: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies• Hubris

• Not starting projects

• Never finishing a project

37

Page 118: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies• Hubris

• Not starting projects

• Never finishing a project- OK, all programmers have 3 enemies

37

Page 119: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies• Hubris

• Not starting projects

• Never finishing a project- OK, all programmers have 3 enemies

– Off by one errors are a programmer’s 3rd enemy

37

Page 120: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

All Programmers Have 2 Enemies• Hubris

• Not starting projects

• Never finishing a project- OK, all programmers have 3 enemies

– Off by one errors are a programmer’s 3rd enemy> Counting from 0

37

Page 121: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited

38

Page 122: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72

38

Page 123: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72- On average

38

Page 124: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72- On average

• You have to work to eat

38

Page 125: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72- On average

• You have to work to eat

• Most people only ever have 3 original ideas in their life

38

Page 126: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72- On average

• You have to work to eat

• Most people only ever have 3 original ideas in their life- Not 3 good ideas, just 3 original ideas

38

Page 127: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72- On average

• You have to work to eat

• Most people only ever have 3 original ideas in their life- Not 3 good ideas, just 3 original ideas

• You can easily waste your time on the wrong ideas

38

Page 128: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Your time is limited• You are only going to live to 72- On average

• You have to work to eat

• Most people only ever have 3 original ideas in their life- Not 3 good ideas, just 3 original ideas

• You can easily waste your time on the wrong ideas

• Find people who will honestly tell you if your ideas are crap

38

Page 129: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start

39

Page 130: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start• Safe and powerful programming languages

39

Page 131: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start• Safe and powerful programming languages

• Anything that measurably reduces complexity

39

Page 132: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start• Safe and powerful programming languages

• Anything that measurably reduces complexity

• Visualization Tools

39

Page 133: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start• Safe and powerful programming languages

• Anything that measurably reduces complexity

• Visualization Tools

• Real Software Re-use

39

Page 134: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start• Safe and powerful programming languages

• Anything that measurably reduces complexity

• Visualization Tools

• Real Software Re-use

• Novel ways of organizing data

39

Page 135: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Places to start• Safe and powerful programming languages

• Anything that measurably reduces complexity

• Visualization Tools

• Real Software Re-use

• Novel ways of organizing data

• Solve the dependency problem

39

Page 136: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Thank you for your time

40

Page 137: BSDCan 2009 Programmers learn what they live •If a programmer reads good code she will write good code •If a programmer sees good abstractions he will write good abstractions •If

BSDCan 2009

Get back to work!

41