Exploring Everyday Things with R and Ruby – An entertaining & challenging guide to learning 2 languages – #programming #bookreview

Exploring Everyday Things with R and Ruby
Sau Sheong Chang
(O’Reilly, paperbackKindle)

Sau Sheong Chang has embarked joyfully on Mission Next-to-Impossible. With his new book, he wants to inspire everyone to recapture at least some of their childhood passion for exploring and discovering.

“For many professional programmers,” he writes, “coding is a job. It’s drudgery, low-level work that brings food to the table. We have forgotten the promise of computers and the power of programming for discovery. This book is an attempt to bring back that wonder and sense of discovery.”

His new book is indeed full of opportunities for exploration and discovery. If you have a basic understanding of computer programming, a playful curiosity, and a willingness to learn new things, you can have some real fun with this entertaining, well-written how-to guide.

Exploring Everyday Things with R and Ruby provides a basic introduction to both programming languages and shows how to use them in simulations that can create solutions to several practical problems.

A few examples:

  • You must set up a new office with 70 employees. How can you accurately determine the number of restroom stalls that will be needed?
  • How can you do data mining and pattern analysis within your own email, accumulated over years? (Caution: You may discover things about yourself that you haven’t yet realized.)
  • What is the process for building a homemade stethoscope and extracting useful data from a WAV file of your heartbeat?

Author of two previous books on Ruby, Sau Sheong Chang is director of applied research for HP Labs in Singapore. In this new work, he shows how to use “simulations to create experiments, isolate factors, and propose hypotheses to explain the results of the experiments.” And you learn how to work with both Ruby and R in the exercises.

In his view, “…Ruby is a programming language for human beings. Yukihiro “Matz” Matsumoto, the creator of Ruby, often said that he tried to make Ruby natural, not simple, in a way that mirrors life. Ruby programming is a lot like talking to your good friend, the computer. Ruby was designed to make programming fun and to put the human back into the equation for programming.”

Meanwhile, “R offers a powerful and appealing interactive environment for exploring data, and using that interactive environment is part of its appeal. The other reason why R is getting increasingly popular is that it is free [like Ruby]. The existing batch of tools for data analysis—S, MATLAB, SPSS, and SAS—can be quite expensive, and R is a cost-effective way to achieve the same goals. Also, R has a very vibrant and active community of domain experts and developers, including statisticians and data scientists who contribute many very useful packages that enhance its overall capabilities.”

The 233-page book is nicely organized and adequately illustrated. There are, however, two minor dings that may briefly irritate some beginners.

First, in his introduction to R, Sau Sheong Chang describes the virtues of using a graphics package known as ggplot2 and states that it will be used extensively in the book’s exercises. But he doesn’t, at that point, specifically instruct readers how to get it—install.packages(‘ggplot2’)—and verify that it has been downloaded and installed—installed.packages(). So a teaching moment is missed. Instead, you have to remember to turn back about 20 pages to the “Installing Packages” discussion and figure out that you now need to download ggplot2. (But that’s just part of “discovery,” it could be argued.)

Second, a few of the code examples in Chapter 2 require tedious amounts of command-line typing. You don’t get code you can download from the author’s site until Chapter 3—just a nitpick.

You won’t become an R or Ruby expert by reading Exploring Everyday Things with R and Ruby. But this excellent book can show you how to install the software, learn the basics of using it, and actually put it to work in some practical ways.

From there, you can launch your own journeys of exploration and discovery—and use R and Ruby as you go.

Si Dunn

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s