R
Ruby Best Practices
blog.rubybestpractices.com · Company blog · on HN since 2009
Gregory Brown and collaborators write about Ruby techniques, design principles, and the book Ruby Best Practices.
What HN saysHN links it for the free online book, which commenters note covers the old Ruby 1.8.6 edition, plus posts on tap and decorators.
21HN people shared it
7linked it in comments
32stories submitted
546story points
13 years agolast shared
2009people per year2026
Most-shared posts
- 1Ruby Best Practices (full book available for download)4 people · 230 points · first shared 2010 · 55 comments on HN
- 2Should I Tap that Hash? (Ruby 1.9 Style)2 people · 19 points · first shared 2009 · 11 comments on HN
- 3"Ruby Best Practices" Collaborative Blog2 people · 16 points · first shared 2009 · 8 comments on HN
- 4An alternative to monkeypatching in Ruby2 people · 12 points · first shared 2009 · 2 comments on HN
- 5SOLID Design Principles (in Ruby)2 people · 5 points · first shared 2011 · discussion on HN
- 6Reading Ruby's Standard Library for Fun and Profit2 people · 3 points · first shared 2009 · discussion on HN
- 7Practicing Ruby, The Newsletter1 people · 46 points · first shared 2010 · 3 comments on HN
- 8Supporting the Ruby Mendicant experiment1 people · 36 points · first shared 2011 · 4 comments on HN
- 9How Mendicant University Works1 people · 35 points · first shared 2011 · 14 comments on HN
- 10Ruby Best Practices book starting its open source release early.1 people · 34 points · first shared 2010 · 5 comments on HN
- 11Kicking ass together: How to improve coding skills as a group1 people · 19 points · first shared 2012 · 3 comments on HN
- 12Rails Modularity for Lazy Bastards1 people · 18 points · first shared 2009 · discussion on HN
- 13Techniques for Duck Typing Ruby's Core Objects1 people · 12 points · first shared 2009 · 4 comments on HN
- 14Fun with Class.new1 people · 9 points · first shared 2009 · discussion on HN
- 15Dirty Little Secrets about Testing1 people · 8 points · first shared 2011 · discussion on HN
What HN people wrote when they linked it
jamesbritt · 2011-11-01
BTW, that online copy is the 1st edition of the book, for ruby 1.8.6 (or maybe even earlier).
The language is now at 1.9.3, and while things are fundamentally the same there are assorted little differences.
Still, as a free intro to the language it's not bad.
If you want to buy a book I'd suggest The Ruby Programming Language, as well as anything by Gregory Brown or David A. Black.
Greg also produces the Practicing Ruby newsletter which I cannot recommend highly enough.
http://practicingruby.com/
Greg does amazing stuff.
See also http://university.rubymendicant.com and http://blog.rubybestpractices.com
raganwald · 2009-08-30
More discussion about this idiom, this time discussing Ruby 1.9's #tap method:
http://blog.rubybestpractices.com/posts/gregory/011-tap-that-hash.html
laktek · 2009-07-12
Gregory Brown recently posted a different take on Decorators using Ruby's delegate standard library.
Worth a look : http://blog.rubybestpractices.com/posts/gregory/008-decorator-delegato…
sandal · 2009-04-14
That already exists, and maybe I should have linked it instead, you're right. But I imagine one post is enough for today :)
Here it is for those interested, though:
http://blog.rubybestpractices.com/posts/gregory/welcome.html
danso · 2013-11-10
If the publisher is cool with this (obviously, the authors are), I hope more publishers continue to see this not as a zero-sum game. I guess I can count myself as part of the lucky privileged class that will buy a book if I like it, whether it's free or not, just to pay my respect to the author...and to have a reliable copy of it (downloading a PDF from a url of store.free-college.org/noleech1.php gives me the slight heebie-jeebies...what can I say, I'm old!)
Recently I purchased a Kindle version of Gregory Brown's "Ruby Best Practices"...even though I'm sure I bought it from Oreilly when it was released in 2009 and even as Brown has been offering the book for free on his own site since 2010 (http://blog.rubybestpractices.com/posts/gregory/022-rbp-now-open.html)
I bought it again because as I've recently been googling for Ruby-specific application methods, I constantly land on the text scraped from the free book...that's worth giving up a few more bucks to the author. Brown also started a paid newsletter for indepth Ruby discussion (practicingruby.com)...it's the first paid newsletter I've ever, well, paid for, and I'm happy to patronize the author. So, at least from people like me, generous authors can always get a few bucks.
memracom · 2013-10-10
Read this https://code.google.com/p/tokland/wiki/RubyFunctionalProgramming and master it by refactoring some of the source code that you work on. Also follow up the references to work by Joe Armstrong and Rich Hickey. If there is anything there that is unclear, then google for pages that explain it in a non-Ruby context.
And read everything written by Uncle Bob starting with his books "Clean Code and "Clean Coder". He has a lot of blog articles out there as well as various conference videos. And he is also a Ruby developer in addition to C++ and Java.
Learn and apply the SOLID principles http://blog.rubybestpractices.com/posts/gregory/055-issue-23-solid-des… and maybe read some more of those Ruby Best Practices articles.
Don't let the speed freaks drive you. Many of them are writing bad code fast. It is better to write clean maintainable code at a slower rate than it is to rush into things and create a complex unmaintainable mess. It is possible that some of the complex code that you have difficulty with is actually bad code and not something to emulate in your practice.
P.S. focus on learning Ruby not on Rails. Ruby is the basis for Rails but Rails is not the only Ruby game in town. Someday Rails will fade away but Ruby will still be going strong with new frameworks like Sinatra or Celluloid or Cramp.
gtani · 2010-07-04
http://tech.puredanger.com/2007/09/18/spelunking/
http://debasishg.blogspot.com/2009/06/code-reading-for-fun-and-profit.…
http://www.oreillynet.com/ruby/blog/2006/05/post.html
(section about "making Mongrels stable and secure"
http://news.ycombinator.com/item?id=483824
http://blog.rubybestpractices.com/posts/gregory/005-code-reading-stdli…