Advanced Ruby Programming
with Dave Thomas and/or Mike Clark
Master the Ruby programming language—to write more powerful libraries or improve your Rails applications—by learning advanced techniques in this 3-day, hands-on course for intermediate Ruby developers.
- Write Ruby programs and Rails applications with the confidence and efficiency that comes from deep knowledge of how things really work
- Learn what's new in Ruby 1.9, and how to make the most of it
- Take your Ruby skills to the next level by focusing exclusively on advanced Ruby techniques for three days with expert guidance
You'll come away from this course feeling like a Ruby Master. You'll not just know Ruby in depth, you'll also understand why things are the way they are. You'll have moved beyond the basic toolbox of the average Ruby developer—you'll be able to exploit the libraries and constructs the true pros use to make their code powerful, compact, and fun to work with.
What Will I Learn?
Best practices and Advanced Ruby Programming Techniques. Through a series of guided instruction, hands-on exercises, and discussion, you'll learn how the pros use Ruby to solve real problems. Topics include:
Object Oriented Design in a Dynamic Language
Ruby is different than the languages you're used to. If you're still using the techniques
that work with those languages, you're not exploiting the power of Ruby, and you're writing
more code than you need.
- Reuse mechanisms unique to Ruby and dynamic languages
- Modules and mixins
- Composition and delegation
- Runtime class extensions
The Ruby Object Model
Understand the underlying object model in Ruby, and everything falls into place. By truly
understanding the Ruby object model, you'll be a better Ruby programmer.
- The internals of objects and classes
- How classes really aren't anything special
-
Why
selfis important, and how it changes - How methods are called dynamically
Meta-programming
Metaprogramming lets you program more expressively. It makes your code easier to write and
easier to maintain and extend. You'll learn how to apply Ruby metaprogramming techniques to
your advantage.
- How blocks act as closures, and why that's vital to metaprogramming
-
Creating methods on the fly using
define_method -
Evaluating code at runtime using
eval,instance_eval, andclass_eval, and when to use one versus the other - Techniques for runtime class and object extension
- Practical uses of metaprogramming for writing internal Domain Specific Languages (DSLs)
Advanced Programming Techniques
- Blocks, Procs, and closures in depth
- Meta-classes and the meta-object protocol
- Using reflection to discover and inspect classes, inheritance hierarchies, defined methods, and instantiated objects at runtime
Hook Methods
Ruby hook methods are a way for your application to hook itself into the execution of the
Ruby interpreter. Using hook methods is crucial for some kinds of metaprogramming, and they
can make your code more flexible.
-
Mixing methods into classes using
included -
Decoupling code using
inheritedto keep track of subclasses -
Using
method_missingto create magic methods -
Applying
const_missingin both global and localized situations - Practical uses for hook methods
Ruby 1.9 Features
Ruby is a-changin'. As a Ruby programmer, you'll want to stay on top of all
the new syntax and language features.
- Overview of the new classes and libraries
- Major changes to String
- New hash goodness
- Enumerators
- More powerful regular expressions
- Multi-nationalization of code and data
- Fibers and threads
Real-World Ruby
We may know all the secrets of coding Ruby, but we still need to make
it work in the real world.
- Performance
- Debugging and Profiling
- Practical tips, tricks, and techniques
In addition to the prepared topics, you'll have time to ask questions and spark discussions with other experienced Ruby programmers.
“The course material was great and comprehensive. I walked away with so much new knowledge and even better, a huge list of things to look into and learn.”
— David Naffis
Who Should Attend?
Intermediate Ruby Programmers. This course picks up where our introductory Ruby Programming course leaves off. Ideally you will have gained experience developing a Ruby or Rails application between these courses.
This course will be a good fit for you if...
- You have a good working knowledge of the Ruby language, but you want to take it to the next level.
- You've tried what you consider to be advanced features in Ruby, but you want to understand when and how experts use those features.
- You've attended our introductory Ruby Programming course (not required).
Who Teaches the Course?
Dave Thomas is the co-author of The Pragmatic Programmer, Programming Ruby, and Agile Web Development with Rails. Along with Andy Hunt, he runs The Pragmatic Programmers.
Mike Clark is the owner of The Pragmatic Studio, and also a Ruby, Rails, and iOS developer, author, and trainer with over 15 years experience. He's the author of Advanced Rails Recipes and Pragmatic Project Automation, and co-author of Agile Web Development with Rails. You can check out his latest client projects and endeavors on his personal site.
What Do I Need?
This course is taught on site at your location. As such, you'll need the following:
- a room to comfortably accommodate your team
- a laptop projector and screen
- a whiteboard or flipchart with markers
- laptops (or desktops) for each attendee
