Tag Archives: Pat Maddox

Single Responsibility Principle

Pat and I are back with another installment of our weird little video podcast! Today we talk about the Single Responsibility Principle, which is at the heart of SOLID. SRP pushes everything out into little classes, and if you want to get anything complex done (like, for instance, you might find in any real program with more than 10 lines of code), you have to build a sort of aggregator object or manager class. Our key question for this podcall is “Even though SRP makes this aggregator class necessary, does the aggregator class itself violate SRP?”

As always we had a great time talking about it. Viewers will be happy to know that we kept the fart jokes to a minimum (I opted to go with Registered Sex Offender humor instead). Viewers distressed by the amount of airtime my cats got last time (and you know who you are, George S. from Utah) will be happy to know that my cat only farts in the microphone once, and she gets less than 10 seconds of airtime doing it. Fair warning: she really works those 10 seconds.

We Still Need a Name For Our Podcast!

Watch or listen to today’s podcast to find out what you can win if you suggest the winning name! Heck, you can win something just by listening! Congratulations to @trptcolin for winning the FIRST copy of Eloquent Ruby we’re giving away. Want to win the second? Listen to the podcast to find out how! Or reread the first sentence of the paragraph extra carefully!

Here’s the audio version: Single Responsibility Principle

And here’s the video, embedded for your viewing pleasure, or head over to Vimeo to download the full-sized 1280×480 version.

Single Responsibility Principle from David Brady on Vimeo.

Monkeypatching and the Open-Closed Principle

Ah, the Open-Closed Principle. In static languages like C++ and Java, classes by default are Closed-Closed. In dynamic languages like JavaScript and Ruby, they are Open-Open. In Java you have to add design pattern ceremony in order to open for classes for extension; in Ruby you have to exercise discipline in order to keep them closed for modification. Yesterday Pat Maddox and I spent 80 minutes kicking the can around talking about Monkeypatching versus the Open-Closed Principle. Along the way, we talked about everything from Rebecca Black to RSpec, from Cognitive Load to watching my cat try to claw open my office window.

We’re Starting a Podcast!

Pat and I are gonna start doing this regularly. And we need a cool name for our podcast! Help us out! The giver of the winning suggestion will get something cool. Not sure what yet, but I promise it will be something cool.

But for now, just watch the rest of this post’s space for the video. Because I’m embedding it in 3… 2…

Monkeypatching and the Open-Closed Principle from David Brady on Vimeo.