Slide 1

Slide 1 text

why i ruby or: my first program liz abinante AKA @feministy wizard & slothologist by night software engineer at new relic by day

Slide 2

Slide 2 text

preface slides are text-heavy so we can all follow along

Slide 3

Slide 3 text

(brief) history of liz, vol. 1

Slide 4

Slide 4 text

age 12: html & css the entire internet is ugly and there is no one to impress

Slide 5

Slide 5 text

this works so well for me

Slide 6

Slide 6 text

subtext: i used … a lot.

Slide 7

Slide 7 text

subtext: i used … a lot.

Slide 8

Slide 8 text

i made beautiful websites for 10+ years… alone

Slide 9

Slide 9 text

for 10+ years i did not know anyone else who wrote code.

Slide 10

Slide 10 text

i was perfectly happy about the state of things until i started learning more about technology.

Slide 11

Slide 11 text

then, it was just doom. confusing, exciting doom.

Slide 12

Slide 12 text

OMG WHAT EVEN IS THE INTERNET?

Slide 13

Slide 13 text

i learned to program 2.5 years ago

Slide 14

Slide 14 text

ruby was my first programming language

Slide 15

Slide 15 text

why i ruby

Slide 16

Slide 16 text

i learned ruby because there were people to help be a successful beginner

Slide 17

Slide 17 text

i learned ruby because the community has done lots of small things that have big impact

Slide 18

Slide 18 text

i learned ruby because i was never alone when i was a beginner

Slide 19

Slide 19 text

it seemed to work out! i’m here, after all

Slide 20

Slide 20 text

my first program

Slide 21

Slide 21 text

something with logic. something with state.

Slide 22

Slide 22 text

something with design requirements.

Slide 23

Slide 23 text

something with a user interface of sorts.

Slide 24

Slide 24 text

something that either works…

Slide 25

Slide 25 text

or fails spectacularly

Slide 26

Slide 26 text

so, what was it?

Slide 27

Slide 27 text

thanks, internet: http://www.huffingtonpost.com/2013/11/26/tamagotchi-reboot_n_4339168.html

Slide 28

Slide 28 text

TAMAGOTCHI!!!!!

Slide 29

Slide 29 text

my first program was a PuppyGotchi

Slide 30

Slide 30 text

d

Slide 31

Slide 31 text

just look at it:

Slide 32

Slide 32 text

class PuppyGotchi def initialize(name) @name = name @puppy_belly = 10 @puppy_bladder = 0 @puppy_bowels = 0 @puppy_is_sleeping = true puts "Congrats! You are now the proud owner of #{@name}." end # ... end

Slide 33

Slide 33 text

poopers = PuppyGotchi.new("Kiwi") poopers.feed_puppy poopers.puppy_bathroom_tinkle poopers.puppy_bathroom_poopy

Slide 34

Slide 34 text

my awesome dog, kiwi

Slide 35

Slide 35 text

how does the PuppyGotchi experience time?

Slide 36

Slide 36 text

def passing_time if @puppy_belly >= 2 @puppy_belly = @puppy_belly - 1 @puppy_bowels = @puppy_bowels + 1 @puppy_bladder = @puppy_bladder + 1 elsif @puppy_belly == 1 @puppy_is_sleeping = false else dead_puppy end if @puppy_bowels == 10 @puppy_bowels = 0 puts "#{@name} just took a huge deuce in your favorite suede shoes. That's what you get for leaving them out!" end if @puppy_bladder == 10 @puppy_bladder = 0 puts "#{@name} just went pee all over your $5,000 carpet. This is the definition of love. Go clean it up and learn from your mistakes." end if puppy_hungry? @puppy_is_sleeping = false puts "#{@name} wakes up and demands to be fed." end if puppy_poopy? @puppy_is_sleeping = false puts "#{@name} wakes up and urgently needs to poo." end if puppy_tinkle? @puppy_is_sleeping = false puts "#{@name} is awake! They need to pee. Really badly. You better get on that." end end

Slide 37

Slide 37 text

def passing_time if @puppy_belly >= 2 @puppy_belly = @puppy_belly - 1 @puppy_bowels = @puppy_bowels + 1 @puppy_bladder = @puppy_bladder + 1 elsif @puppy_belly == 1 @puppy_is_sleeping = false else dead_puppy end if @puppy_bowels == 10 @puppy_bowels = 0 puts "#{@name} just took a huge deuce in your favorite suede shoes. That's what you get for leaving them out!" end if @puppy_bladder == 10 @puppy_bladder = 0 puts "#{@name} just went pee all over your $5,000 carpet. This is the definition of love. Go clean it up and learn from your mistakes." end if puppy_hungry? @puppy_is_sleeping = false puts "#{@name} wakes up and demands to be fed." end if puppy_poopy? @puppy_is_sleeping = false puts "#{@name} wakes up and urgently needs to poo." end if puppy_tinkle? @puppy_is_sleeping = false puts "#{@name} is awake! They need to pee. Really badly. You better get on that." end end 5 conditionals el ol sorry, sandi

Slide 38

Slide 38 text

the PuppyGotchi fails pretty spectacularly

Slide 39

Slide 39 text

it usually dies because it needs constant care…

Slide 40

Slide 40 text

… but also because the concepts of logic and math in programming were lost on me as a beginner

Slide 41

Slide 41 text

positive note, though: this is exactly how a real tamagotchi behaved!

Slide 42

Slide 42 text

we are always beginners

Slide 43

Slide 43 text

when was the last time you learned a new programming language…

Slide 44

Slide 44 text

and wrote something that was totally foolish,

Slide 45

Slide 45 text

or ridiculously fun, or failed spectacularly?

Slide 46

Slide 46 text

it’s scary to be a beginner at anything

Slide 47

Slide 47 text

programmers are really smart, and we brag. a lot.

Slide 48

Slide 48 text

all of the code books are perfect, beautiful code

Slide 49

Slide 49 text

beginners don’t have the tools to write that code yet

Slide 50

Slide 50 text

sharing your (adorable) mistakes makes learning more fun for beginners

Slide 51

Slide 51 text

sharing your mistakes lets beginners see their future success in your past experiences

Slide 52

Slide 52 text

ruby is better together

Slide 53

Slide 53 text

here is your small thing to do:

Slide 54

Slide 54 text

find your first program

Slide 55

Slide 55 text

it can be the first program you ever wrote or from a new language you learned

Slide 56

Slide 56 text

tweet it! NO EDITING. #myfirstprogram

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

for better or worse, all of my early programming

Slide 59

Slide 59 text

#myfirstprogram share your code. help beginners to be awesome. show them what the ruby community is all about! THANK YOU!!!! @feministy