آموزش و پرورش

فرمت: pdf
حجم: 2.9 مگابایت
قیمت: 4000 تومان

Learn to Program, Second Edition

By


شناسنامه فارسی کتاب:
عنوان کتاب:

یادگیری به برنامه، نسخه دوم

موضوع کتاب:

Education

سال نشر:
ناشر: Pragmatic Bookshelf
ویرایش: Second Edition
شماره جلد:
تعداد صفحه: 192
زبان: انگلیسی

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.
Contents......Page 4
Preface to the Second Edition......Page 7
Introduction......Page 10
What Is Programming?......Page 12
Programming Languages......Page 13
The Art of Programming......Page 14
Getting Started......Page 16
Windows......Page 17
Mac OS X......Page 19
Linux......Page 22
Did It Work?......Page 24
Simple Arithmetic......Page 25
A Few Things to Try......Page 27
Letters......Page 29
String Arithmetic......Page 30
Problems......Page 31
Variables and Assignment......Page 34
Conversions......Page 38
Another Look at puts......Page 40
Did It Work?......Page 41
The chomp Method......Page 42
Mind Your Variables......Page 43
More About Methods......Page 45
Fancy String Methods......Page 47
Higher Math......Page 51
More Arithmetic......Page 52
Random Numbers......Page 53
The Math Object......Page 54
Comparison Methods......Page 56
Branching......Page 58
Looping......Page 63
A Little Bit of Logic......Page 66
A Few Things to Try......Page 72
Arrays and Iterators......Page 74
The Method each......Page 76
More Array Methods......Page 79
A Few Things to Try......Page 80
Writing Your Own Methods......Page 82
Method Parameters......Page 86
Local Variables......Page 87
Experiment: Duby......Page 89
Return Values......Page 91
A Few Things to Try......Page 95
Recursion......Page 97
Rite of Passage: Sorting......Page 103
One More Example......Page 105
A Few More Things to Try......Page 111
Doing Something......Page 113
The Thing About Computers.........Page 114
Saving and Loading for Grown-Ups......Page 115
YAML......Page 116
Diversion: Double-Quoted Strings......Page 118
Back to Our Regularly Scheduled Programming......Page 120
Renaming Your Photos......Page 122
A Few Things to Try......Page 125
New Classes of Objects......Page 127
The Time Class......Page 128
The Hash Class......Page 130
Ranges......Page 131
Stringy Superpowers......Page 132
A Few More Things to Try......Page 135
Classes and the Class Class......Page 136
Creating New Classes, Changing Existing Ones......Page 137
Creating Classes......Page 138
Instance Variables......Page 139
new vs. initialize......Page 142
Baby Dragon......Page 143
A Few More Things to Try......Page 148
Blocks and Procs......Page 149
Methods That Take Procs......Page 150
Methods That Return Procs......Page 154
Passing Blocks (Not Procs) into Methods......Page 155
A Few Things to Try......Page 157
The PickAxe: Programming Ruby......Page 160
Ruby-Talk: The Ruby Mailing List......Page 161
Tim Toady......Page 162
THE END......Page 164
Possible Solutions......Page 165
Exercises from Chapter 2......Page 166
Exercises from Chapter 5......Page 167
Exercises from Chapter 6......Page 169
Exercises from Cha...
شابک/ISBN: 1934356360, 9781934356364