4 DAY COURSE

David A. Black's Ruby Bootcamp

Topics covered at RUBY-BOOTCAMP-01-04

Dates coming soon

Are you interested in learning the basics of the Ruby programming language, and extending your knowledge of Ruby object model, built-in classes, string and text handling, sockets and network programming, code testing, metaprogramming, and many more subtopics.

The workshop is completed with one further day of learning, where we will have a 'deep dive' into various Ruby tools! Upon completion of this bootcamp, you will understand that Ruby is a mature general-purpose, programming language, why it has gained tremendous world-wide popularity in recent years. You will know how to use Ruby for a wide variety of programming tasks, including its features, its elegant syntax and full object orientation.

Delegates will also receive a copy of The Well-Grounded Rubyist during the course.

PLEASE NOTE: This course is available as a private class only. To discuss dates and availability please contact us on +44 (0)20 7183 9040 or email us.

Learn how to:

  • Ruby's syntax, object model, and major built-in classes
  • Basic object-orientation principles
  • Program design with Ruby
  • The use of Ruby as a "scripting" tool for administrative tasks
  • Testing basics and Ruby testing facilities

About the Author

David A. Black

David A. Black is a well-known and highly-regarded Ruby programmer, trainer, author, speaker, and event organizer.

Basic Ruby concepts and features

  • "Everything's an object"
  • Local variables and assignment
  • Top-level method definitions
  • Arithmetic and logical operators
  • Global variables
  • The default object (self)

Object orientation in Ruby

  • Messages and methods
  • Ruby's class model
  • Inheritance
  • The object method lookup-path

Classes and modules

  • Class methods
  • Constants
  • Module "mix-ins" in classes
  • Modules as namespaces
  • Instance method definition syntax
  • Reopening class and module definitions
  • Overriding methods

Instances and attributes

  • Instance variables
  • Attribute setter and getter techniques
  • Ruby and the "Equal Access Principle"

Strings, symbols, and regular expressions

  • Basic string manipulation and indexing
  • Symbols and the symbol table
  • Regular expression syntax
  • Pattern-matching with scan, sub, and match

Collection objects and iterators

  • Array, Hash, and Range classes
  • Code blocks and iteration
  • Creating iterators with the Enumerable module
  • Collection filtering, selecting, and transforming
  • Enumerators and external iteration

Object dynamism

  • Adding singleton methods to objects
  • Modular extension of per-object behavior
  • Singleton classes
  • Extending existing classes

Threads

  • Starting, running, stopping threads
  • Threads and variable scope
  • Thread-safety considerations

Lambdas and function objects

  • Creating first-class functions
  • Lambda argument semantics
  • Variable scope and closures
  • Block, Proc, lambda interaction

Metaprogramming

  • The eval family of methods
  • Programmatic method creation
  • Runtime reflection on objects
  • Traversing ObjectSpace
  • method_missing and other hooks and callbacks

Exception handling

  • The Exception class hierarchy
  • Raising exceptions
  • Rescue and ensure clauses
  • Writing your own exception classes

File and I/O operations

  • Keyboard input and screen output
  • Basic file reading and writing
  • File handles as iterators
  • Low-level I/O techniques

Date, time, and numeric types

  • Date, Time, and DateTime classes
  • Date calculation and parsing
  • Integers and floating-point numbers

The standard library

  • StringIO hybrid objects
  • Struct and OpenStruct
  • Math extensions
  • FileUtils and Pathname
  • Socket and network programming facilities
  • Administrative and system libraries

Testing in Ruby

  • Unit testing principles
  • The MiniTest and TestUnit libraries

Ruby tools

  • Interactive Ruby (irb)
  • Embedded Ruby (erb)
  • The RubyGems packaging system
  • Rake task management utility

Audience

If you are a Programmer and new to Ruby, or you have worked a bit with Ruby and now want to learn it systematically, this is the course for you!

If you are a System Administrator and not primarily a programmer, but you are comfortable in and around the programming work-flow, you are also welcome!

Prerequisites

To benefit from this Ruby course, you should have some programming experience, or familiarity with how programming works and with the purposes of a programming language.