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


Programming with Rust

Author:  Donis Marshall
Publisher: Addison-Wesley
Pages: 400
ISBN: 978-0137889655
Print: 0137889658
Kindle: B0CLL1TGVT
Audience: Programmers wanting to learn Rust
Rating: 3
Reviewer: Mike James
Rust is the language we all want to learn at the moment so this is just in time.



Data Structures & Algorithms in Python

Author: Dr. John Canning, Alan Broder and Robert Lafore
Publisher: Addison-Wesley
Date: October 2022
Pages: 928
ISBN:978-0134855684
Print: 013485568X
Kindle: B0B1WJF1K9
Audience: Python developers
Rating: 4
Reviewer: Mike James
Data structures in Python - a good idea!


More Reviews

 

Last Updated ( Saturday, 10 April 2010 )