"How does this work?"
One of the biggest headaches about learning something new is thinking "I don't know."
Either you don't know how something works or don't know how to make it work.
Double that for metaprogramming.
That "I don't know" feeling hangs over your head as you struggle to understand. Searching the web leads to experience from others somewhere else in the world who might have had a problem similar to yours but not exactly the same. That can be helpful but it's not often that you close that browser tab and think "well that's a solved problem now."
Metaprogramming just always leads to confusion, doesn't it?
It often feels like a jumble of ideas. What is
How exactly does something like
belongs_to work in your Rails app? And if you want to do something similar… how can you?
You could start reading through the source. But reading and understanding big libraries like ActiveRecord without much metaprogramming knowledge can make your head spin.
Without a clear path to understand what you need to code, you're left with a fearful feeling… "I don't know"
You fear making changes because you'll break everything and won't know how to fix it.
Even worse, you won't know why it's broken.
Without a clear example and solution from your web search, you might turn your hope to documentation.
When things go wrong, documentation seems to be lacking useful details.
Sifting through incomplete documentation is worse than no documentation at all. At least missing documentation doesn’t tell you the wrong thing. And abandoned and out of date wikis are like a punch in the gut when you need clarity.
Searching the web leads to years-old articles that could still have accurate information… but gems change, Ruby changes, while information in blogs stays the same.
Getting that understanding of why or how isn't about knowing everything. You don't want to make your brain a copy of the documentation. In fact most experts rely heavily on "looking it up."
You’ve read blogs and documentation but nothing gives you the whole picture.
What is the code doing? Why create a class on the fly? Or why generate modules without typing it all out in the code?
A blog article tells you to set a configuration option but it’s not clear why. Or documentation tells you to subclass some constant but what does that do? And how can you get your ideas working?
Diving into the source code to see how it’s put together is often a last resort. Sometimes it’s helpful, but sometimes it appears to be a mess of
define_method, and other hard to understand features.
What if you had a simple way to get a superpower in programming?
Yes it really can be simple and yes it really is a superpower.
When we struggle, we turn on our superpowers by switching from "I don't know" to "I can figure this out"
There's an enormous difference between those two ideas.
Experts don't look it up to make a copy of documentation in their brains. Experts have ideas about how to solve the problem and verify with documentation or examples.
Experts get creative and look around for more information to help them solve the problem.
What if you knew how to read metaprogramming in code and immediately make sense of it?
When you work to master metaprogramming, you'll take small, easy to understand steps.
Mastery of metaprogramming will come from
- creating a way of working that makes big problems smaller.
- learning in small increments.
- you building and doing what you need so you will say "I can".
I bet you're thinking "how do I do that?"
Will I read lesson text and documentation and magically become a master?
What if you knew how to build your own solution with metaprogramming?
First of all, understanding documentation is hard. It's often written by people who already know the subject well. And when you know something well it's difficult to understand or remember what it's like to know almost nothing.
A lot of documentation is written for experts.
Worse than that, it's poorly written, inaccurate, or not even written at all!
That's why we're going to build a set of scripts and libraries that help you understand.
You build your tools it a way that makes sense to you. You'll keep things organized and you'll be able to make changes to test ideas and work through questions that you have. You'll provide the answers for yourself. Instead of thinking "I don't know how this will work" you'll think "I can figure this out!"
Wouldn't it be great to know when not to use metaprogramming?
You will learn by doing.
You will learn by interacting with the tools that you will master.
And you will leave a trail of breadcrumbs along your path to help you find your way again.
Your superpowers won't merely let you figure it out.
With the Metaprogramming MasterClass you'll be able to meet a challenge and say "we can build it this way."
But more important than knowing that you can do it, you'll be able to say "here's why…"
That superpower makes you a magnifier for the others on your team. You'll be able to to share your knowledge and experience and make others better.
Your mastery will help you approach a problem and know how it shouldn't be solved, saving everyone time, effort, and headaches. And you'll be able to say "here's why…"
Ruby Metaprogramming Masterclass teaches you to do more with Ruby, from the author of Clean Ruby, and Ruby DSL Handbook.
Get a solid foundation of what you can build with Ruby.
Understand the difference between
instance_eval. See how knowing your
singleton_class affects your understanding, and much more.
Master metaprogramming, master Ruby.
- Get a handle on ways to work with
instance_evalwhile understanding the differences.
- See how knowing your
singleton_classaffects your understanding.
- Know how
yield, lambdas, procs, and blocks work.
respond_to_missing?, and how method lookup works.
- Learn to control constant lookups and dynamic class and module creation.
- And how all this fits together.
About Your Teacher
Jim Gay is the author of Clean Ruby, the Ruby DSL Handbook, the Lead Developer for Radiant CMS and is a prolific contributor to it and many open-source projects. At Saturn Flyer LLC he’s built numerous Radiant sites, custom applications, and award winning graphic design and has had his designs published in HOW Magazine and The Best of LogoLounge. He’s been a co-host of the Ruby 5 podcast, speaker at RubyConf 2013, RubyConf 2014, Ruby Kaigi, Wroclove.rb, ArrrrCamp, and RubyNation, co-founder of Arlington Ruby and has been professionally building Ruby and Rails applications since 2006.
What people have said about the teacher:
“I learned a tremendous amount from Jim. With this help I was creating a simple DSL to support my QA automation tasks using metaprogramming in Ruby. I feel powerful and I am now leading the automated test effort at my firm!” —Kim Le
“Ruby Metaprogramming Masterclass by Jim Gay uncovers many great techniques and debugging tips. Highly recommended.” —Warren Vosper
Join the Ruby Metaprogramming Masterclass
Most training classes are hundreds or thousands of dollars where spending $800 is a great deal. This class self-paced and online, and you'll get the interactive class, videos, cheatsheets, exercises, and reusable source code for only
If at any time during the class you feel that you're not getting your money's worth, I'll give you your money back and you keep all the material, no questions asked.
The price is going up to $399 once the final course is complete with all videos and lessons. Get in now and get all the materials as they are added for only $129.