James Edward Gray II9780976694076, 0-9766940-7-7
Table of contents :
Introduction……Page 8
Spring Cleaning……Page 10
Part I The Quizzes……Page 12
Mad Libs……Page 13
LCD Numbers……Page 15
GEDCOM Format……Page 16
Sample Input……Page 17
Animal Quiz……Page 18
Scrabble Stems……Page 20
Regexp.build()……Page 21
HighLine……Page 23
Roman Numerals……Page 25
Rock Paper Scissors……Page 27
Knight’s Travails……Page 32
Sokoban……Page 34
Crosswords……Page 36
1-800-THE-QUIZ……Page 38
Texas Hold’em……Page 40
Encryption……Page 43
Decryption……Page 44
The Keystream……Page 45
Your Script……Page 47
English Numerals……Page 48
Code Cleaning……Page 49
Banned Words……Page 51
Secret Santas……Page 53
Barrel of Monkeys……Page 55
Solving the Maze……Page 57
Bonus Points……Page 58
Learning Tic-Tac-Toe……Page 59
Countdown……Page 60
Solving Tactics……Page 62
Cryptograms……Page 64
Part II Answers and Discussion……Page 67
Mad Libs……Page 68
Custom Templating……Page 69
Mini Libs……Page 73
Additional Exercises……Page 74
Using Templates……Page 75
On and Off Bits……Page 77
Using a State Machine……Page 79
Additional Exercises……Page 82
GEDCOM Parser……Page 83
Optimizing the Read and Write Cycles……Page 84
Additional Exercises……Page 87
Animal Quiz……Page 88
Arrays Instead of Custom Objects……Page 91
Leaving the Trees……Page 94
Additional Exercises……Page 95
Scrabble Stems……Page 96
Eating Less RAM……Page 97
Additional Exercises……Page 99
Regexp.build()……Page 100
Shrinking a Regexp……Page 101
Speeding Up the Build……Page 104
Timing the Solutions……Page 106
Additional Exercises……Page 107
A Class-Based Solution……Page 108
Testing I/O……Page 111
The Official HighLine……Page 113
Additional Exercises……Page 118
Roman Numerals……Page 119
Saving Some Memory……Page 120
Romanizing Ruby……Page 122
Additional Exercises……Page 127
Rock Paper Scissors……Page 128
Outthinking a Random Player……Page 129
Cheat to Win……Page 131
Psychic Players……Page 132
Additional Exercises……Page 133
Knight’s Travails……Page 134
Or with Less Abstraction……Page 138
Additional Exercises……Page 139
Sokoban……Page 141
Objectified Sokoban……Page 143
Saving Your Fingers……Page 149
Additional Exercises……Page 150
Crosswords……Page 152
Passive Building……Page 155
Additional Exercises……Page 159
Word Signatures……Page 160
The Search……Page 162
Cleaning Up and Showing Results……Page 164
Additional Exercises……Page 166
Ruby’s Sorting Tricks……Page 167
Sorting Cards……Page 168
Name the Hand……Page 169
Additional Exercises……Page 172
Testing a Cipher……Page 173
A Deck of Letters……Page 177
A Test Suite and Solution……Page 180
Additional Exercises……Page 182
Grouping Numbers……Page 183
Coding an Idea……Page 184
Proper Grammar……Page 186
Additional Exercises……Page 189
Instant Web Serving……Page 190
Finding the Hidden Wiki……Page 191
The Other Program……Page 195
Additional Exercises……Page 197
Banned Words……Page 198
Doing Even Fewer Checks……Page 200
Additional Exercises……Page 201
Secret Santas……Page 202
A Ring of Players……Page 204
Grouping……Page 205
Climbing a Hill……Page 207
Additional Exercises……Page 208
Barrel of Monkeys……Page 210
Fancy Searching……Page 214
Additional Exercises……Page 220
The Internal Bits……Page 221
Making a Maze……Page 226
Solving a Maze……Page 227
Interface……Page 229
Additional Exercises……Page 230
Learning Tic-Tac-Toe……Page 232
Filling a Matchbox Brain……Page 239
Ruby’s MENACE……Page 243
Additional Exercises……Page 245
Countdown……Page 246
Pruning Code……Page 247
Coding Different Strategies……Page 251
Additional Exercises……Page 254
Solving Tactics……Page 256
From Playing to Solving……Page 259
Proof through Unit Testing……Page 262
Additional Exercises……Page 265
Using Word Signatures……Page 266
Building the Map……Page 268
Assembling a Solution……Page 271
Additional Exercises……Page 276
Bibliography……Page 277
Index……Page 278
Reviews
There are no reviews yet.