Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a "Code Complete" book for Ruby?

I began reading the book "Code Complete" 2nd edition, but stopped reading when I noticed most of the solutions were easily solvable in Ruby with Ruby idioms. Is there a similar book for Ruby?

Here's the version that I started reading:

http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670

like image 636
btelles Avatar asked Nov 09 '09 00:11

btelles


2 Answers

Pick that book back up and start where you left off. As someone who read the first edition and these days writes Ruby for a living, I can confidently say that the lessons of Code Complete are universal. The wisdom in that book about good code construction - quality naming, decoupling, how to structure a function, etc. - will stand any programmer in good stead. I still refer to my dog-eared first edition regularly.

As far as books on practices which pertain more specifically to Ruby: first, every programmer should have a copy of "The Ruby Way, 2nd Edition", by Hal Fulton, on his or her desk. Second, while I haven't read it yet, I have heard good things about "Ruby Best Practices".

like image 140
Avdi Avatar answered Nov 16 '22 06:11

Avdi


For such an old programming language (well, maybe not "Lisp" old, but Ruby is older than Java, after all) and a community that fanatic about code quality, style and beauty, the Ruby book market is surprisingly light on "higher level" books.

There are several reasons for this: a lot of Rubyists are already seasoned Smalltalk or Lisp programmers when they pick up Ruby, so they don't need those books. And Ruby and Smalltalk are similar enough that you can just read a Smalltalk book instead. (For example, you can pretty much read Stéphane Ducasse's list of free Smalltalk books from top to bottom.) The same goes for Perl.

Until very recently, the best higher level Ruby book was basically Smalltalk Best Practice Patterns by Kent Beck. (There is a newer version of this book, called Implementation Patterns which uses Java instead of Smalltalk. However, since Kent's Java style is very Smalltalk-ish, it is essentially SBPP, 2nd Ed.) However, since then, several higher level books have been released or are in the works:

  • Design Patterns in Ruby by Russ Olsen,
  • Ruby Best Practices by Gregory T. Brown,
  • Refactoring: Ruby Edition by Jay Fields, Shane Harvie, Martin Fowler and Kent Beck (a re-interpretation of Fowler's book in Ruby) and
  • Rein Henrichs is (or at least was, as of last year) working on Ruby Best Practice Patterns.
like image 25
Jörg W Mittag Avatar answered Nov 16 '22 06:11

Jörg W Mittag