Transcript
Page 1: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Fearand the Evolution of Languages

Bruce A. Tate

(Oct25), 2014

Page 2: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

42 miles, day and night(Oct25), 2014

Page 3: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Fear shapes places(Oct25), 2014

Page 4: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

(You can see it from space)(Oct25), 2014

Page 5: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Fear vs. Discovery(Oct25), 2014

Page 6: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Fear and language creation

(Oct25), 2014

Page 7: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate(Oct25), 2014

Page 8: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Fear and language creation

(Oct25), 2014

Page 9: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Fear and language adoption

(Oct25), 2014

Page 10: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate(Oct25), 2014

Page 11: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Technology Adoption Curve(Oct25), 2014

Page 12: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Technology Adoption Curve

Innovators

EarlyAdoptors

EarlyMajority

LateMajority

Laggards

(Oct25), 2014

Page 13: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption Curve

EarlyAdoptors

EarlyMajority

LateMajority

Laggards

Innovators

(Oct25), 2014

Page 14: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

JavaC++

Visual Basic PhPFortran

... ... ... ...

... ......

Language Adoption Curve

Cobol

(Oct25), 2014

Page 15: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

JavaCobol C++

Visual Basic PhPFortran

... ... ... ...

... ......

Language Adoption Curve

Syntax

Libraries

Types

(Oct25), 2014

Page 16: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

HLL Structured OOP Functiona

Paradigm Adoption Curve(Oct25), 2014

Page 17: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

HLL OOP Functiona

Paradigm Adoption Curve

Mental Model

Structured

(Oct25), 2014

Page 18: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

The Chasm

(Oct25), 2014

Page 19: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

The Chasm

:(

(Oct25), 2014

Page 20: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

The Chasm:)

:):)

:) :):)

:)

:):)

:(

(Oct25), 2014

Page 21: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

The Chasm

PeopleTools

JobsFrameworks

ConferencesTraining

:)

:):)

:) :):)

:)

:):)

(Oct25), 2014

Page 22: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

The Chasm

BeerFun

Diversity

