Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why I Ruby (Or: My First Program)

Liz
September 02, 2015

Why I Ruby (Or: My First Program)

I write Ruby because the community helped me be a successful beginner when I was struggling alone after more than 10 years of writing HTML & CSS and knowing no one else who wrote code. This talk is an ode to Ruby and the wonderful things we've done together, and a little flash back to my first program ever.

Liz

September 02, 2015
Tweet

More Decks by Liz

Other Decks in Programming

Transcript

  1. why i ruby or: my first program liz abinante AKA

    @feministy wizard & slothologist by night software engineer at new relic by day
  2. age 12: html & css the entire internet is ugly

    and there is no one to impress
  3. i was perfectly happy about the state of things until

    i started learning more about technology.
  4. i learned ruby because the community has done lots of

    small things that have big impact
  5. d

  6. 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
  7. 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
  8. 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
  9. … but also because the concepts of logic and math

    in programming were lost on me as a beginner
  10. it can be the first program you ever wrote or

    from a new language you learned
  11. #myfirstprogram share your code. help beginners to be awesome. show

    them what the ruby community is all about! THANK YOU!!!! @feministy