Table of Contents

Preface to the Second Edition
Introduction
What Is Programming?
Programming Languages
The Art of Programming
1. Getting Started
Windows
Mac OS X
Linux
2. Numbers
Did It Work?
Introduction to puts
Integer and Float
Simple Arithmetic
A Few Things to Try
3. Letters
String Arithmetic
12 vs. ’12’
Problems
4. Variables and Assignment
5. Mixing It Up
Conversions
Another Look at puts
The gets Method
Did It Work?
The chomp Method
A Few Things to Try
Mind Your Variables
6. More About Methods
Fancy String Methods
A Few Things to Try
Higher Math
More Arithmetic
Random Numbers
The Math Object
7. Flow Control
Comparison Methods
Branching
Looping
A Little Bit of Logic
A Few Things to Try
8. Arrays and Iterators
The Method each
More Array Methods
A Few Things to Try
9. Writing Your Own Methods
Method Parameters
Local Variables
Experiment: Duby
Return Values
A Few Things to Try
10. There’s Nothing New to Learn in Chapter 10
Recursion
Rite of Passage: Sorting
A Few Things to Try
One More Example
A Few More Things to Try
11. Reading and Writing,
Saving and Loading,
Yin and…Something Else
Doing Something
The Thing About Computers…
Saving and Loading for Grown-Ups
YAML
Diversion: Double-Quoted Strings
Back to Our Regularly Scheduled Programming
Renaming Your Photos
A Few Things to Try
12. New Classes of Objects
The Time Class
A Few Things to Try
The Hash Class
Ranges
Stringy Superpowers
A Few More Things to Try
Classes and the Class Class
13. Creating New Classes,
Changing Existing Ones
A Few Things to Try
Creating Classes
Instance Variables
new vs. initialize
Baby Dragon
A Few More Things to Try
14. Blocks and Procs
Methods That Take Procs
Methods That Return Procs
Passing Blocks (Not Procs) into Methods
A Few Things to Try
15. Beyond This Fine Book
irb: Interactive Ruby
The PickAxe: Programming Ruby
Ruby-Talk: The Ruby Mailing List
Tim Toady
THE END
A1. Possible Solutions
Exercises from Chapter 2
Exercises from Chapter 5
Exercises from Chapter 6
Exercises from Chapter 7
Exercises from Chapter 8
Exercises from Chapter 9
Exercises from Chapter 10
Exercises from Chapter 11
Exercises from Chapter 12
Exercises from Chapter 13
Exercises from Chapter 14
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.193.210