1983 Thank you, fellow time travelers from the Future Dave Cheney - - PowerPoint PPT Presentation

1983
SMART_READER_LITE
LIVE PREVIEW

1983 Thank you, fellow time travelers from the Future Dave Cheney - - PowerPoint PPT Presentation

The Why of Go 21st Century Programming Languages Track, Qcon SF Carmen Andoh 1983 Thank you, fellow time travelers from the Future Dave Cheney Alan Donovan Steve Francia Jrme Pettazoni Back to 1983 (from 1985, but whetev,


slide-1
SLIDE 1

The Why of Go

21st Century Programming Languages Track, Qcon SF

Carmen Andoh

slide-2
SLIDE 2

1983

slide-3
SLIDE 3
  • Dave Cheney
  • Alan Donovan
  • Steve Francia
  • Jérôme Pettazoni

Thank you, fellow time travelers from the Future

slide-4
SLIDE 4

Back to 1983 … (from 1985, but whetev, 80s rule)

slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8
slide-9
SLIDE 9

Genealogy of Programming Languages 1956-1983

You are here

slide-10
SLIDE 10

Genealogy of Programming Languages 1956-2015

slide-11
SLIDE 11

You are here

slide-12
SLIDE 12
slide-13
SLIDE 13

Genealogy of Programming Languages 1956-2015

slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18

GNU

GNU’s Not Unix Project Started in 1983

slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21
slide-22
SLIDE 22
slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27
  • too simple / lack of syntactic sugar
  • no generics
  • bad dependency management
  • stuck in 70/80's
  • error handling
  • no unused imports
  • too opinionated
  • too verbose
  • no ternary operator
  • no macros or

templates

https://github.com/ksimka/go-is-not-good

slide-28
SLIDE 28
slide-29
SLIDE 29
slide-30
SLIDE 30

“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.

slide-31
SLIDE 31

“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.

slide-32
SLIDE 32

“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.

slide-33
SLIDE 33

“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.

slide-34
SLIDE 34

“Go programming language was conceived as an answer to some of the problems we were seeing developing software infrastructure at Google. The computing landscape today is almost unrelated to the environment in which the languages being used, mostly C++, Java, and Python, had been created. The problems introduced by multicore processors, networked systems, massive computation clusters, and the web programming model were being worked around rather than addressed head-on.

slide-35
SLIDE 35

Moreover, the scale has changed: today’s server programs comprise tens of millions of lines of code, are worked on by hundreds or even thousands of programmers, and are updated literally every day. To make matters worse, build time have stretched to many minutes, even hours, even languages,on large compilation clusters,”

slide-36
SLIDE 36

Moreover, the scale has changed: today’s server programs comprise tens of millions of lines of code, are worked on by hundreds or even thousands of programmers, and are updated literally every day. To make matters worse, build time has stretched to many minutes, even hours, on large compilation clusters”

slide-37
SLIDE 37

Moreover, the scale has changed: today’s server programs comprise tens of millions of lines of code, are worked on by hundreds or even thousands of programmers, and are updated literally every day. To make matters worse, build time has stretched to many minutes, even hours, on large compilation clusters”

slide-38
SLIDE 38
  • multicore processors
  • networked systems
  • massive computation

clusters

  • web programming model
  • hundreds or even

thousands of programmers

  • large compilation clusters
slide-39
SLIDE 39

2017 2000 2005 2010 90s 80s

Go

slide-40
SLIDE 40

2017 2000 2005 2010 90s 80s

Software | Languages Go

slide-41
SLIDE 41

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Go

slide-42
SLIDE 42

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

slide-43
SLIDE 43
slide-44
SLIDE 44

Hardware & Compute

Software | Languages Context

2017 2000 2005 2010 90s 80s

Go UTF-8 Unix (60s) C (68-73)

Robert Griesemer, Rob Pike, Ken Thompson

slide-45
SLIDE 45
slide-46
SLIDE 46

Hardware & Compute

Software | Languages Context

2017 2000 2005 2010 90s 80s

Go UTF-8 Unix (60s) C (68-73) Plan 9 OS Hotspot JVM

Robert Griesemer, Rob Pike, Ken Thompson

slide-47
SLIDE 47
  • Concurrency
  • Distributed Systems
  • Garbage Collection
  • Memory Locality
  • Readability

Go’s 21st Century Characteristics

slide-48
SLIDE 48

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google

slide-49
SLIDE 49

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K

slide-50
SLIDE 50

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD)

slide-51
SLIDE 51

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2

slide-52
SLIDE 52

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO

slide-53
SLIDE 53

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2

