Skip to content

Instantly share code, notes, and snippets.

@Ferdy89
Last active November 18, 2015 00:03
Show Gist options
  • Save Ferdy89/e85cfcd7a870a54f0af8 to your computer and use it in GitHub Desktop.
Save Ferdy89/e85cfcd7a870a54f0af8 to your computer and use it in GitHub Desktop.
RubyConf 2015 Notes

Day 1

ORM Talk

  • Use Bullet
  • ActiveRecord breaks SRP

How to write good gems

  • Quick Start
  • Long README
  • Never do breaking changes if possible and use semantic versioning
  • Support as many versions as possible
  • Gemnasium - Auto keep track of your Gemfile's dependencies
  • wwtd - Replicate Travis CI config locally
  • Appraisals - Generate multiple sets of Gemfiles to use against Travis CI
  • vagrant up && bundle && rake test must just work
  • Rubocop - Enforce code style rules
  • Rubyflow - Give publicity to a gem

Closing keynote day 1

  • Worst. Ideas. Evar - By Aaron Patterson
  • Array#permutations
  • Docker & Kubernetes
  • Google Cloud with Ruby
  • Rinda (Linda on Ruby)

Day 2

Opening Keynote

  • Build great partnerships

Code culture and the pursuit of happiness

  • DHH, "I wanted a life beyond work"
  • Google - Unconscious bias

Pitfalls of gem dependencies

  • Audit security of the gems you use (Hakiri)
  • Breakmen - Find security vulnerabilities

Legacy code

(Didn't watch, but probably should)

Climbing the walls

  • Re-fucking-watch!

Work/life balance

  • Take time off! - Duh

Ruby ENV

  • GEM_PATH - ENV var to lookup for gems

Git talk

  • Small PRs
  • LiceCAP to add gifs to PRs

DSLs

  • Limit the scope of DSLs to make people hate you less

Day 3

Keynote

  • Whitespace as dots
  • Auto-indent
  • Ruby blocks

How to performance

  • RubyProf - CallStackPrinter
  • StackProf
  • AllocationTracer
  • RubyVM.stats

Building CLI apps for everyone

  • mruby-cli

Ruby 2 Methodology

GDB: A gentle intro

  • gdb -p 10 - Attach to process and leave you in a prompt
  • backtrace - Where am I?
  • info threads - List of all the active threads
  • thread appli all backtrace - Applies backtrace for all threads
  • quit - Exit, duh
  • gdb --args ruby snowflake.rb - To run an arbitrary command instead of attach
  • run - Run the program started with the previous command
  • break rb_ary_uniq_bang - Set a breakpoint on that function
  • list - Show source code (like whereami pry)
  • display VALUE - Show the value of a variable VALUE
  • display (struct RArray)VALUE - Display the value of the memory in Addr VALUE
  • For MRI: rb_p - Ruby-like puts in C. Use like call rb_p(VALUE)
  • call rb_backtrace() - Ruby-like backtrace
  • next (same function), step (drill in), finish (go back one level up)
  • continue (go until the end)
  • call(rb_p(rb_eval_string_protect("Ruby code", (int*)0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment