+ - 0:00:00
Notes for current slide
Notes for next slide

zen and the art of convincing your company to use Rust

motocycle

1 / 111

hi i'm @ag_dubs

ag_dubs

2 / 111
  • Rust Core Team Member

  • crates.io Team Lead

  • Rust Community Team Lead

  • Increasing Rust's Reach Project Director

  • RustBridge Lead Instructor

  • Rust/WebAssembly Working Group

3 / 111

who are you?

4 / 111

npm

5 / 111

npm

6 / 111
  • Node.js Board of Directors

  • Registry Engineer, npm

  • Community Comittee Founder

  • TC-39 Invited Expert

  • NodeTogether Founder and Lead Instructor

7 / 111

8 / 111

npm-stats

9 / 111

modulecounts

10 / 111

npm is the

LARGEST PACKAGE REGISTRY IN THE WORLD

11 / 111

12 / 111

npm uses rust

13 / 111

what is rust?

14 / 111

rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.

15 / 111

rust is a ???? ???? ?? ? ? ??????? ??? ???????? ??? ??????? ????? ??? ??????

16 / 111

rust was originally conceived of as a language to replace C++ in Firefox

17 / 111
  • statically typed

  • compiled

  • no runtime

  • small memory footprint

  • memory safety guarantees

18 / 111

rust is a programming language that wants to empower all developers to be systems developers.

19 / 111

speed, safety, productivity:

pick three

20 / 111

how do i convince my company to use rust?

21 / 111

The number of rational hypotheses that can explain any given phenomenon is infinite.

Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance: An Inquiry Into Values

22 / 111

10 tips

(that may or may not work for you but will almost definitely make you a better developer advocate)

23 / 111

tip 1

don't rewrite your software in rust

24 / 111

tip 1

don't completely rewrite your software in rust

25 / 111

complete rewrites are very often unsuccessful

26 / 111

A complex system that works is invariably found to have evovled from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a simple system.

john gall

doctor

27 / 111

cheating gall's law

by cj silverio

architecture

28 / 111

proxy

29 / 111

microservices

microservices

30 / 111

tip 2 show up with code

31 / 111

tokio

32 / 111

writing a registry follower in rust

33 / 111

follower

34 / 111

follower

35 / 111

follower

36 / 111

jsfollower

37 / 111

tip 3 don't sell

38 / 111

bashing other languages makes everyone look bad

39 / 111

you don't have to control someone else's first experience of rust

40 / 111

not everyone is gonna love everything about rust

41 / 111

not everyone is gonna love everything about rust

right away

42 / 111

#![allow(bad_style)]

43 / 111

allowbadstyle

44 / 111

allowbadstyle

45 / 111

allowbadstyle

46 / 111

tip 4 sell sell sell

advice

47 / 111

slack

48 / 111

slack

49 / 111

50 / 111

51 / 111

tip 5 the hard part of programming isn't programming

52 / 111

docs

  • The Rust Book

  • The Domain Working Group Books

  • The Rust Reference

  • The Nomicon

docs

53 / 111

tooling

  • cargo

  • rustup

  • rustdoc

  • rustfmt

  • clippy

tools

54 / 111

community

  • #rust-beginners on mozilla IRC

  • RustConf, RustFest, RustBeltRust

  • Increasing Rust's Reach

  • RustBridge

  • exercism.io

community

55 / 111

docs, community, and tooling may seem easy and common

56 / 111

docs, community, and tooling may seem easy and common

they are neither

57 / 111

tip 6 the hard part of programming is programming

58 / 111

selling something on technical merit is easy

59 / 111

mostloved

60 / 111

tip 7 be prepared for things to change

61 / 111

problem:

our node service logs are full of runtime errors

parsing them is slow

62 / 111

pagerduty

63 / 111

oh no my rust parser is 2x slower than the js version

64 / 111

stdin-lock

65 / 111

[0; 1024];

66 / 111

i just fully expected to rust my way into 50% perf over js. sometimes i forget that v8 is pretty darn fast.

67 / 111

You are never dedicated to something you have complete confidence in. No one is fanatically shouting that the sun is going to rise tomorrow. They know it's going to rise tomorrow. When people are fanatically dedicated to political or religious faiths or any other kinds of dogmas or goals, it's always because these dogmas or goals are in doubt.

Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance: An Inquiry Into Values

68 / 111

i thought i'd be selling rust because of its speed

69 / 111

i thought i'd be selling rust because of its speed

... but i'm selling rust because of its safety

70 / 111

there's a learning curve to making rust go fast

sonic

71 / 111

making rust correct is the default!

74 / 111

the safest program is one that doesn't compile

75 / 111

no

76 / 111

make the right thing, easy

77 / 111

make the right thing, easy

make the wrong thing, hard

78 / 111

make the right thing, easy

make the wrong thing, impossible

79 / 111

tip 8 be prepared for things to stay the same

80 / 111

boring code is my favorite code

81 / 111

just because you started using rust doesn't mean everything will change

82 / 111

just because you started using rust doesn't mean everything will change

in fact, it's better if it doesn't!

83 / 111

science

scientific method

84 / 111

only change one thing at a time so you can measure rust's impact

measure

85 / 111

only change one thing so you don't burn everyone out

burnout

87 / 111

git-deploy-rust

89 / 111

we deploy rust using nearly the exact same process we deploy node

90 / 111

tip 9 have a problem to solve

sherlock

91 / 111

trashfire

(this should be easy because all software is terrible)

92 / 111

big numbers are big

93 / 111

over the last year

70 billion

downloads occured

https://twitter.com/seldo/status/845094537752014852. 23 March 2017.

94 / 111

storefile transforms

96 / 111

follower

97 / 111

find a problematic part of your product and try rewriting it in rust

98 / 111

tip 10 learning curves are a blessing in disguise

99 / 111

this is the really fun part about learning new things. i still have the patience to do any number of silly things

100 / 111

learning something new can be energizing

101 / 111

learning something new can be energizing

even if (or maybe because!) it is hard

102 / 111

summary

  1. don't rewrite your software in rust
  2. show up with code
  3. don't sell
  4. sell sell sell
  5. the hard part of programming is not programming
  6. the hard part of programming is programming
  7. be prepared for change
  8. be prepared for things to stay the same
  9. have a problem to solve
  10. learning curves are a blessing in disguise
103 / 111

If you’re going to repair a motorcycle, an adequate supply of gumption is the first and most important tool. If you haven’t got that you might as well gather up all the other tools and put them away, because they won’t do you any good.

Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance: An Inquiry Into Values

104 / 111

gumption

'ɡʌm(p)ʃ(ə)n/

noun, informal

shrewd or spirited initiative and resourcefulness.

synonyms: initiative, resourcefulness, enterprise, imagination, imaginativeness, ingenuity, inventiveness; class: middle, center

105 / 111

go forth and try rust!

106 / 111

go forth and try webassembly?!

107 / 111

wasmtoruntime

108 / 111

go forth and try new things!

110 / 111

thanks!

@ag_dubs, bit.ly/gotober-2018

motorcycle

111 / 111

hi i'm @ag_dubs

ag_dubs

2 / 111
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow