gypsydave5

The blog of David Wickes, software developer

Book Review: Computer Science Programming Basics in Ruby

I recently finished reading Computer Science Programming Basics in Ruby by Ophir Frieder, Gideon Frieder and David Grossman. I was looking for something that would extend my knowledge of computer science fundamentals - the title appealed as I’ve done the majority of my coding up to this point in Ruby, so I was hoping the familiar language would allow me to concentrate more on the computer science theory.

I was ultimately disappointed - the book isn’t so much a computer science primer as a programming primer. The concepts being taught in this book tend to be basic ones - control flow, simple data structures, how a computer works. It’s pitched at an entry level, and for that I’m sure it’s ideal, but it’s not quite what I was after.

Idiomatic Ruby is avoided in the book in favour of using patterns that are more generic to all programming languages. This is a good idea as it introduces core programming concepts in a non language specific way, but the lack of common Ruby methods like each might be concerning to some. The book teaches programming basics in Ruby, but I don’t think it teaches a great deal of Ruby while doing so.

That said I learned a great deal in Chapter 7, Sorting and Searching. The comparison of different search and sort algorithms make a good introduction to algorithms in general and made me think a bit harder about the magic that goes on under the hood of Ruby methods and operators that I take for granted. I’m going to try and learn more about algorithms in the next few weeks (see my last post for the rest of my hit list).

Maybe borrow this book from the library and give it a skim read if you’re already familiar with Ruby, because I’m sure you’ll find some useful stuff there. If you’re interested in learning Ruby from the ground up you should probably pair this book with something like The Well Grounded Rubyist in order to see why Ruby’s so precious and shiny. Otherwise it’s a well structured, detailed and approachable introductory text, if maybe a touch academic. Just not for me right now.