|

Addison-Wesley / Prentice Hall

Computer Science

My Instructor Resource Center :  Log in or request access

Programming Ruby: The Pragmatic Programmer's Guide
David Thomas
Andrew Hunt

ISBN-10: 0201710897
ISBN-13:  9780201710892

Publisher:  Addison-Wesley Professional
Copyright:  2001
Format:  Paper; 608 pp
Published:  10/17/2000
Status: Out of Print


We're sorry, this product is no longer available.
Please contact your Pearson rep if you are using this product and need instructor resources.



Foreword.


Preface.


1. Roadmap.

I. FACETS OF RUBY.

2. Ruby New.

Ruby Is an Object-Oriented Language.

Some Basic Ruby.

Arrays and Hashes.

Control Structures.

Regular Expressions.

Blocks and Iterators.

Reading and ‘Riting.

Onward and Upward.

3. Classes, Objects, and Variables.

Inheritance and Messages.

Objects and Attributes.

Class Variables and Class Methods.

Access Control.

Variables.

4. Containers, Blocks, and Iterators.

Containers.

Blocks and Iterators.

5. Standard Types.

Numbers.

Strings.

Ranges.

Regular Expressions.

6. More about Methods.

Defining a Method.

Calling a Method.

7. Expressions.

Operator Expressions.

Miscellaneous Expressions.

Assignment.

Conditional Execution.

Case Expressions.

Loops.

Variable Scope and Loops.

8. Exceptions, Catch, and Throw.

The Exception Class.

Handling Exceptions.

Raising Exceptions.

Catch and Throw.

9. Modules.

Namespaces.

Mixins.

Iterators and the Enumerable Module.

Including Other Files.

10. Basic Input and Output.

What Is an IO Object?

Opening and Closing Files.

Reading and Writing Files.

Talking to Networks.

11. Threads and Processes.

Multithreading.

Controlling the Thread Scheduler.

Mutual Exclusion.

Running Multiple Processes.

12. When Trouble Strikes.

Ruby Debugger.

Interactive Ruby.

But It Doesn't Work!

But It's Too Slow!

II. RUBY IN ITS SETTING.

13. Ruby and Its World.

Command-Line Arguments.

Program Termination.

Environment Variables.

Where Ruby Finds Its Modules.

Build Environment.

14. Ruby and the Web.

Writing CGI Scripts.

Embedding Ruby in HTML.

Improving Performance.

15. Ruby Tk.

Simple Tk Application.

Widgets.

Binding Events.

Canvas.

Scrolling.

Translating from Perl/Tk Documentation.

16. Ruby and Microsoft Windows.

Ruby Ports.

Running Ruby Under Windows.

Win32API.

Windows Automation.

17. Extending Ruby.

Ruby Objects in C.

Writing Ruby in C.

Sharing Data Between Ruby and C.

Memory Allocation.

Creating an Extension.

Embedding a Ruby Interpreter.

Bridging Ruby to Other Languages.

Ruby C Language API.

III. RUBY CRYSTALLIZED.

18. The Ruby Language.

Source Layout.

The Basic Types.

Names.

Variables and Constants.

Predefined Variables.

Expressions.

Boolean Expressions.

If and Unless Expressions.

Case Expressions.

Loop Constructs.

Method Definition.

Invoking a Method.

Aliasing.

Class Definition.

Module Definitions.

Access Control.

Blocks, Closures, and Proc Objects.

Exceptions.

Catch and Throw.

19. Classes and Objects.

How Classes and Objects Interact.

Class and Module Definitions.

Top-Level Execution Environment.

Inheritance and Visibility.

Freezing Objects.

20. Locking Ruby in the Safe.

Safe Levels.

Tainted Objects.

21. Reflection, ObjectSpace, and Distributed Ruby.

Looking at Objects.

Looking at Classes.

Calling Methods Dynamically.

System Hooks.

Tracing Your Program's Execution.

Marshaling and Distributed Ruby.

Compile Time? Runtime? Anytime!

IV. RUBY LIBRARY REFERENCE.

22. Built-In Classes.

Alphabetical Listing.

Array.

Bignum.

Binding.

Class.

Continuation.

Dir.

Exception.

FalseClass.

File.

File::Stat.

Fixnum.

Float.

Hash.

Integer.

IO.

MatchData.

Method.

Module.

NilClass.

Numeric.

Object.

Proc.

Range.

Regexp.

String.

Struct.

Struct::Tms.

Symbol.

Thread.

ThreadGroup.

Time.

TrueClass.

23. Built-in Modules.

Alphabetical Listing.

Comparable.

Enumerable.

Errno.

FileTest.

GC.

Kernel.

Marshal.

Math.

ObjectSpace.

Process.

24. Standard Library.

Complex.

Date.

English.

Find.

File.

GetoptLong.

mkmf.

ParseDate.

profile.

PStore.

Tempfile.

Mutex.

ConditionVariable.

timeout.

WeakRef.

25. Object-Oriented Design Libraries.

Visitor.

Delegate.

Observer.

Singleton.

26. Network and Web Libraries.

Socket-Level Access.

BasicSocket.

IPSocket.

TCPSocket.

SOCKSSocket.

TCPServer.

UDPSocket.

UNIXSocket.

UNIXServer.

Socket.

Higher-Level Access.

