Eloquent Ruby

Author: Russ Olsen

Publisher: Addison-Wesley
Pages: 448
ISBN: 978-0321584106
Aimed at: Anyone wanting to be a good programmer
Rating: 5
Pros: A great guide to good style
Cons: Sometimes a bit too enthusiastic
Reviewed by: Mike James

This book will make you a better programmer. Read on to find out how and why.

Author: Russ Olsen
Publisher: Addison-Wesley, 2011

Pages: 448
ISBN: 978-0321584106
Aimed at: Anyone wanting to be a good programmer
Rating: 5
Pros: A great guide to good style
Cons: Sometimes a bit too enthusiastic
Reviewed by: Mike James

 

This is a great book and even if you don't use Ruby it is a book well worth reading. It does major on the way that you should use Ruby and how to write Ruby in a way that is true to the language, but it has so much to say about programming in general that it is worth reading for non-Ruby programmers. It is would also be an eye-opener to compare the way your favourite language stacks up to Ruby as explained in this book.


Banner

 

Chapter 1 starts off the quest to write honest Ruby with "Write Code that Looks Like Ruby". The basic idea is that clarity is all. A program should shout its intent. This chapter takes us through some obvious stuff but it does it in an engaging way that makes the points clearly and persuasively. I didn't agree with all of the points, but then you don't have to. As long as you understand the reasoning and try to make your code clear you can pick your own idioms.

Chapter 2 continues this argument with a look at control structures and a topic that I think is important - use positive logic. As the author points out it is the difference between

"It is not true that Ruby is like Java"

and

"Ruby is different than Java".

There is also the problem of taking the not of an and or an or which is more difficult than you might think as not(A and B) is (not A) or (not B). This problem isn't discussed.

From these very general opening chapters the book moves into increasingly more specific areas of Ruby. Chapter 3 looks at smart collections, Chapter 4 at smart strings, Chapter 5 regular expressions and Chapter 6 deals with the mysterious topic of symbols. Then we move on to more general topics. Chapter 7 titled - Treat everything like an Object - because everything is. Chapter 8 on dynamic typing and chapter 9 on specs and test.

Part II of the book is on larger architectural issues - Classes, Modules and Blocks - but don't let my description put you off. This part of the book explains how to make use of the basic organizational principles for code. Chapter 10 explains what makes a good class. Chapter 11 deals with operators and defining your own. Chapter 12 is on class equality, 13  is on the singleton pattern, 14 on instance variables, 15 on modules as namespaces, 16 on modules as Mixins. Chapter 17 looks at the use of Blocks in iteration, Chapter 18 is a collection of uses for blocks and Chapter 19 is about saving blocks for deferred execution.

Part III is about metaprogramming - something Ruby is very good at. This outlines the usual techniques for modifying and extending the Ruby language - hooks, method_missing, monkey patching, self modifying classes and classes that modify their subclasses.

Part IV is about putting it all together and it majors on creating Domain Specific Languages - again something Ruby is very good at. There are two chapters on DSLs, a chapter on packaging your code as a Gem and a final one on the different Rubys.

This is a really good book and at the end of it you can't help but write better Ruby and probably better whatever other languages you use now or in the future. In this sense it will make you a better programmer.


Banner


Building Touch Interfaces with HTML5

Author: Stephen Woods
Publisher: New Riders
Pages: 256
ISBN: 978-0321887658
Audience: Experienced JavaScript developers
Rating: 2
Reviewer: David Conrad

Building a touch interface in a web app is obviously essential if you hope to complete with native apps on a mobile device so having a whole book dedica [ ... ]



Learning SPARQL

Author: Bob DuCharme
Publisher: O'Reilly
Pages: 386
ISBN: 978-1449371432
Aimed at: developers who want to learn SPARQL
Rating: 4.5
Reviewed by: Kay Ewbank

SPARQL is a technology that’s more important than you may realize, making this book equally important.


More Reviews

Last Updated ( Tuesday, 05 July 2011 )
 
 

   
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.