Feeds

The Ruby Way

For advanced Ruby programmers

Boost IT visibility and business value

Book review It is, perhaps, inevitable that the first code you write in a new programming looks suspiciously like code from the language you already know. I can remember my own first Java applications looking suspiciously procedural and C-like. In making those first moves into object orientation, it takes a while before it all makes sense. Even when picking up a new object oriented language things don’t fall into place at once – Python code that looks like weirdly indented Java isn’t so far fetched. Writing code that is idiomatic and fully captures the abstractions and features of a language is a skill that takes time to develop.

The Ruby Way, by Hal Fulton, aims to help the developer who has already picked up on the basics of the language to go that extra step and write code the, er, Ruby way. Designed from scratch as a second book, the first edition was in fact the second ever book on Ruby published in English. The first was the so-called Pickaxe book, ‘Programming Ruby: The Pragmatic Programmers' Guide’ by Dave Thomas and Andy Hunt. That remains the best place to start with Ruby, this tome assumes that the reader has already mastered the basics, though the opening chapter provides a quick review to refresh your memory.

As with any modern programming language, Ruby proficiency depends not just on knowing syntax and structure but to a great extent on understanding and utilising the packages and libraries that come with the package. To this end, a good deal of the book explores the core libraries for string handling, regular expressions, numerical calculations, I/O and so on. Each topic is structured into sets of discrete tasks: how to work out the day of the week, how to create and initialise an array, how to cache with memoisation and so on. This provides the reader with useful snippets of code, and often illustrates that there are multiple ways of achieving the same end. As a way of introducing the reader to idiomatic Ruby code, it’s pretty effective.

In addition to the core libraries, the book also includes coverage of broader topics, such as user interfaces (with coverage of a number of graphical toolkits, including Ruby/Tk, Ruby/GTK2, FXRuby, QtRuby and more), testing and debugging, packaging and distribution and so on. It’s worth noting that the chapter on web applications does not stick just to Ruby On Rails (which has been a key driver in the explosion of interest in the language), but includes coverage of CGI, Nitro and other frameworks and tools.

If there’s a complaint, it’s that the writing lacks the kind of passion that excites the reader to fire up and editor and start hacking code. The tone is cool, level-headed and just a bit on the dry side.

As an insight into the breadth of libraries, tools and frameworks, the book works very well. It’s a good resource for those looking for useful code snippets and also for those looking for an idea of how Ruby developers craft code. For existing Ruby developers the book provides some useful coverage of a wide range of areas, and it would serve the reader well as a source book of ideas or fast introductions to new areas. For the absolute beginner this isn’t a good place to start, take a look at a book written explicitly as an introductory text and come back to this when you want to go further.

The Ruby Way

Verdict: Verdict: A good way into the core packages, tools and frameworks that make up Ruby for those who’ve already learned the basic structure and syntax of the language.

Author: Hal Fulton

Publisher: Addison Wesley

ISBN: 0672328844

Media: Book

List Price: £28.99

Current Reg price: £19.42 inc. VAT (discount 33%)

Buy this book at Register Books at Reg Developer's special discounted price (subject to change)!

The Essential Guide to IT Transformation

More from The Register

next story
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
Leaked Windows Phone 8.1 Update specs tease details of Nokia's next mobes
New screen sizes, dual SIMs, voice over LTE, and more
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.