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

The Master Rubyist

The Master Rubyist

Slide deck from my RubyC 2016 presentation.

Bozhidar Batsov

June 07, 2016
Tweet

More Decks by Bozhidar Batsov

Other Decks in Programming

Transcript

  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