Skip to content

Instantly share code, notes, and snippets.

@joecannatti
Last active December 26, 2015 21:59
Show Gist options
  • Save joecannatti/7219927 to your computer and use it in GitHub Desktop.
Save joecannatti/7219927 to your computer and use it in GitHub Desktop.
talk
Ruby is a complex programming language. It’s power comes from the richness and flexibility of the language’s features.
There’s so many cool and interesting bits to ruby, that sometimes we don’t take the time to fully grok them all.
It’s possible to use a Ruby feature everyday, but not really understand how it works.
In this talk, we’ll dig deep into 5 of the most commonly misunderstood aspects of programming in Ruby.
Geared mostly towards newer Ruby devs, but there’ll certainly be something for everyone!
* Code evaluation time
* Methods called while defining a class (attr_accessor, has_many, etc)
* What really is ‘def’?
* What really is ‘class << self'
* include vs extend
* class_eval vs instance_eval
* RSpec block evaluation and matchers
* So….#should is a method…right?
* And well….it takes an argument…and eq is another method that returns something…right?
* We’ll clear this all up!
* What context and describe really do
* Lambda vs Block vs Method vs Proc
* Ruby has 4 types of closures!
* We’ll make sure we all know what’s different about each of them.
* How blocks are used in Enumerables.
* How #each, #map, and #inject work
* Syntactic sugar
* Options passed as a hash without {}’s
* operators, (+, [], <<) did you know these are all methods?
* File Loading
* How files are loaded in Rails
* How Ruby require is different from how other languages do it.
* How gems are downloaded and required
@mw44118
Copy link

mw44118 commented Oct 29, 2013

Line 29 maybe should be ... in ruby

@jdantonio
Copy link

I really, really like this talk idea. A couple of the topics you mention are common "gotchas" for my coworkers coming from C# and Erlang. I would watch this talk. My only suggestion: don't conflate Ruby with RSpec and Rails. Focus on the language itself. RSpec and Rails "gotchas" can be other talks.

@joecannatti
Copy link
Author

Thanks guys. You're both right. As I'm working on the talk, it's becoming clear that examples in Rails are too convoluted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment