×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Learn to Program / Edition 2
     

Learn to Program / Edition 2

4.0 1
by Chris Pine
 

See All Formats & Editions

ISBN-10: 1934356360

ISBN-13: 9781934356364

Pub. Date: 04/01/2009

Publisher: Pragmatic Programmers, LLC, The

Printed in full color.

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

Overview

Printed in full color.

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.

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.

Printed in full color.

Product Details

ISBN-13:
9781934356364
Publisher:
Pragmatic Programmers, LLC, The
Publication date:
04/01/2009
Series:
Facets of Ruby Series
Edition description:
Second Edition
Pages:
194
Sales rank:
642,107
Product dimensions:
7.40(w) x 8.90(h) x 0.80(d)

Table of Contents

Introductionix
What Is Programming?xi
Programming Languagesxii
The Art of Programmingxiii
1Getting Started1
1.1Windows2
1.2Mac OS X4
1.3Linux7
2Numbers9
2.1Introduction to puts9
2.2Integer and Float9
2.3Simple Arithmetic10
2.4A Few Things to Try12
3Letters13
3.1String Arithmetic14
3.212 vs. '12'15
3.3Problems15
4Variables and Assignment19
5Mixing It Up23
5.1Conversions23
5.2Another Look at puts25
5.3The Methods gets and chomp26
5.4A Few Things to Try27
5.5Mind Your Variables27
6More about Methods31
6.1Fancy String Methods33
6.2A Few Things to Try37
6.3Higher Math38
6.4More Arithmetic38
6.5Random Numbers39
6.6The Math Object41
7Flow Control43
7.1Comparison Methods43
7.2Branching46
7.3Looping50
7.4A Little Bit of Logic51
7.5A Few Things to Try57
8Arrays and Iterators59
8.1The Method each61
8.2More Array Methods63
8.3A Few Things to Try65
9Writing Your Own Methods67
9.1Method Parameters71
9.2Local Variables73
9.3Return Values74
9.4A Few Things to Try79
10There's Nothing New to Learn in Chapter 1081
10.1Recursion81
10.2Rite of Passage: Sorting88
10.3A Few Things to Try89
10.4One More Example89
10.5A Few More Things to Try96
11Reading and Writing, Saving and Loading, Yin and...99
11.1Doing Something99
11.2The Thing about Computers...100
11.3Saving and Loading for Grown-ups101
11.4YAML102
11.5Renaming Your Photos105
11.6A Few Things to Try109
12New Classes of Objects111
12.1The Time Class112
12.2A Few Things to Try113
12.3The Hash Class114
12.4Ranges115
12.5Stringy Superpowers116
12.6A Few More Things to Try118
12.7Classes and the Class Class119
13Creating New Classes, Changing Existing Ones121
13.1A Few Things to Try122
13.2Creating Classes122
13.3Instance Variables123
13.4A Few More Things to Try131
14Blocks and Procs133
14.1Methods That Take Procs134
14.2Methods That Return Procs138
14.3Passing Blocks (Not Procs) into Methods139
14.4A Few Things to Try142
15Beyond This Fine Book145
15.1irb: Interactive Ruby145
15.2The PickAxe: Programming Ruby146
15.3Ruby-Talk: the Ruby Mailing List146
15.4Tim Toady147
15.5The End149

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews

Learn to Program 4 out of 5 based on 0 ratings. 1 reviews.
Readibus_Criticus More than 1 year ago
a good and fun read if you want to start programming with an easy language :)