Feeds

The Ruby Way

For advanced Ruby programmers

Secure remote control for conventional and virtual desktops

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
Microsoft boots 1,500 dodgy apps from the Windows Store
DEVELOPERS! DEVELOPERS! DEVELOPERS! Naughty, misleading developers!
'Stop dissing Google or quit': OK, I quit, says Code Club co-founder
And now a message from our sponsors: 'STFU or else'
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Uber, Lyft and cutting corners: The true face of the Sharing Economy
Casual labour and tired ideas = not really web-tastic
Mozilla's 'Tiles' ads debut in new Firefox nightlies
You can try turning them off and on again
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
prev story

Whitepapers

5 things you didn’t know about cloud backup
IT departments are embracing cloud backup, but there’s a lot you need to know before choosing a service provider. Learn all the critical things you need to know.
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.
Backing up Big Data
Solving backup challenges and “protect everything from everywhere,” as we move into the era of big data management and the adoption of BYOD.
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.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?