Publisher: No Starch Press Released: June 2007 Pages: 294
There may be no better way to learn how to program than by dissecting real, representative examples written in your language of choice. Ruby by Example analyzes a series of Ruby scripts, examining how the code works, explaining the concepts it illustrates, and showing how to modify it to suit your needs. Baird's examples demonstrate key features of the language (such as inheritance, encapsulation, higher-order functions, and recursion), while simultaneously solving difficult problems (such as validating XML, creating a bilingual program, and creating command-line interfaces). Each chapter builds upon the previous, and each key concept is highlighted in the margin to make it easier for you to navigate the book. You'll learn how to: - Use the interactive Ruby shell (irb) to learn key features of the language
- Extend Ruby using RubyGems, the Ruby package manager
- Create numerical utilities, as well as utilities that process and analyze HTML/XML
- Implement purely functional and metaprogramming techniques to save time and effort
- Optimize, profile, and test your code to make sure that it not only does its job, but does it well
- Create web applications using Rails
Ruby is the fastest growing programming language today, and for good reason: Its elegant syntax and readable code make for prolific and happy programmers. But it can be difficult to understand and implement without a little help. Ruby by Example shows you how to take advantage of Ruby as you explore Ruby's fundamental concepts in action. |
-
Chapter 1 Interactive Ruby and the Ruby Environment -
Starting irb -
Using irb -
Using the Ruby Interpreter and Environment -
Chapter 2 Amusements and Simple Utilities -
#1 Is It Payday? (check_payday.rb) -
#2 Random Signature Generator (random_sig.rb and random_sig-windows.rb) -
#3 The 99 Bottles of Beer Song (99bottles.rb) -
#4 Sound File Player (shuffle_play.rb) -
Chapter Recap -
Chapter 3 Programmer Utilities -
#5 What Is Truth? (boolean_golf.rb) -
#6 Making a List (array_join.rb) -
#7 Command-Line Interface (uses_cli.rb and simple_cli.rb) -
#8 Palindromes (palindrome.rb and palindrome2.rb) -
Chapter Recap -
Chapter 4 Text Manipulation -
#9 End-of-Line Conversion (dos2unix.rb) -
#10 Showing Line Numbers (line_num.rb) -
#11 Wrapping Lines of Text (softwrap.rb) -
#12 Counting Words in a File (word_count.rb) -
#13 Word Histogram (most_common_words.rb) -
#14 Rotating Characters in a String (rotate.rb) -
Chapter Recap -
Chapter 5 Number Utilities -
#15 Computing Powers (power_of.rb) -
#16 Adding Commas to Numbers (commify.rb) -
#17 Roman Numerals (roman_numeral.rb) -
#18 Currency Conversion, Basic (currency_converter1.rb) -
#19 Currency Conversion, Advanced (currency_converter2.rb) -
Chapter Recap -
Chapter 6 Functionalism with Blocks and Procs -
#20 Our First lambda (make_incrementer.rb) -
#21 Using Procs for Filtering (matching_members.rb) -
#22 Using Procs for Compounded Filtering (matching_compound_members.rb) -
#23 Returning Procs as Values (return_proc.rb) -
#24 Nesting lambdas -
#25 Procs for Text (willow_and_anya.rb) -
Chapter Recap -
Chapter 7 Using, Optimizing, and Testing Functional Techniques -
#26 Basic Factorials and Fibonaccis (factorial1.rb through fibonacci5.rb) -
#27 Benchmarking and Profiling (tests/test_opts.rb) -
#28 Converting Temperatures (temperature_converter.rb) -
#29 Testing temperature_converter.rb (tests/test_temp_converter.rb) -
Chapter Recap -
Chapter 8 HTML and XML Tools -
#30 Cleaning Up HTML (html_tidy.rb) -
#31 Counting Tags (xml_tag_counter.rb) -
#32 Extracting Text from XML (xml_text_extractor.rb) -
#33 Validating XML (xml_well_formedness_checker.rb) -
Chapter Recap -
Chapter 9 More Complex Utilities and Tricks, Part I -
#34 Finding Codes in the Bible or Moby-Dick (els_parser.rb) -
#35 Mutating Strings into Weasels (methinks.rb) -
#36 Mutating the Mutation of Strings into Weasels (methinks_meta.rb) -
Chapter Recap -
Chapter 10 More Complex Utilities and Tricks, Part II -
#37 Overnight DJ (radio_player1.rb) -
#38 Better Overnight DJ (radio_player2.rb) -
#39 Numbers by Name (to_lang.rb) -
#40 Elegant Maps and Injects (symbol.rb) -
Chapter Recap -
Chapter 11 CGI and the Web -
Common Gateway Interface -
Preparation and Installation -
#41 A Simple CGI Script (simple_cgi.rb) -
#42 Mod Ruby (mod_ruby_demo.rhtml and mod_ruby_demo.conf) -
#43 CSS Stylesheets, Part I (stylesheet.rcss) -
#44 CSS Stylesheets, Part II (stylesheet2.rcss) -
Chapter Recap -
Chapter 12 RubyGems and Rails Preparation -
RubyGems -
Rails Preparation -
Chapter Recap -
Chapter 13 A Simple Rails Project -
Creating the Application -
Dissecting the Application -
Using the Application -
Learning More About Rails -
Chapter Recap -
Appendix How Does Ruby Compare to Other Languages? -
C -
Haskell -
Java -
Lisp -
Perl -
PHP -
Python -
Smalltalk -
Summary of Ruby vs. Other Languages -
Colophon |
- Title:
- Ruby by Example
- By:
- Kevin C. Baird
- Publisher:
- No Starch Press
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- June 2007
- Ebook:
- August 2009
- Pages:
- 294
- Print ISBN:
- 978-1-59327-148-0
- | ISBN 10:
- 1-59327-148-4
- Ebook ISBN:
- 978-1-59327-160-2
- | ISBN 10:
- 1-59327-160-3
|
-
Kevin C. Baird Kevin C. Baird received his Ph.D. from the State University of New York at Buffalo. He originally wrote his dissertation in Python but rewrote the project after discovering Ruby, and he hasn't looked back since. He has presented at RubyConf and written articles for Linux Journal, Music & Computers magazine, and the New Interfaces for Musical Expression conference proceedings. View Kevin C. Baird's full profile page. |
|
Description
|
Table of Contents
|
Product Details
|
About the Author
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Brett McLaughlin, Gary Pollice, David West
November 2006
Ebook: $39.99
Print & Ebook: $54.99
Print: $49.99
By Daniel J. Barrett
January 1997
By Ellen Siever, Larry Wall, Brian Jepson, David Futato, Nathan Patwardhan
November 1997
|
Customer Reviews
4/21/2008 4.0And now for something completely different, By joshSVUG from Undisclosed 10/2/2007 5.0Learn Ruby Via Language Immersion By Scott Schram from Undisclosed
|
|
|