small medium large xlarge

Learn to Program (2nd edition)


Cover image for Learn to Program
Pages 194
Release P5.0 (2014-07-30)
ISBN 978-1-93435-636-4

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.

Choose Your Format(s)
  • $34.45 In Stock

    Save $9.00 on the combo pack.

  • $24.95 In Stock
  • $18.50 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

About This Title

This BookBeginnerExpert

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.

Read the reviews .

You Might Also Like

  • Cover Image For Programming Ruby 1.9…
  • Cover Image For Learn to Program with Minecraft Plugins…
  • Cover Image For 3D Game Programming for Kids…
  • Cover Image For Rapid Android Development…



Each of our books has its own dedicated discussion area, where readers help each other out. Many authors also choose to drop by.

Join in…

Here are some recent topics:

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

Brought to You By

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.