Jump to ratings and reviews
Rate this book

Exploring Everyday Things with R and Ruby

Rate this book
If you’re curious about how things work, this fun and intriguing guide will help you find real answers to everyday problems. By using fundamental math and doing simple programming with the Ruby and R languages, you’ll learn how to model a problem and work toward a solution.

All you need is a basic understanding of programming. After a quick introduction to Ruby and R, you’ll explore a wide range of questions by learning how to assemble, process, simulate, and analyze the available data. You’ll learn to see everyday things in a different perspective through simple programs and common sense logic. Once you finish this book, you can begin your own journey of exploration and discovery.

Here are some of the questions you’ll explore:

Determine how many restroom stalls can accommodate an office with 70 employees
Mine your email to understand your particular emailing habits
Use simple audio and video recording devices to calculate your heart rate
Create an artificial society—and analyze its behavioral patterns to learn how specific factors affect our real society

252 pages, ebook

First published January 1, 2012

19 people are currently reading
99 people want to read

About the author

Sau Sheong Chang

7 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
6 (12%)
4 stars
22 (44%)
3 stars
17 (34%)
2 stars
5 (10%)
1 star
0 (0%)
Displaying 1 - 8 of 8 reviews
Profile Image for Ben.
43 reviews11 followers
July 12, 2012
Sau Sheong Chang is the Director of Applied Research in the HP Labs, Singapore, and Exploring Everyday Things with R and Ruby is all about applying research in a computational setting. The book opens with a very brief introduction to Ruby, followed by a chapter on R, the open source statistics package. These two tools are used to perform the investigations Chang presents in the remainder of the book.

Each of the investigations presented are self contained, using different approaches to investigate queueing for restrooms, market economy, email data mining, audio and image analysis of heartbeats, simulations of schooling, and artificial life. Chang begins each chapter with a light hearted question, then proceeds to answer the question by applying a computer model using Ruby, followed by analysis using R. Sometimes, as in the email data mining chapter, he simply notes unusual points without further research, but in most of the experiments, he demonstrates that current theories (e.g. the invisible hand in a market economy) can be shown to apply to the simple models he builds.

The book sparked plenty of ideas as I was reading it, even though many of the Chang's experiments (simulation of flocking, artificial life) have been well covered in other books. Each approach is well explained, and should be easy to follow along, although I don't think this is a suitable book for a beginning programmer. It is also not a good introduction to either Ruby or R. But the real purpose of the book is not to teach programming or statistics, but to show how to use computing and curiosity to answer questions about the world around us, and to explore the extraordinary depth of everyday things.
Profile Image for Steef Jacobson.
38 reviews16 followers
August 6, 2012
easy to grasp Ruby & R intros were really nice, especially since I'm a ruby nube it gets you right into the rest of the book. The chapter were fun to get into and it even made my kids interested in the book.
388 reviews4 followers
February 23, 2025
The book tries to entice people into trying R and Ruby by showing how easy it is to run some simulations and data extractions with few lines of code. Somewhat convincing if you've had some exposure to R or Ruby before, I don't know otherwise. I can't tell whether the "How to be an armchair economist" chapter was satirical (the underlying rational market hypothesis is evidently not mentioned). Saved by the witty writing.
Profile Image for Dgg32.
146 reviews6 followers
July 29, 2012
I want to read a book about simulation for a long time. But my previous encounters are either too serious or too light. This book is the one that I find both fun and scientifically serious. Plus R is my assess, but Ruby is new, so I learn some Ruby on the way. More important, I have the first taste how simulation looks like.

Some errors in the code section, but the source code in github is corrected. Also some minor misplacement. Nevertheless, great book!!
Profile Image for Aaron Schumacher.
203 reviews11 followers
February 1, 2022
This book came out recently. Somebody had suggested it might be fun, so I read it. Sure enough, it is fun. It introduces a lot of really good stuff, perhaps briefly and imperfectly (and you will read "lot" instead of "plot" in at least one place) but it conveys a sense of wonder and possibility. It reminded me of the books of science experiments that I grew up with. This book is structured a bit like they were, with about eight investigations into various things. It guides you through building a digital stethoscope and processing the data it produces - and then it does the same for using a digital camera to take your pulse by reading differences in red intensity as a result of varying oxygen concentrations in your blood. It's really quite neat.

The focus is not really on building physical objects though - it's on the computer side, for simulation and analysis. The techniques weren't really new to me - and in fact in one place the author spends nearly a full page explaining the Pythagorean Theorem - but the spirit of boldly applying techniques to interesting problems is a good one. I would feel pretty good about recommending this book to a middle or high school student with an interest in technology, and any others with curiosity. To be fair, there were good pointers to things I wasn't intimately familiar with, like the Shapiro-Wilk normality test, and while not novel or very deep, the introduction to and work with ggplot2 in R is definitely widely applicable. I'm still not sure I like Ruby more than Python, but you can quickly get a feel for doing things in Ruby as well. It's a fun little book for getting you thinking, and then hopefully looking for more information and working on your own experiments.
48 reviews2 followers
March 6, 2013
Inspiring book about making simulations with Ruby and visualizing the results in R. It might be also useful for learners of ruby and R, although on the ruby codes I considered some of the practices dangerous to use in productions systems, but it small simulations the example codes were fine.

It was a good inspiration and reading this book moved me back to my primary and secondary school where I used to make simulations and visualisations just for fun. This book gave me the motivation to do such games again.
Profile Image for Matthew Campbell.
13 reviews1 follower
November 23, 2012
I've been interested in reading more about simulating systems to experiment with emergent behavior, but this book isn't really it. I think it's probably a good intro to the basics of simulation in general, but there wasn't as much talk about why he changed his models when he did, and I'd already seen most of what was on offer here in other places. Not a bad book, but not what I was looking for. The parts on analyzing the results with R was nice, but also never went really deep.
57 reviews11 followers
August 22, 2012
A guide to doing interesting data analysis with Ruby and R. A bit heavy on simulations versus modeling data.
Displaying 1 - 8 of 8 reviews

Can't find what you're looking for?

Get help and learn more about the design.