Master the Object-Oriented Mindset in Ruby and Rails

It's time to make objects work for you.

"Just use objects!" they said. "It'll be simple!" they said.

You're working in an object-oriented programming language. You're using an object-oriented application framework. You've read dozens of articles on patterns and SOLID principles.

And yet, it feels as if you spend hours a week struggling over how to factor your application code into small, neatly encapsulated pieces.

Does anyone else have trouble figuring out which of two collaborating objects should "own" a business rule? How are you supposed to keep your controller objects "skinny" when there are so many edge cases they need to handle? And how do those User classes always seem to become a thousand lines long?

You're not alone. These are issues that thousands of other programmers struggle with on a daily basis. From trying to keep domain objects from bloating into behemoths, to figuring out just what the heck "tell, don't ask" is supposed to mean,  OO programming doesn't seem quite as straightforward as it appears on the label.

Is object-oriented programming a scam?

So what's the deal? Are clean, well-factored, easy to change object-oriented designs a myth? Or is getting OO "right" only possible for grey-haired code wizards?

In a word, no. Applications composed of small, pleasant-to-work with objects aren't a fairy tale. You can learn to build them, and do it without agonizing over how to break up your objects. The key is having the right mindset.

Object-oriented programming isn't a technology. It's more like a form of applied philosophy. To wield it effectively, you need the right perspective. And the best way to get that perspective is to be exposed to the thought processes and the design vocabulary employed by experienced OO designers.

Heavyweight, pedantic methodology not required.

Don't worry, you don't need to subscribe to some secret, fundamentalist sub-school of software design in order to "get OO right". There aren't lists of rules and regulations you must observe in order to stay on the golden path. No sacrifices to Cthulhu are necessary.

How big is your toolbox?

You know that user requests are supposed to be handled by controller objects. You know that data is supposed to go in business model objects. But how are you supposed to keep these objects small when their responsibilities grow ever larger over time? How are you supposed to coordinate the ever-increasing interactions between business models as your application matures? Not to mention managing the connections to the myriad external services with which a modern application must integrate...

Here's the thing: if you're anything like me, you learned object-oriented design like a person learning to swim by being thrown into the deep end of the pool. And sure, you can pick up a mean dog-paddle that way. But it doesn't teach you versatility. It doesn't give you a deep toolbox to pull from.

Where application designs devolve into chaos is in the implicit concepts that never quite emerge as true objects. Instead they haunt your code like ghosts: cluttering interfaces, duplicating the same conditional logic in multiple places, and causing your object dependencies to grow without limit. Or, you see the signs of these unacknowledged concepts in the form of endlessly proliferating mixin modules (or Concerns).

Learn to See the Objects Between the Objects

The secret to successful object-oriented design isn't really a secret at all. It comes down to modeling your concepts as objects... all of your concepts.  

There's no such thing as "plain old data". Your data has limits, implications and assumptions which can be modeled explicitly... or scattered implicitly.

The "glue" code tying your business models to email, push notifications, webhooks, etc. needs a place to live... or it will camp out all over your codebase.

Every application contains workflows. Can you list them... and point to a single "home base" object for each one?

Rules and Guidelines Aren't Enough

  • The "Single Responsibility" Principle
    Each object should have one and only one responsibility. But if "represent a User" counts as a responsibility, what's to keep half of your code from falling under the "User" model?
  • "Don't Repeat Yourself"
    It's easy enough to make sure a unit of information is only stored in one place. It can be a lot harder to make sure decisions are only made in one place. Especially so when business rules are implicit instead of having  their own objects to represent them.
  • The "Open/Closed" Principle
    Again, this sounds great in theory. But when multiple concepts are represented in single objects, it's impossible to add new functionality without modifying the same objects over and over again.

You need more than patterns and aphorisms. You need inspiration.

I know what it's like to struggle with real-world OO design problems. Everything seems so clear in theory, but when the rubber meets the road you end up with tangled conditional logic and thousand-line "God objects". And maybe if you had weeks to ponder your design, you could come up with something more elegant. But this feature was due yesterday...

The truth is, there is no panacea. But you can get better at designing with objects. You can expand your repertoire of solutions. You can develop your instincts for the "right" division of responsibilities.

