About This Title

Pages: 194
Published: April 2009
ISBN: 9781934356364
Out of Print

Skill Level Meter

Learn to Program (2nd edition)

by Chris Pine

For this new edition of the best-selling Learn to Program, Chris Pine has taken a good thing and made it even better. First, he used the feedback from hundreds of reader e-mails to update the content and make it even clearer. Second, he updated the examples in the book to use the latest stable version of Ruby, and also to use code that looks more like real-world Ruby code, so that people who have just learned to program will be more familiar with common Ruby techniques.

Not only does the Second Edition now include answers to all of the exercises, it includes them twice. First you’ll find the “how you could do it” answers, using the techniques you’ve learned up to that point in the book. Next you’ll see “how Chris Pine would do it”: answers using more advanced Ruby techniques, to whet your appetite as well as providing sort of a “Rosetta Stone” for more elegant solutions.

This fourth printing of Learn to Program, 2nd edition has been updated for Ruby 2.0.

Printed in full color.

Out of print

Computers are everywhere, on every desk, in your iPod, cell phone, and PDA. To live well in the 21st century, you need to know how to make computers do things. And to really make computers do what you want, you have to learn to program.

Fortunately, that’s easier now than ever before. Chris Pine’s book will teach you how to program. You’ll learn to use your computer better, to get it to do what you want it to do. Starting with small, simple one-line programs to calculate your age in seconds, you’ll see how to advance to fully structured, real programs. You’ll learn the same technology used to drive modern dynamic websites and large, professional applications.

It’s now easier to learn to write your own computer software than it has ever been before. Now everyone can learn to write programs for themselves—-no previous experience is necessary. Chris takes a thorough, but light-hearted approach that teaches you how to program with a minimum of fuss or bother.

What You Need



  • P5.0 2014/07/30
  • P4.0 2013/06/25
  • P3.0 2011/10/14
  • P2.0 2010/05/05

Contents & Extracts

  • Preface to the Second Edition
  • Introduction
  • Getting Started
  • Numbers
  • Letters
  • Variables and Assignment
  • Mixing It Up
  • More About Methods
  • Flow Control
  • Arrays and Iterators
  • Writing Your Own Methods
  • There’s Nothing New to Learn in Chapter 10
  • Reading and Writing, Saving and Loading, Yin and…Something Else
  • New Classes of Objects
  • Creating New Classes, Changing Existing Ones
  • Blocks and Procs
  • Beyond This Fine Book
  • Possible Solutions


Chris Pine first discovered the programming language Ruby in early 2001 and immediately began using it to build tools for his day job: programming computer games. After hours, he volunteered with gifted children teaching them advanced mathematics. With Ruby, he began to teach his students programming as well. Once he saw how easily his students learned advanced programming concepts in this environment, he decided to expand his teaching materials into a book.

Chris enjoys board games and juggling, and lives with his darling wife and two darling children in darling Oslo, Norway. He is very happy.

Out of print

Related Titles:

Skill Level Meter

About This Title

Pages: 194
Published: April 2009
ISBN: 9781934356364
Edition: 2
Out of Print