Feeds

The Ruby Way

For advanced Ruby programmers

Internet Security Threat Report 2014

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

Top 5 reasons to deploy VMware with Tegile

More from The Register

next story
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
You stupid BRICK! PCs running Avast AV can't handle Windows fixes
Fix issued, fingers pointed, forums in flames
NSA SOURCE CODE LEAK: Information slurp tools to appear online
Now you can run your own intelligence agency
Microsoft: Your Linux Docker containers are now OURS to command
New tool lets admins wrangle Linux apps from Windows
Facebook, working on Facebook at Work, works on Facebook. At Work
You don't want your cat or drunk pics at the office
Soz, web devs: Google snatches its Wallet off the table
Killing off web service in 3 months... but app-happy bonkers are fine
prev story

Whitepapers

Choosing cloud Backup services
Demystify how you can address your data protection needs in your small- to medium-sized business and select the best online backup service to meet your needs.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Driving business with continuous operational intelligence
Introducing an innovative approach offered by ExtraHop for producing continuous operational intelligence.
10 threats to successful enterprise endpoint backup
10 threats to a successful backup including issues with BYOD, slow backups and ineffective security.
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?