You can't level-up in a vacuum

You don’t acquire these kinds of skills through dry textbook examples. The best way to do it is by watching experienced developers as they apply OO principles to real-world problems. Which is great if you have the opportunity to work with master programmers. But what if you don’t?

I'd like to help.

Join me to learn object design thinking, by example.

My name is Avdi Grimm. I’ve been studying and applying Object-Oriented thinking to software for twenty years, and I’ve been using Ruby for fifteen. I’ve worked or consulted on dozens of Ruby and Rails projects, from tiny to humongous.  I'm a Ruby Hero Award recipient, and a co-teacher of Sandi Metz's Practical Object-Oriented Design in Ruby course. And in my books and videos, I’ve helped thousands of programmers level up their software design skills.

Over my years creating the RubyTapas screencast series, I've built up a library of demonstrations of effective Object-Oriented design techniques. They're derived from the real-world experiences of myself and others. I've distilled these lessons down to their essentials in order to present them in short, ultra-focused videos.

I thought about simply packaging these videos alone as a course and selling them. But it takes more than just demonstrations to learn to internalize the Object-Oriented mindset. I want to give you something more.

I'd like to invite you on a journey of Object-Oriented inspiration.

It's called: Master the Object-Oriented Mindset in Ruby and Rails

(Yes, it's a mouthful.)

This is a self-paced course that will teach you to apply the Object-Oriented perspective by example, in the context of Rails and Ruby applications. You'll learn in three distinct ways:

1.     Technique Demonstrations: you'll get access to over two dozen videos (drawn from the RubyTapas library) showing you new ways of thinking about OO design. New introductory material and quiz questions will tie these videos together in a coherent learning path. Get a free preview now!
2.   Pair-Programming Sessions: Follow along as expert Rails programmer Betsy Haibel and I pair-program to add a feature to a real-world Rails application, discussing questions of pragmatic OO design along the way.
3. Q&A sessions: A series of eight Q&A sessions with industry experts like Ben Orenstein, Justin Searls, Noel Rappin, and others, answering questions posed by the initial cohort of MOOM beta students. (There's a full list of guests below).

What people are saying about MOOM

This course completely reframed OOP for me

Brian Holt

If your team writes object-oriented code (in any language) you’ll benefit from Avdi’s thinking. He’s both clear a…

Sarah Mei

I just want to thank you for the MOOM course. It is incredibly good... What really inspired me was the discussions with the special guests. Listening to experienced hands break down tricky issues with all of their trade-offs and warts (including contextual factors like team composition and business constraints) was wonderful. I've come to accept that almost nothing is binary in building software, and these discussions had that same spirit of guiding decisions, not prescribing them.

Noah Botimer

Avdi's OOP course taught me more than I ever knew about object oriented thinking. Highly recommended!

Vishal Bardoloi

There were so many things I did not know about, Whole Objects for example, Smart Collections for another that it enabled me to quickly add more skills and concepts to my code.

I am writing smaller classes, I'm using fattr attributes, I'm using the Naught gem to follow the NullObject pattern, I'm using Smart Collections and I spend greater amounts of time really trying to understand what I'm trying to accomplish with my code and how to best represent that with object oriented design.

Mitchell Gould

Enroll in Master the Object-Oriented Mindset!

Are you ready to increase your confidence in building Object-Oriented software solutions? Are you ready to start seeing the missing concepts hiding inside that big ball of spaghetti? Join me, and start Mastering the Object-Oriented Mindset today!

100% Satisfaction Guaranteed


Avdi Grimm

Course Creator

About the Teacher

Avdi Grimm is a Ruby Hero, the author of Confident RubyExceptional Ruby, and Objects on Rails, and Head Chef of the RubyTapas screencast series.

Avdi lives with his four kids in the foothills of the Great Smoky Mountains in Eastern Tennessee. He likes to split his rare leisure time between hiking, and dancing to oontz-oontz music.

Not sure if this course is right for you?

Signing up for a course like this is a big investment in both money and time. You may have questions or concerns, and in this section I'd like to address them! Or, if you don't see your question answered here, you're always welcome to send me a message.

Can I get my whole team into the course?

Yes! You will be able to select and adjust how many seats you want to buy during checkout. A 20% discount will be applied to purchases of 5 seats or more, and a 25% discount to purchases of 10 seats or more. The discounts will appear on the checkout screen.

What's the time commitment for this course?

In order to get the most out of the course, you'll probably want to devote around 2-3 hours to it each week.

I'm new to Ruby and/or Object-Oriented programming. Is this course for me?

If you're just learning Ruby, or your just exploring OO concepts for the first time, this course probably isn't for you. To get the most benefit, you should be reasonably fluent in Ruby and have some preexisting familiarity with OO principles.

I already read [insert OO book here]. Will I learn anything new?

Master the Object-Oriented Mindset is designed to complement other Object-Oriented texts and courses. Unlike most books, it is less of a tutorial and more a series of inspirations which will help you deepen your grasp of the Object-Oriented perspective. MOOM is a great follow-on to books like Practical Object-Oriented Design in Ruby. With its many examples drawn from various types of application, it will help enrich your understanding of the OO way of looking at problems.

Can I move through this course at my own speed?

Yes! This is a self-paced course. You can binge on it if you like, although I recommend spreading it out over at least eight weeks in order to best retain what you've learned.

Will there be homework?

The technique demonstrations are accompanied by "food for thought" quiz questions that will help you apply the ideas discussed to your own projects and discuss them with other students. These are not be graded, however.

In addition, interspersed with the lessons you'll find links to supplemental talks, papers, and blog posts that complement and expand upon the course topics.

What if I'm not satisfied? Or what if I don't have time for it?

If you're not happy with the course, if it's not the type of learning you're looking for, or even if you just realize you don't have time for it right now, let me know within 30 days of your purchase and I'll be happy to refund your purchase, no questions asked.

Who are the Q&A guests?

I'm very lucky to have a lot of friends and acquaintances in the Ruby, Rails, and OO-design world, some of whom  joined me to answer questions about OOP and Ruby/Rails from the original cohort of MOOM students. The full list of Q&A guests is:

Will I be able to access the course materials indefinitely?

Yep! You'll get lifetime access to the course members area (for the lifetime of the course website; I can't make promises about your lifetime!)

You'll also be able to download the course videos for offline viewing.

I'm already a RubyTapas subscriber, will this all be stuff I've already seen?

If you are a subscriber at the Ravenous level, you will be receiving the full static version of the course as part of your subscription, once it is finished and polished up. 

If you are a RubyTapas subscriber at any other level, here's a breakdown of what you already have versus what's new.

What you already have:

  • The OO technique demonstration videos, drawn from the RubyTapas archives.

What you don't have:

  • The Capacitor Sessions - videos of pair-programming sessions applying OO perspective to a real Rails project.
  • The Q&A sessions with special guest experts.
  • Quiz questions reinforcing the technique demos.
  • New introductory material tying the technique demos together.
  • Supplemental reading/viewing recommendations.
  • Dedicated course forum.
  • Exclusive discounts on recommended books and courses.

What you get in this course:

  • Two dozen laser-focused OO technique demonstration videos.
  • The Capacitor Sessions, a series of 15 recorded pair-programming sessions on a real-world Rails project, tightly edited and broken into 20-minute chunks for easier viewing.
  • 8 recorded Q&A sessions with special guests.
  • Nearly $300 in exclusive discounts on recommended books and courses.
  • "Food for thought" quiz questions for discussion with other course students.
  • Further reading/viewing recommendations for each section of the course.
  • A dedicated course forum.
  • Permanent access to all course materials.
  • Downloadable course videos for offline viewing.

100% Satisfaction Guaranteed


100% Satisfaction Guarantee

You are fully protected by our 100% satisfaction guarantee. If you're not satisfied with the course for any reason, just ask within 30 days of purchasing, and we'll give you a full refund, no questions asked.

P.S.: Not only is this course a chance to cement your understanding of Object-Oriented principles, it's also a great way to network with other programmers who have the same goal! In the course forum, you'll be able to connect with other course participants, ask and answer questions, and compare notes. 

Copyright © 2017 ShipRise LLC