Feeds

The Ruby Way

For advanced Ruby programmers

New hybrid storage solutions

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)!

Security for virtualized datacentres

More from The Register

next story
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
Greater dev access to iOS 8 will put us AT RISK from HACKERS
Knocking holes in Apple's walled garden could backfire, says securo-chap
NHS grows a NoSQL backbone and rips out its Oracle Spine
Open source? In the government? Ha ha! What, wait ...?
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
Top 5 reasons to deploy VMware with Tegile
Data demand and the rise of virtualization is challenging IT teams to deliver storage performance, scalability and capacity that can keep up, while maximizing efficiency.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.