:(

(Oct25), 2014

Page 23: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

End: Moore; Begin: Tate

(Oct25), 2014

Page 24: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

Language Adoption and Fear(Oct25), 2014

Page 25: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

Language Adoption and Fear(Oct25), 2014

Page 26: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Will we have to retool?

What will it cost me?

Will it be abandoned?

Will it break?

Will I lack talent?Paralyzing

Fear

Is it too difficult to learn?(Oct25), 2014

Page 27: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear(Oct25), 2014

Page 28: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear(Oct25), 2014

Page 29: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear(Oct25), 2014

Page 30: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

Cobol

Language Adoption and Fear(Oct25), 2014

Page 31: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

C(++)

Language Adoption and Fear(Oct25), 2014

Page 32: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

Java

Language Adoption and Fear(Oct25), 2014

Page 33: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

Longer cycles

(Oct25), 2014

Page 34: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Language Adoption and Fear

Bigger chasms

(Oct25), 2014

Page 35: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

MotivatingFear

Language Adoption and Fear(Oct25), 2014

Page 36: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

MotivatingFear

Language Adoption and Fear(Oct25), 2014

Page 37: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java

Language Adoption and Fear

C++

(Oct25), 2014

Page 38: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

MotivatingFear

Language Adoption and Fear

-Too much to learn-Proprietary-Old hardware

(Oct25), 2014

Page 39: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

ParalyzingFear

MotivatingFear

-C++ Syntax-Internet-JVM

+ Deployment

Language Adoption and Fear(Oct25), 2014

Page 40: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Deployment Problem

(10 diskettes)

(As late as the mid 1990s)

(Oct25), 2014

Page 41: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Deployment Problem

(10 diskettes) X (9 registers per store)

(Oct25), 2014

Page 42: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Deployment Problem

(10 diskettes) X (9 registers per store) X (5 stores)

(Oct25), 2014

Page 43: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Deployment Problem

(10 diskettes) X (9 registers per store) X

(5 stores) X (3 services) X

(n fixpacks/year) ...

(Oct25), 2014

Page 44: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Deployment Problem

Now add...

(Oct25), 2014

Page 45: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

IT

Multiple vendorsSanctioned application code

Fragile techniques(screen scraping)

Unprotected memoryMultiple tiers

(Oct25), 2014

Page 46: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

it

Multiple vendorsSanctioned application code

Unsanctioned apps and macrosFragile techniques(screen scraping)

Unprotected memoryMultiple tiers

(Oct25), 2014

Page 47: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate~~~~~~~~~~~~~~~~~~~~~~~~~~~

Multiple vendorsSanctioned application code

Unsanctioned apps and macrosFragile techniques(screen scraping)

Unprotected memoryMultiple tiers

(Oct25), 2014

Page 48: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java crosses the chasm(Oct25), 2014

Page 49: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java crosses the chasm(Oct25), 2014

Page 50: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java crosses the chasm(Oct25), 2014

Page 51: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java

Java crosses the chasm(Oct25), 2014

Page 52: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

JavaErlang (Elixir)

ClojureHaskell

ElixirScala ...

Java crosses the chasm(Oct25), 2014

Page 53: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Today

ParalyzingFear

MotivatingFear

(Oct25), 2014

Page 54: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Today

ParalyzingFear

MotivatingFear

?(Oct25), 2014

Page 55: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java

(Oct25), 2014

Page 56: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java

What’s thebest wayto eat an

elephant?

(Oct25), 2014

Page 57: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

What’s thebest wayto eat an

elephant?

(Oct25), 2014

Page 58: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

1. Building communities is easier

(Oct25), 2014

Page 59: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

2. OO languages, FP features

(Oct25), 2014

Page 60: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

3. Deployment options abound

(Oct25), 2014

Page 61: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

4. Interfaces are cleaner

(Oct25), 2014

Page 62: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Today

ParalyzingFear

MotivatingFear

?(Oct25), 2014

Page 63: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

1. Code complexity (always first)

(Oct25), 2014

Page 64: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

defmodule  VidStore  do    use  StateMachine      state  :available,  [        rent:  [  to:  :rented,                          calls:  [  &VidStore.renting/1  ]]]        state  :rented,  [        return:  [  to:  :available,                              calls:  [  &VidStore.returning/1  ]],        lose:  [  to:  :lost,                          calls:  [  &VidStore.losing/1  ]]]    state  :lost,  []        ...end

(Oct25), 2014

Page 65: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

defmodule  VidStore  do    use  StateMachine      state  :available,  [        rent:  [  to:  :rented,                          calls:  [  &VidStore.renting/1  ]]]        state  :rented,  [        return:  [  to:  :available,                              calls:  [  &VidStore.returning/1  ]],        lose:  [  to:  :lost,                          calls:  [  &VidStore.losing/1  ]]]    state  :lost,  []        ...end

VidStore.rent video

VidStore.return video

video |> rent |> lose

(Oct25), 2014

Page 66: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

2. Multicore and Distribution(the real Y2K)

(Oct25), 2014

Page 67: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

defmodule Chatroom do use OtpDsl.GenServer, initial_state: HashDict.new()

defcall enter(name), users do send_all(users, "#{name} has entered the room") reply(:ok, Dict.put(users, name, _from)) end

defcall leave(name), users do d = Dict.delete(users, name) send_all(users, "#{name} has left the room") reply(:ok, d) end

defcall message(name, message) do send_all(users, message) reply(:ok, d) end

defp send_all(users, message) do Enum.each(Dict.values(users), User.send_line(&1, message)) endend

code example: Copyright © 2014 - Peter Minten(Oct25), 2014

Page 68: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

replaces...

(Oct25), 2014

Page 69: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

defmodule Chatroom2 do use GenServer.Behaviour def enter(name) do :gen_server.call(:chatroom, { :enter, name }) end

def leave(name) do :gen_server.call(:chatroom, { :leave, name }) end

def message(name, message) do :gen_server.call(:chatroom, { :message, name, message }) end

def init(_args) do { :ok, HashDict.new() } end

def handle_call({ :enter, name }, from, users) do send_all(users, "#{name} has entered the room") { :reply, :ok, Dict.put(users, name, from) } end

def handle_call({ :leave, name }, _from, users) do d = Dict.delete(users, name) send_all(users, "#{name} has left the room") { :reply, :ok, d } end

def handle_call({ :message, name, message }, _from, users) do send_all(users, message) { :reply, :ok, users } end

defp send_all(users, message) do Enum.each(Dict.to_list(users), fn { user, pid } -> User.send_line(user, message) end) endend code example: Copyright © 2014 - Peter Minten

(Oct25), 2014

Page 70: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

replaces...

(Oct25), 2014

Page 71: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Too big to show

(Oct25), 2014

Page 72: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

References

DSL from Dave Thomas:https://github.com/pragdave/otp_dsl

Example from Peter Minten

Thinking in Elixir: Hiding Your Messageshttp://pminten.github.io/blog/2013/09/14/thinking-in-elixir-hide-your-messages/

code example: Copyright © 2014 - Peter Minten

(Oct25), 2014

Page 73: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

3. ComplexityIs JavaScript the best we can do?

(Oct25), 2014

Page 74: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

import  Mouseimport  Window

drawPaddle  w  h  x  =      filled  black  (rect  80  10)                      |>  moveX  (toFloat  x  -­‐  toFloat  w  /  2)|>  moveY  (-­‐(toFloat  h  *  0.45))    display  (w,  h)  x  =  collage  w  h    [  drawPaddle  w  h  x  ]

main  =  lift2  display  Window.dimensions  Mouse.x

(Oct25), 2014

Page 75: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Java...

Erlang (Elixir)ClojureHaskell

ElixirScala

(Oct25), 2014

Page 76: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

...

Erlang (Elixir)ClojureHaskell

ElixirScala

(Oct25), 2014

Page 77: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

Erlang (Elixir)ClojureHaskell

ElixirScala ...

(Oct25), 2014

Page 78: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

?(Oct25), 2014

Page 79: Fear: The Role of Fear in Language Adoption by Bruce Tate

© 2014 Bruce Tate

References

DSL from Dave Thomas:https://github.com/pragdave/otp_dsl

Example from Peter Minten

Thinking in Elixir: Hiding Your Messageshttp://pminten.github.io/blog/2013/09/14/thinking-in-elixir-hide-your-messages/

code example: Copyright © 2014 - Peter Minten

(Oct25), 2014