Net::FTP.

Net::HTTP.

Net::HTTPResponse.

Net::POP.

Net::APOP.

Net::POPMail.

Net::SMTP.

Net::Telnet.

CGI Development.

CGI.

CGI::Session.

27. Microsoft Windows Support.

WIN32OLE.

WIN32OLE_EVENT.

Win32API.

V. APPENDICES.

A: Embedded Documentation.

Inline Formatting.

Cross References.

Method Names.

Including Other Files.

Using rdtool.

Mandatory Disclaimer.

B: Interactive Ruby Shell.

Command Line.

Initialization File.

Commands.

Restrictions.

rtags, xmp, and the Frame Class.

C: Support.

Web Sites.

Download Sites.

Usenet Newsgroup.

Mailing Lists.

Bug Reporting.

D: Bibliography.

Index. 0201710897T04062001

Dave Thomas likes to fly single-engine airplanes and pays for his habit by finding elegant solutions to difficult problems, consulting in areas as diverse as aerospace, banking, financial services, telecommunications, travel and transport, and the Internet. Before moving to the United States in 1994, Dave founded an ISO9001-certified English software company that delivered sophisticated, custom software projects throughout the world. Dave is now an independent consultant based in Dallas, Texas.

Andy Hunt is an avid woodworker and musician, but, curiously, he is more in demand as a consultant. He has worked in telecommunications, banking, financial services, and utilities, as well as in more exotic fields, such as medical imaging, graphic arts, and Internet services. Andy specializes in blending tried-and-true techniques with leading-edge technologies, creating novel--but practical--solutions. Andy owns his own consulting business in Raleigh, North Carolina.



0201710897AB04062001

Developers from around the world are using the Ruby language. Here’s what they’re saying about Programming Ruby...

“In their first landmark book, The Pragmatic Programmer, Dave and Andy urged us to learn at least one new programming language every year. It may follow the principle of least surprise that the authors would bring us this year’s candidate, accompanied with a pragmatic philosophy of how to learn your new OO scripting language of choice.”

         —Frank Westphal, independent consultant

“Ruby is an exciting new language, worth knowing about and well worth considering for an upcoming project. It's rare to see such a useful book this early in the life of a new language. But of course I would expect no less from the authors of The Pragmatic Programmer. Andy and Dave: Thanks!”

         —Ron Jeffries, author of Extreme Programming Installed

“I have used Perl and Python for my work... but Ruby just turns my work into fun!”

         —Clemens Hintze, programmer

“Ruby is a remarkably clean, simple, powerful, and practical dynamic OO programming language. Ruby fully deserves this correspondingly best-of-breed book. This book is a ‘must have’ wizard’s workshop for using Ruby to boost your programming power and productivity. This book will greatly amplify the worldwide use of Ruby, stimulate powerful Ruby extensions, and generate demand for second and third editions. I look forward to telling later legions of Ruby users that I was farsighted enough to master Ruby using the classic first edition of Programming Ruby.”

         —Conrad Schneiker

“A good book by a great pair of programmers about a language with a great future. This should be the first Ruby book anyone buys.”

         —Hal Fulton

“Dave and Andy are among the western pioneers who understand the value of this precious gem of a language. They cleaned and polished it well, dazzling us all with its depth and transparency. It's almost magical.”

         —Aleksi Niemelä
Use Ruby and you'll write better code, be more productive, and enjoy programming more.
"I love it. Conceptually it is really clean, and sweet."
--Kent Beck, author of Extreme Programming Explained, on the Ruby language

Ruby is a true object-oriented programming language that makes the craft of programming easier. Ruby is a transparent language: It doesn't obscure your program behind unnecessary syntax or reams of extra support code. Guided by the Principle of Least Surprise, Ruby embodies the values of consistency and simplicity of expression. It's more than a programming language: It's a concise way of expressing ideas. Ruby supports natural intelligence--yours.

Programming Ruby: The Pragmatic Programmer's Guide is your complete Ruby resource. It provides a tutorial and overview of Ruby version 1.6; a detailed description of the language's structure, syntax, and operation; a guide to building applications with Ruby; and a comprehensive library reference.

Mining real rubies is hard work done with a pickaxe, but mining ruby the language is simple With this book, you'll find it remarkably easy to Learn Ruby basics. You'll find normal stuff like classes, objects, and exceptions, as well as more interesting features, such as infinite-precision integers, iterators, mixins, and threads.

  • Write large, well-structured Ruby programs
  • Write CGI scripts and create dynamic Ruby pages for the Web
  • Create cross-platform GUI applications
  • Access Microsoft Windows native API calls and automate Windows applications
  • Extend Ruby using C code

Other gems you'll find in Programming Ruby include:

  • An alphabetical reference to all of the built-in classes, modules, and the standard library, documenting over a thousand methods
  • A reference to object-oriented design libraries, network and Web libraries, and Microsoft Windows support
  • A guide to downloading the Ruby language itself, as well as other Ruby resources
  • Numerous examples (that really work) appear throughout the book. You will come away from this book with an appreciation for Ruby's power, flexibility, and clarity. You'll be armed with the information you need to put Ruby to work for you and your projects.

The authors maintain the Ruby FAQ, which can be found on-line at both www.rubycentral.com and www.pragmaticprogrammer.com.



Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.