NOTE:This blog had a good run, but is now in retirement.
If you enjoy the content here, please support Gregory's ongoing work on the Practicing Ruby journal.

Ruby Tuesdays: RBP Chapter 4

2010-02-16 15:00, written by Gregory Brown

If you’re reading this blog, you probably know that the Ruby Best Practices book exists. Even if you haven’t read it, you might have a sense for the sort of topics we cover based on the content you’ve seen on this blog. But now, everyone is going to get a chance to read RBP the way its meant to be read: as a conversation.

Progress To Date

We’ve already released the first three chapters, and discussion has been great. If you haven’t seen them already, check out the first week’s discussion on testing, and then head over and look at the double header on API design and metaprogramming. These discussions should give you a sense of the wide range of ideas our readers have been sharing as a result of this book study.

How To Read RBP

Readers are encouraged to fight RBP as they read it, rather than just soaking up the information. Although I claim this book is about “Best Practices”, the only reason that is true is that it’s a result of countless conversations with folks who are deep in the Ruby trenches getting stuff done. The only way for RBP to remain current and relevant is to continue these discussions, using its content as a jumping off point for fresh ideas.

Today’s Topic

If you’re willing to participate in the discussion afterwards, go ahead and download Chapter 4 now. Don’t worry if it takes you more than a few days finish reading it, you can come back and comment any time.

While chapters 2 and 3 were about somewhat subtle features, this chapter is as concrete as they come. Those with some Perl blood in them should find it familiar, as it’s all about how to munge text and move stuff around on your filesystem. But those who struggle with the scripting side of Ruby should find a number of techniques that will make their job easier.

Enjoy, and come back next Tuesday (2010.02.23) for Chapter 5, “Functional Programming Techniques”.

For Your Consideration

O’Reilly is being really nice to me by letting me give away my book, especially considering that I haven’t quite cleared my advance yet. So if you like what you see, and want to be able to read it all now instead of waiting several more weeks for it, please consider buying the book. You can get it directly from the publisher or via amazon. While I do make a little more money when you buy from O’Reilly, I wasn’t expecting to get rich off of RBP, so don’t feel bad buying the discounted copies from Amazon. But I’m pretty sure that seeing a spike in sales would encourage them to do more open source books, so… keep that in mind.

For those wishing to do interesting things with this material, note that it is released under the Creative Commons NC-SA license. This will become immensely more useful once the source documents are posted in late March, but if you’ve got any questions at all about this, you can ask me, and I’ll ask my publisher, and we’ll get back to you.

blog comments powered by Disqus