slide-54
SLIDE 54

Hardware & Compute

Software | Languages Context

2017 2000 2005 2010 90s 80s

Go

slide-55
SLIDE 55

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2

slide-56
SLIDE 56

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python)

slide-57
SLIDE 57

Hardware & Compute

Software | Languages Context

2017 2000 2005 2010 90s 80s

Go

slide-58
SLIDE 58

Hardware & Compute

Software | Languages Context

2017 2000 2005 2010 90s 80s

Go

slide-59
SLIDE 59

Events, Threads and Goroutines

Nginx - event loop plus state machine model

slide-60
SLIDE 60

Events, Threads and Goroutines

Nginx - event loop plus state machine model App logic

slide-61
SLIDE 61

Events, Threads and Goroutines

Nginx - event loop plus state machine model App logic

slide-62
SLIDE 62

Events, Threads and Goroutines

Nginx - event loop plus state machine model App

slide-63
SLIDE 63

Events, Threads and Goroutines

Nginx - event loop plus state machine model App

slide-64
SLIDE 64

Events, Threads and Goroutines

Nginx - event loop plus state machine model App

slide-65
SLIDE 65

Events, Threads and Goroutines

Nginx - event loop plus state machine model App

slide-66
SLIDE 66

Events, Threads and Goroutines

Nginx - event loop plus state machine model App

slide-67
SLIDE 67

Events, Threads and Goroutines

Nginx - event loop plus state machine model App

slide-68
SLIDE 68

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS

slide-69
SLIDE 69

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS

slide-70
SLIDE 70

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Concurrency

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS

slide-71
SLIDE 71
slide-72
SLIDE 72
slide-73
SLIDE 73
slide-74
SLIDE 74
slide-75
SLIDE 75
slide-76
SLIDE 76

App

slide-77
SLIDE 77

App

= Threads

slide-78
SLIDE 78
slide-79
SLIDE 79
slide-80
SLIDE 80
slide-81
SLIDE 81

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Distributed Systems

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless

slide-82
SLIDE 82

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Garbage Collection

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless

slide-83
SLIDE 83

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless

slide-84
SLIDE 84

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless Hotspot JVM

slide-85
SLIDE 85

Memory Locality

slide-86
SLIDE 86

Memory Locality Java

slide-87
SLIDE 87

Memory Locality Java No value types Everything Allocated

slide-88
SLIDE 88

Memory Locality Java No value types Everything Allocated Go

slide-89
SLIDE 89

Memory Locality Java No value types Everything Allocated Go Structs True Value types

slide-90
SLIDE 90

Memory Locality Java No value types Everything Allocated Can’t return multiple values Go Structs True Value types

slide-91
SLIDE 91

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless Hotspot JVM Go GC 1.8

slide-92
SLIDE 92

When the three of us [Ken Thompson, Rob Pike, and Robert Griesemer] got started, it was pure research. The three of us got together and decided that we hated C++. [laughter] ... [Returning to Go,] we started off with the idea that all three of us had to be talked into every feature in the language, so there was no extraneous garbage put into the language for any reason.

slide-93
SLIDE 93

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless Hotspot JVM Go GC 1.8

slide-94
SLIDE 94

Memory Locality Java No value types Everything Allocated Can’t return multiple values Go Structs True Value types

slide-95
SLIDE 95

Memory Locality Java No value types Everything Allocated Can’t return multiple values Go Structs True Value types compact object layout No object headers

slide-96
SLIDE 96

Memory Locality Java No value types Everything Allocated Can’t return multiple values Go Structs True Value types compact object layout No object headers UTF-8

slide-97
SLIDE 97

Memory Locality Java No value types Everything Allocated Can’t return multiple values Go Structs True Value types compact object layout No object headers UTF-8 UTF-16

slide-98
SLIDE 98

Memory Locality Java No value types Everything Allocated Can’t return multiple values Go Structs True Value types Compact object layout No object headers Lazy initialization of collections UTF-8 UTF-16

slide-99
SLIDE 99

Memory Locality (conclusion)

slide-100
SLIDE 100

Memory Locality (conclusion)

  • Go gives programmers the tools to talk about memory

efficiently if they need it.

slide-101
SLIDE 101

Memory Locality (conclusion)

  • Go gives programmers the tools to talk about memory

efficiently if they need it.

  • Flexible
slide-102
SLIDE 102

Memory Locality (conclusion)

  • Go gives programmers the tools to talk about memory

efficiently if they need it.

  • Flexible
  • Memory management (not an all-or-nothing like in C++ or

Rust)

slide-103
SLIDE 103

