Ruby is a fantastic programming language. From the official website,
Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, extensible, and portable.
Oh, I need to mention, it’s totally free, which means not only free of charge, but also freedom to use, copy, modify, and distribute it.
Let’s go through this blurb again:
- Ruby is interpreted (as opposed to compiled). A consequence is that Ruby has a very powerful runtime environment which allows for metaprogramming which is a very advanced (read powerful) programming technique.
- Ruby is a scripting language meaning that it is at the same time a general purpose programming language (like C++ and Java) and a language which can automate tasks in an operating system (scripts) and in applications (macros). Learn it once and apply it everywhere!
- Ruby allows quick and easy object-oriented programming. Ruby is a pure object-oriented language : everything is a object to which messages are sent (exactly like Smalltalk). Additionally, Ruby has blocks which simply allows Ruby to be used as a (very powerful) multi-paradigm programming language.
- Ruby has many features to process text files and to do system management tasks (as in Perl). Ruby has regular expressions and can manipulate operating system resources (file, processes, devices…)
- Ruby is simple [and] straight-forward compared to Java and C++ therefore it allows the (human) programmer to produce bug-free programs quickly and (more or less) effortlessly.
- Ruby is extensible and portable which means that (i) the limit is your imagination (and not the imagination of Yukihiro Matsumoto, Ruby’s (very intelligent) creator) and (ii) your programs will run on a lot of different operating systems.
- Ruby is totally free, which means not only free of charge, but also freedom to use, copy, modify, and distribute it. In other words, Ruby is opensource software.
How to learn Ruby
Ruby is a simple and elegant language and it is easy to learn if you have an open mind… The definitive book to learn Ruby is Programming Ruby – The Pragmatic Programmer’s Guide. It is available is two editions:
- The first edition covers Ruby 1.6 and is freely available online
- The second edition covers Ruby 1.8 and can be bought directly from the author’s website or Amazon.com.
I’ve just bought the second edition and I’m reading it right now.
Three reasons why I like Ruby
- It’s a beautiful language. I’ve always been a fan of Smalltalk and I find Ruby’s syntax very pretty.
- It’s an object-oriented language and I tend to think in terms of objects, attributes and methods on Mondays, Wednesdays and Fridays.
- It’s a functional language and I tend to think in terms of higher-order functions and recursion on Tuesdays, Thursdays and Saturdays.
Ruby as a first language
In my opinion, Ruby is the perfect programming language to teach programming at college and university level. Ruby’s syntax is clean. Ruby is powerful, modern and portable. In addition to that, I think Ruby stimulates creativity much more than mainstream pramming languages.
It’s time to get rid of Java and C++!!! Let our youngsters experience something beautiful instead of something, ahem, industrial…
A (very successful) spinoff
Ruby on Rails is a full-stack framework for developing database-backed web applications. It is gaining enormous acceptance thanks partly to Ruby’s elegance. In fact, I am currently developing my first RoR application right now. I’ll keep you posted.
The revolution is on. Learn Ruby and you’ll be happier. I have and I am ;-)