Ruby: An Introduction
Ruby is a dynamic scripting language for programming all sorts of versatile operations, from processing text files to performing system management duties. It is an object-oriented programming language that was invented in 1993 and released in 1995 by Japanese programmer Yukihiro Matsumoto (fondly referred to in programming circles as "Matz") as an alternative to the likes of Python and Perl. It was designed to be simple, straight-forward, portable, and extensible. Best of all, it's an open-source development language, meaning that it's completely free, both to own and use as well as to copy, alter, and disseminate.
Because of the nature of scripting languages in general, much of the material presented below may be "over the heads" of the non-programming-savvy, but we've made every effort to explain Ruby in as plain-spoken a manner, and with as little technical jargon as possible. However, in consideration of those actual programmers reading this article, you'll find a partial list of Ruby's features - some of which you may recognize - at the bottom of this page.
For those less technically-savvy readers wishing to enjoy Ruby's artful conveniences, we recommend an open-source (read: free!) software product called Ruby on Rails (check out our article on Ruby on Rails). Ruby on Rails is full of user-friendly tools for building potent web applications using Ruby.
What programmers seem to like best about Ruby is that, unlike so many languages that claim to be object oriented but are actually only partially so, Ruby is a pure object oriented language. Everything in Ruby is an object.
Ruby is a logical and well-organized language and, as such, is easy to learn (if you know the first thing about programming, that is). It takes the purity of a true object oriented language like Smalltalk and gets rid of all the awkward syntax, replacing it with more conventional file source code.
Yet as simplistic as Ruby is considered to be, it is as powerful and flexible as other languages you may already be using. Ruby is a utilitarian language in that it requires the absolute minimal amount of coding to achieve your desired result. It values accuracy and conciseness.
One of Ruby's greatest features is an Interpreter Shell where programmers can experiment with the language, viewing and evaluate its efficacy for the tasks assigned in real-time. By trying out the code you're editing as you go, you avoid the grim likelihood of being held up time and again in the debugger.
As its creator says in his forward to the reference book mentioned below, Ruby was designed "to solve problems, not spoonfeed compilers." He wanted to design a language that adapted to human needs rather than enforcing its own, "arbitrary, rigid rules".
Now here comes the jargon - Ruby includes many of the features programmers have grown accustomed to in their current, chosen scripting language - be it ADA, C++, CLU, Eiffel, LISP, Python, or Smalltalk - including:
-
Multithreading
-
Mixins
-
Singleton Methods
-
Exception Handling
-
Fully-integrated Closures and Iterators
-
Automatic Mark-and-Sweep Garbage Collection
-
Proper Metaclasses (or Meta-Classes)
-
Fully regular expression support
-
Functions that give access to the operating system running Ruby
-
Fully-featured Debugger that includes:
o Breakpoints based on conditional expression evaluation
o Facilities for variable monitoring and inspection
You can find an excellent - and totally Free! - HTML formatted online manual to using Ruby (authorized and approved by Matz himself), called Programming Ruby: The Pragmatic Programmer's Guide, First Edition at www.rubycentral.com/book.
Looking for a web host that supports Ruby? Check out our BlueHost review
|