JonHoyle.com Mirror of MacCompanion
http://www.maccompanion.com/archives/march2006/Books/LearntoProgram.htm

 

Newsworthy Events



Learn to Program

reviewed by Jonathan Hoyle

Author: Chris Pine

Pragmatic Programmers, LLC
P.O. Box 293325
Lewisville, TX 75029-3325
1-800-699-PROG (800-699-7764)

Book Site: https://www.sitepoint.com/premium/books/no-nonsense-xml-web-development-with-php

Released: January 16, 2006

Pages:175

$420 USD, $28 CND, £ 9  GBP,  €18 EU

ISBN: 0976694042

Audience: Beginning programmers.

Strengths: Excellent programming introduction.

Weakness: No screenshots, just textual examples.


The Pragmatic Programmer series of books has made a quite name for itself over the past few years with some of the best reference books available for experienced developers.  Released just this year, the series introduces Learn to Program, a book targeting the beginner market, and I expect this title to do extremely well.  Learn to Program teaches the beginner all of the important concepts starting out and brings him along to some advanced concepts in short order.

Using Ruby as the programming language with which to teach beginners, may appear unusual, but is actually an ideal choice.  10 or more years ago, one would have expected this same book to be written using Basic or Pascal.  However, Basic is no longer as "basic" as it used to be, and there are no viable Pascal compilers any longer.  Nor are either of those good transitional languages, as their syntaxes are very different from modern languages. Some might wonder why not use C or C++, but each of these languages still requires a great deal more memory management than modern "garbage collected" languages do.  Ruby, on the other hand, is relatively new and modern, with a syntax very similar to PHP and Perl.  Ruby is an excellent "gateway language" to Java or C# and allows for easy development of Web applications as well.  Best of all, Ruby comes free with Mac OS X!

Aside from being a beginner's tutorial, Learn to Program is a prequel to Programming Ruby, the authoritative language reference.  Both books are part of the The Facets of Ruby Series by the Pragmatic Bookshelf.  This reviewer knew next to nothing about Ruby prior to reading this book, but after having done so, I have now become so interested in it that I look forward to the next book in the series.  However, the programming principles that this book teaches apply to any programming language and are not specific to Ruby.

The introductory chapter s a good motivation for learning to program.  Chapter 1's Getting Started covers installation issues of the Ruby environment for Windows, Linux and Mac OS X.  For many books, the Mac section is a forgotten one, completely unrelated to the rest of the book.  Not so in this book, as author Chris Pine notes in the Macintosh Getting Started section:

If you're using OS X, you're in luck!  You can use the best (in my opinion) text editor, Ruby is already installed for you in OS X 10.2 (Jaguar) and up, and you get to use a real command line (not that silly wanna-be command line we have to use on Windows)!

Numbers and strings are covered in Chapters 2 and 3 and that is used for the discussion on variables in Chapter 4.  The real work picks up with Chapters 5 and 6 with keyboard I/O, string manipulation, mathematics and random number generation.  Looping and branching are covered in Chapter 7's Flow Control, followed by an introduction to arrays and iterators in Chapter 8.  All of this is in way of preparation for the second half of the book, which takes the reader from neophyte to true programmer.

Chapter 9's Writing Your Own Methods is the watershed chapter that takes the beginner to create his very first self-made methods.  The pace continues unabated with more advanced concepts such as recursion and sorting in Chapter 10, and then accessing files in Chapter 11.  More heady object oriented topics come next with custom classes in Chapters 12 and 13, and function pointers (called Procs in Ruby) in Chapter 14.  Finally, Chapter 15 gives direction from where to go next.

That all of this information is presented in such a compact volum is an amazing achievement.  Much of its success is due to the choice of Ruby as the programming language, as it allows the author to spend most of his time teaching programming concepts, and less time worrying about obscure language idiosyncrasies. For anyone interested in learning how to program, whether it be with Ruby or any other modern programming language, Learn to Program is hard to beat.

About Us | Site Map | Privacy Policy | Contact Us | ©2006 MPN LLC.

http://www.maccompanion.com/archives/march2006/Books/LearntoProgram.htm
http://www.maccompanion.com/macc/archives/march2006/Books/LearntoProgram.htm