The Master Rubyist

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

The Master Rubyist

Slide deck from my RubyC 2016 presentation.

Bozhidar Batsov

June 07, 2016

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

181 slides
  1. Hakuna Matata, what a wonderful phrase Hakuna Matata, ain't no

    passing craze It means no worries for the rest of your days It's our problem free philosophy, Hakuna Matata
  2. A style guide • a curated set of (supposedly) good

    practices • spares you the process of making trivial decisions • allows you to focus on the actual problems • simple and concise
  3. i = 1 res = 0 while i <= 10

    res += i i += 1 end
  4. def parse(input, skip_code_comments: false, ignore_whitespace: true) # do stuff end

    method(:parse).parameters #=> [[:req, :input], [:key, :skip_code_comments], [:key, :ignore_whitespace]]
  5. config.thing = { "foo" => "bar" } config.thing.freeze = {

    "foo" => "bar" } config.thing.delete("foo") # active_support/concurrency/share_lock.rb:151:in `delete': can't modify frozen Hash (RuntimeError) # from active_support/concurrency/share_lock.rb:151:in `yield_shares' # from active_support/concurrency/share_lock.rb:79:in `block in stop_exclusive'
  6. vim

  7. Elm

More Decks by Bozhidar Batsov

Other Decks in Programming