Slide 1

Slide 1 text

How I Spent All My Savings Reinventing Programming Luis Solano @luisobo

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

I’ve seen things

Slide 6

Slide 6 text

¿The Best Way™?

Slide 7

Slide 7 text

Design patterns Unit testing TDD Code reviews Pair programming

Slide 8

Slide 8 text

!

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

MUTABLE STATE & CONTROL FLOW

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Mutable state & Control flow

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

PROGRAMMING WAS NEVER INVENTED

Slide 17

Slide 17 text

PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED PROGRAMMING WAS NEVER INVENTED

Slide 18

Slide 18 text

What would programming be in an ideal world?

Slide 19

Slide 19 text

“Hey Siri, make me a TODO app”

Slide 20

Slide 20 text

No accidental complexity Declarative, intentional Helps discover requirements Easy evolution of programs No need for a team Shared context

Slide 21

Slide 21 text

hello.swift 10010010110010100 10011011101100101 00100100100101011 00100101100101001 00110111011001010 010010010010101 Compiler executable

Slide 22

Slide 22 text

10010010110 01010010011 01110110010 10010010010 01010110010 01011001010 Compiler Prod A P I Stg A P I Dev A P I v1 v2 v3

Slide 23

Slide 23 text

E7 E1 E6 E5 E4 E3 E2

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

ESSENTIAL ACCIDENTAL

Slide 26

Slide 26 text

ESSENTIAL ACCIDENTAL Inherent complexity of the problem that exist before adding computers to the mix The rest of the complexity, added by the computer

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

"

Slide 30

Slide 30 text

E7 E1 E6 E5 E4 E3 E2

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

ONE GENERAL-PURPOSE LANGUAGE

Slide 33

Slide 33 text

MANY DOMAIN-SPECIFIC LANGUAGES

Slide 34

Slide 34 text

HTML CSS #user-grid .nav-button h3 tr:nth-child(2n) ul.todo li

Slide 35

Slide 35 text

domain Twitter { entity User { username : String email : String tweets : Many[Tweet] following : Many[User] timeline <= Tweet.where(author in following) } entity Tweet { text : String author : User } } DOMAIN MODELLING

Slide 36

Slide 36 text

persistance { domain Twitter { database: MySQL query User.timeline { materialize: true consistency: eventual database: Cassandra } } } ACCIDENTAL STUFF

Slide 37

Slide 37 text

ACCIDENTAL STUFF

Slide 38

Slide 38 text

E7 E1 E6 E5 E4 E3 E2

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Source editing ViewController.swift

Slide 41

Slide 41 text

Source editing ViewController.swift import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } Source editing

Slide 42

Slide 42 text

Source editing ViewController.swift 1001001011001 0100100110111 0110010100100 1001001010110 0100101100101 0010011011101 1001010010010 010010101 Executable Compiler if (a > 2) { performA() } else { performB() }

Slide 43

Slide 43 text

Projectional editing MyProgram.ast

Slide 44

Slide 44 text

Projectional editing MyProgram.ast Editor render if (a > 2) { performA() } else { performB() }

Slide 45

Slide 45 text

Projectional editing MyProgram.ast Editor render if (a > 2) { performA() } else { performB() } E1 update

Slide 46

Slide 46 text

if (a > 2) { performA() } else { performB() } Projectional editing MyProgram.ast Editor render if (a > 2) { performA() } else { } update E1

Slide 47

Slide 47 text

Projectional editing MyProgram.ast Editor render update

Slide 48

Slide 48 text

Projectional editing MyProgram.ast Editor render update

Slide 49

Slide 49 text

Projectional editing MyProgram.ast Editor render update

Slide 50

Slide 50 text

Projectional editing MyProgram.ast Editor render update

Slide 51

Slide 51 text

Projectional editing MyProgram.ast Editor render update func calculate(z) { }

Slide 52

Slide 52 text

Projectional editing MyProgram.ast Editor render update class Subscription { }

Slide 53

Slide 53 text

Projectional editing func myFunction() -> Int { return 2 + 2 } 123 728 662 918 331 092 MyProgram.ast

Slide 54

Slide 54 text

https://www.jetbrains.com/mps/

Slide 55

Slide 55 text

E7 E1 E6 E5 E4 E3 E2

Slide 56

Slide 56 text

E7 E1 E6 E5 E4 E3 E2

Slide 57

Slide 57 text

Projectional editing E1 E2 E3 E4 E5 E6 E7 E8 E9

Slide 58

Slide 58 text

10010010110 01010010011 01110110010 10010010010 01010110010 01011001010 Compiler Prod A P I Stg A P I Dev A P I v1 v2 v3

Slide 59

Slide 59 text

E1 E2 E3 E4 E5 10010010110010100 10011011101100101 00100100100101011 00100101100101001 00110111011001010 010010010010101 Compiler executable 10010010110010100 10011011101100101 00100100100101011 00100101100101001 00110111011001010 010010010010101 DB migrations 10010010110010100 10011011101100101 00100100100101011 00100101100101001 00110111011001010 010010010010101 Deploy scripts

Slide 60

Slide 60 text

domain Twitter { entity User { username : String email : String tweets : Many[Tweet] following : Many[User] timeline <= Tweet.where(author in following) } entity Tweet { text : String author : User } } DOMAIN MODELLING

Slide 61

Slide 61 text

LIVE PROGRAMMING

Slide 62

Slide 62 text

in conclusión

Slide 63

Slide 63 text

“We Shape Our Tools, and Then Our Tools Shape Us” – Marshall McLuhan

Slide 64

Slide 64 text

Thank you! @luisobo