Slide 1

Slide 1 text

build impossible programs JULIA EVANS bork

Slide 2

Slide 2 text

about a program I built that I wasn't sure would work rb spy

Slide 3

Slide 3 text

I 800 debugging profiling tools

Slide 4

Slide 4 text

ftp.sina.io yYIato OEht

Slide 5

Slide 5 text

GOAL 12016 Write a profiler that will work with and running Ruby program

Slide 6

Slide 6 text

Ei O myipn f

Slide 7

Slide 7 text

what I knew profilers like this existed for C Java 997 Your kite to perf as

Slide 8

Slide 8 text

why doesn t go.othaisreaefjs.fm ftp.iismptohsissible uT

Slide 9

Slide 9 text

myths about doing innovative work i i

Slide 10

Slide 10 text

myths you have to be an expert if it were possible worthwhile somebody would have done it you have to code on the weekend

Slide 11

Slide 11 text

MYTH ti

Slide 12

Slide 12 text

some minor problems understanding of Ruby internals none Ruby OSS contributions none profilers 1debuggers written O it trust 1C skills beginner

Slide 13

Slide 13 text

alternative to being an expert find a starting point spend time learning build a prototype

Slide 14

Slide 14 text

HE 2016 HE E Q

Slide 15

Slide 15 text

Bok 2016 Bok i O

Slide 16

Slide 16 text

HE 2016K Recurse center never graduate week f Iprwo pied

Slide 17

Slide 17 text

ruby current thread Rstring cfp l seq black panther body location label rb.threao.trb.co roi.frame.trb iseg.t a ct ise µµ µ

Slide 18

Slide 18 text

1 week later 5Ucctssu extremely sketchy Rust demo

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

ET i 0 spoiler I didn't work on it for more than a year

Slide 21

Slide 21 text

my prototype had serious problems depended on highly unstable details about Ruby interpreter internals 2 3.2 2 3 3 required debugging symbols

Slide 22

Slide 22 text

MYTH E

Slide 23

Slide 23 text

3 months later Rust conf ei

Slide 24

Slide 24 text

make that i o yehud Katz

Slide 25

Slide 25 text

REALITY not many people work on Ruby profilers same is true for MANY other I

Slide 26

Slide 26 text

MYTH OEI xaoi.neieo.fi praa time

Slide 27

Slide 27 text

where am I going to find 400 hours

Slide 28

Slide 28 text

where I found the time prototype kzo 6 L week of vacation the rest 2018 3 months paid or

Slide 29

Slide 29 text

cold

Slide 30

Slide 30 text

o Q

Slide 31

Slide 31 text

I have 3 months now what

Slide 32

Slide 32 text

TACTICS choose Rust survey the space amazing testing invest in usability document

Slide 33

Slide 33 text

on choosing Rust a even though I didn't know it well

Slide 34

Slide 34 text

Rost lets me to write fast programs to work with C data structures to write programs with no faults memory leaks

Slide 35

Slide 35 text

g for ambitious projects you might need new tools

Slide 36

Slide 36 text

TACTIC survey prior art

Slide 37

Slide 37 text

goal find out how every Ruby Python profiler works doing this took 1 day

Slide 38

Slide 38 text

3 kinds of profilers to tracing profilers same process to sampling profilers same process to pyflame

Slide 39

Slide 39 text

how to find struct layouts pyflame compile time header files my demo runtime DWARF

Slide 40

Slide 40 text

how to find struct layouts pyflame compile time header files rbspy runtime compile time

Slide 41

Slide 41 text

TACTIC invest in testing

Slide 42

Slide 42 text

rb spy testing strategy collect core dumps memory snapshots for 5 6 different Ruby versions of test on those

Slide 43

Slide 43 text

result only 1 bug report about incompatibility with Ruby binary reported in 2 months

Slide 44

Slide 44 text

TACTIC invest in usability

Slide 45

Slide 45 text

features nobody can use might as well not exist

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

how flame graphs usually work to git clone github.com I add it to your PATH to cat data 1 flame graph.pl

Slide 48

Slide 48 text

how flame graphs work in rbspy run rbspy record rbspy automatically creates a flame graph

Slide 49

Slide 49 text

I qq.EU jcheerfulstoiccommented23daYJ I'm not sure if flame graphs are available in other tools but the ease and accessibility of them in rbspv brought them to me for the first time t

Slide 50

Slide 50 text

write documentation

Slide 51

Slide 51 text

rbspy.github.io

Slide 52

Slide 52 text

I spent 400 hours on this project

Slide 53

Slide 53 text

it mostly works I E.EE andrewhamptoncommented on Mar 30 I do a lot of work on a rails appthat's over 70yearsold I used rbspy record bundle exec rspec ftp aefeweeshagnniortoprmaesef.tv configuredthe script The CPUtime for the entire suitedroppedbynearlyan hour Thanks junsfor theamazingtool

Slide 54

Slide 54 text

give yourself the time to do something 0 ambitious as

Slide 55

Slide 55 text

qinermeonisso oasis toot 2017 2018 julia julia

Slide 56

Slide 56 text

provide sabbaticals thanks stripe Fund open source thanks

Slide 57

Slide 57 text

g yan bcrypt A lot of people ask why should I work in software development as opposed to math physicsHinanceletc One reason is that this field is surprisingly full of inadequate equilibria a steady state in which low hanging fruits are still available for non experts to solve 20 11428 07,487

Slide 58

Slide 58 text

go build something impossible