Learn to Program 2nd edition

Reviewed by

 This book is about learning to program using Ruby; Pragmatic Bookshelf is an active publisher of texts on Ruby and Rails and has recently released a second edition of Learn to Program.

Ruby is a modern scripting language that is gaining wide acceptance for web development, but has a much wider application. Ruby is less complex than most other languages, and therefore easier to learn; however, that is not to suggest it is a toy language. Learn to Program is aimed at those who want to teach themselves how to program, even though they may aspire to languages with more extensive sets of elements, such as Java and C. Once the novice programmer has mastered the basic operations of Ruby it should not be difficult to graduate to other languages.

Learn to Program, now in its second edition, fills the need for a text that teaches the first steps in both concepts and programming basics. It is a great confidence builder, and practical. The author writes from experience and clearly understands the 'brick wall' that novices encounter when first attempting to write a program.

The book begins with obtaining Ruby and installing it on Linux as well as Windows and Mac operating systems. The information is not confined to terse 1, 2, 3, … steps, but instructs the reader fully for each operating system, even down to the directories that should be used. Linux users should check for the presence of Ruby (type “which ruby” at the command line); if it is not already installed go to <http://ruby-lang.org>.

Having followed the instructions Ruby should be ready to run. The book proceeds to elementary programming, beginning with numbers: how to enter numbers, the difference between integers and floating point numbers, and simple arithmetic operations. The next chapter deals with entering letters or text, numerals as text, and the problems posed by some characters.

Readers are then introduced to variables and assignments, methods, flow control, arrays and iterators, writing your own methods, class objects, and other mysterious programming terms. The author carefully explains the terminology as it occurs and shows by example how those things are applied. Most chapters have a A Few Things to Try section that poses hands-on problems; unlike the first edition this (second) edition provides answers—and in some instances more than one solution is offered to illustrate different approaches.

The style is relaxed, but doesn't patronise the reader; chapters are have been kept short and free of long-winded explanations. Extensive use is made of example code, which is effective and encourages readers to engage in hands-on practice.

Apart from being an excellent Ruby primer the book is a well crafted introduction to programming at large.

: Learn to Program 2nd edition
Published by , 0 pp., RRP


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <img> <li> <ol> <u> <ul> <pre> <br> <blockquote> <hr> <code><sup><sup><p><em><strong> <h2> <cite> <code> <tt> <h1><table><tr><th><td>
  • Lines and paragraphs break automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.