Readability

slide-104
SLIDE 104

Readability

“ Debugging is twice as hard as writing the code in the first

  • place. Therefore, if you write the code as cleverly as possible,

you are, by definition, not smart enough to debug it. ” — Brian Kernighan

slide-105
SLIDE 105

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless Hotspot JVM Go GC 1.8

slide-106
SLIDE 106

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless Hotspot JVM Go GC 1.8

# of google employees in 2007: 16,805

slide-107
SLIDE 107

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel NodeJS The rise of containers + cloud-native+ ecosystem Microservices serverless Hotspot JVM Go GC 1.8

2010: 24,440

slide-108
SLIDE 108

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Hotspot JVM Go GC 1.8

2017: 75,606

slide-109
SLIDE 109

Readability

simplicity

slide-110
SLIDE 110

Readability

simplicity

“simple is better”

slide-111
SLIDE 111

Readability

simplicity

“simple is better” “this is an insult to intelligent programmers”

slide-112
SLIDE 112

Readability

simplicity

“simple is better” “you’re trying to commodify programming and create a situation where our bosses can replace us at will”

slide-113
SLIDE 113

“You’re not paid to program, you’re not even paid to maintain someone else’s program, you’re paid to deliver solutions to the business.”

  • Dave Cheney
slide-114
SLIDE 114

Readability

Programs which cannot be maintained will be rewritten

slide-115
SLIDE 115

Readability

Programs which cannot be maintained will be rewritten “If you can’t be replaced, you cannot be promoted”

slide-116
SLIDE 116

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Hotspot JVM Go GC 1.8

2017: 75,606

Average length of tenure at company:

slide-117
SLIDE 117

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Hotspot JVM Go GC 1.8

2017: 75,606

Average length of tenure at company:

slide-118
SLIDE 118

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Hotspot JVM Go GC 1.8

2017: 75,606

Average length of tenure at company:

slide-119
SLIDE 119

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go

Memory Locality

C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Hotspot JVM Go GC 1.8

2017: 75,606

Average length of tenure at company:

slide-120
SLIDE 120

Software Engineering

slide-121
SLIDE 121

Software Engineering

Software Engineering vs Programming

slide-122
SLIDE 122

Software Engineering

Software Engineering vs Programming Software Engineering = Programming integrated over time.

slide-123
SLIDE 123

Software Engineering

Software Engineering vs Programming Software Engineering = Programming integrated over time. Engineering is what happens when things need to live longer and influence of time starts creeping in. -Titus Winters

slide-124
SLIDE 124

Software Engineering

Software Engineering vs Programming Software Engineering = Programming integrated over time. Engineering is what happens when things need to live longer and influence of time starts creeping in. -Titus Winters All this complexity is fundamentally a different flavor than programming.

slide-125
SLIDE 125

Software Engineering

focus on sustaining engineering (readability)

slide-126
SLIDE 126

Software Engineering

focus on sustaining engineering (readability) continuance of many different engineers over a long period of time

slide-127
SLIDE 127

Software Engineering

focus on sustaining engineering (readability) continuance of many different engineers over a long period of time clear module boundaries

slide-128
SLIDE 128

Software Engineering

focus on sustaining engineering (readability) continuance of many different engineers over a long period of time clear module boundaries keeping import dependencies between packages linear, thus keeping compile times down.

slide-129
SLIDE 129

Simplicity and the Greater Good

slide-130
SLIDE 130
slide-131
SLIDE 131

“Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.” ― Edsger W. Dijkstra

slide-132
SLIDE 132

The Future

slide-133
SLIDE 133

2017 2000 2005 2010 90s 80s

Software | Languages

Hardware & Compute

Context Go C++ at Google C10K Epoll (linux) Kqueue (BSD) SEDA Java NIO P4 Core 2 Ruby Mongrel Gunicorn (Python) NodeJS Hotspot JVM Go GC 1.8

2010: 75,606

Average length of tenure at company:

slide-134
SLIDE 134

Software | Languages

Hardware & Compute

Context

2040 2025 2030 2035 2017 2020

The Future?

slide-135
SLIDE 135

Software | Languages

Hardware & Compute

Context

2040 2025 2030 2035 2017 2020

The Future?

The problems we have today were not there 20 years ago, nor will be problems we face 20 years from now.

slide-136
SLIDE 136

Software | Languages

Hardware & Compute

Context

2040 2025 2030 2035 2017 2020

The Future?

...it may surprise you

slide-137
SLIDE 137

Thank you!

Carmen Andoh @carmatrocity QCon San Francisco 21st Century Languages Track November 2017