Learn to Program: Using Ruby 2nd edition

Author: Chris Pine
Publisher: Pragmatic Bookshelf, 2009
Pages: 200
ISBN: 978-1934356364
Aimed at: Absolute beginners in programming
Rating: 4
Pros: Written in a lively and motivating style
Cons: Choice of topics and their order of appearance
Reviewed by: Mike James

This is an interesting book and a possible answer to the question of what language should be used to introduce a complete beginner to programming.

Obviously an interpreted language is a big advantage in teaching because of the immediacy of cause and effect, i.e. what you type and what happens. In this case the author has decided to use Ruby as a first language and this is not without some problems.

Ruby, despite its popularity isn't as in as widespread use as say Java or any of what you might call the "traditional" languages. It also has an arguably "different" approach to many standard things such as objects, functional programming and control structures. Indeed it is the "difference" that makes Ruby such an attractive language. However this could be a real problem for a beginner who learns to program and ends up thinking that the entire programming world is like Ruby. The poor fool will soon be woken up to the realities of strong typing and early binding!

In this case the author does a good job of steering clear of Ruby's "eccentricities" while explaining the basics - what a variable is, the flow of control, loops and conditionals and so on - in a calm and clear style.

However, things start to get a little more idiosyncratic as the book progress. After loops and conditionals we have array objects and iterators. Iterators form a completely different way of writing enumerations and perhaps they are not the best thing to introduce to a beginner straight after loops. Then we hit Chapter 10 and for some reason the author seems to think that the next most important thing for a beginner to understand is recursion. There are lots of very experienced programmers who will admit that they are still (quite reasonably) unhappy about recursion and view it as a technique to be used occasionally and with caution. Why burden a complete beginner with something so sophisticated difficult and dangerous?

The final part of the book returns to how Ruby implements objects and how to create your own and finishes with lots of listings showing how to complete the exercises. Each solution is presented twice - how you would do it and how the author would do it - why? The author's solutions are just more advanced and without explanation they simply intimidate or serve to demonstrate how clever the author is.

It is important to realise that this book is aimed at the complete beginner - someone who has no idea how to even write a "Hello World" type program. As such it succeeds in "jollying" the reader along with bright and lively discussion and there are a lot of good analogies used, but it could do a lot better with its choice of topics and their order of presentation. It has succeeded with "how to tell it" but fails on "what to tell".

<ASIN:1598635182>

<ASIN:1438233434>

Banner


Bare Metal C

Author: Steve Oualline
Publisher: No Starch Press
Date: August 2022
Pages: 304
ISBN: 978-1718501621
Print: 1718501625
Kindle: B08YJB9BCF
Audience: C programmers
Rating: 3
Reviewer: Harry Fairhead
Bare metal C sounds exciting and very basic. Time to find out how the machine really works.



Principled Programming

Author: Tim Teitelbaum
Publisher: DateTree Press
Date: March 2023
Pages: 429
ISBN: 978-8987744109
Print: B0BZF8R467
Audience: General
Rating: 5
Reviewer: Mike James
Principled Programming - what else would you want to do?


More Reviews

 

Last Updated ( Saturday, 10 April 2010 )