blog.rubybestpractices.com Archives - 11 February 2013, Monday

Welcome, Hacker News folks. If you find the following project worthwhile, I’d really appreciate an up vote so that I can reach a broader audience. Please read a bit about Ruby Mendicant University to see what cause this goes to support. Since the first Ruby Mendicant University sessio...

Update: I came across an inlink to this page that was layering in advertisements in a frame. Luckily, there are technical solutions to at least some social problems, and you may now browse again in peace :) If you’ve worked with Ruby for at least a little while, you might already know...

Today, we’ll focus on the question that caused me to write this series in the first place. Many readers were confused by my use of extend self within earlier Practicing Ruby articles, and this lead to a number of interesting questions on the mailing list at the time these articles wer...

Issue #21: How to practice (1 of 2) 2011-09-06 16:00, written by Gregory Brown Originally published as part of the first volume of the Practicing Ruby newsletter on January 22, 2011. Most of these issues draw inspiration from discussions and teaching sessions at my free online school,...

The last few weeks have been a wild ride. Starting in January, I’ve been releasing a chapter at a time here on the RBP blog, and many of those chapters were pretty well commented on. Just for the sake of completeness, here’s a link back to each of those posts: Chapter 1: Driving Code ...

USP: Implementing signal handlers - some caveats 2012-03-27 00:25, written by Eric Wong Signal handlers may run at any time If your program receives a signal, Ruby will invoke the associated signal handler as soon as it is able to. This means a signal handler can hijack your existing ...

So even if we label all methods that accept a block as iterators, we know the story runs deeper than that. With this in mind, we can leverage some basic techniques to utilize any of the approaches shown here, as well as some more advanced tricks. By doing things in a way that is consi...

Rails Modularity for Lazy Bastards 2009-04-16 04:31, written by Gregory Brown When we develop standalone systems or work on libraries and frameworks, modularity seems to come naturally. When something seems to gain a life of its own, we pull it off into its own package or subsystem to...

Practicing Ruby's second volume now freely available 2012-03-26 14:00, written by Gregory Brown Keeping with my promise to release content from my Practicing Ruby journal , I’ve put together a massive link dump of articles from its second volume. Please enjoy them and share them with ...

If you haven’t watched Jim’s talk yet, I’ll remind you to go ahead and do that now. But assuming for some reason you can’t or won’t, you should know that the kinds of complexity that connascence can be used to reason about typically have something to do with coupling. The relationship...

2009-06-27 16:00, written by Gregory Brown As promised, we’re back with more design discussion and hopefully some interesting ideas. Let’s start with a quick recap of what has happened so far. First, Sandi Metz posted on her blog about type specific coupling that a case statement can ...

This is a reasonable question to ask, because this approach is just as straightforward and has similar strengths and weaknesses. If Ruby did not have an open class system, you could argue that it’s less likely that you’d run into side effects with different definitions of SimpleLogger...