Category Archives: podcalls

James Edward Gray: Associative Arrays and Ruby Hashes

Yesterday I put out a little screencast showing some ways of Creating Ruby Hashes. James Edward Gray II pinged me on Twitter and basically said “Great screencast! Ooh, but you forgot this! Ooh, and this! And this!” and so of course there was nothing to do for it but invite him to do a pairing screencast with me.

This video is a bit of a weird hybrid. You get 7 minutes of podcall, then 18 minutes of screencast, then another 12 minutes of podcall. James shows off some of the “hot new awesomeness” of Ruby 1.9, and then points out that this awesomeness has been around for a couple of years and nobody’s using it, in spite of it having been in the current Pickaxe for nearly as long. Along the way we talk about regular expressions, testing dogma, and the importance of never squashing creativity in the open source community. All in all, an incredibly fun time for me. James threatened to come back and do another one with me on regular expressions, and I’m mentioning it here in writing so that everybody knows I plan on taking him up on that offer.

No podcast, because half of it is us typing into a shared screen session. But here’s the video. You may need to watch it on Vimeo or download it to see the font clearly.

Associative Arrays with James Edward Gray II from David Brady on Vimeo.

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.