Level up your code

 

You can't afford complicated codE

Writing small and easily testable methods can certainly clean things up, but as your application grows your classes start to know too much. Large classes means a large cognitive overhead for understanding how things work, or why they don’t.

It would be great to keep related things closer together. If this needs that to function, why aren't they right in front of your face? You might have broken things up well, but each time you search around for related code it begins to feel like a mess.

The more time you need to understand your code and keep it well organized, the more expensive your project becomes.

 

DSLs shouldn't require a masters degree in metaprogramming

You know writing DSLs in Ruby is powerful and flexible, but aren't sure exactly how to get started.

The worst part of attempting to write a DSL is worrying that you'll get stuck without knowing where to turn. What's the difference between class_eval and instance_eval? And how do you know when to use them?

Taking control of your project with custom DSLs would make your code so much more expressive.

Learn to make code that expresses your team's shared understanding of a business problem.

 


Ruby Metaprogramming MasterClass

One of the biggest headaches about learning something new is thinking "I don't know."

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.

What if you knew how to read metaprogramming in code and immediately make sense of it?

Get a solid foundation of what you can build with Ruby. Instead of thinking "I don't know how this will work" you'll think "I can figure this out!"

Get started mastering Ruby by mastering metaprogramming.