I heard Ruby described as "Perl Five and a Half" - and I thought "how apt".
Perl is an excellent programming language - it's especially excellent as glueware or middleware, where it melds together differing technologies, protocols, utilities and other programs to provide a total solution. But Perl's features largely date back to its eclectic origins 20 years ago, and whilst it remains excellent - perhaps the best tool in many cases - it also need a major refresh; that's the Perl 6 project, and a story for another day.
Ruby is ... what the next version of Perl (after Perl 5) might have been, but removing those shackles of the requirement for compatibility with old code which make it difficult for Perl to move seamlessly, and without kludges and complications, not the new world. So what does this mean if we compare their uses, now and into the future?
Ruby is "Object Oriented from the start". So - uncompilable by history - you can write your code for each type of data that you'll be using just once, and share it between a number of associated programs. Ruby isn't constrained by slower processor speeds from when it was specified, so the language is packed with features which give you maximum power for minimum coding effort (rather than minimal processor cycles and memory)
Of course, if you have an established code base of routines in another language, a change would lead to some major rewrites and be a major investment, so the movement to the adoption of a new language can be quite slow, and you'll find that early movement might lead to one or two "killer apps" - applications which are so predominant that they drown out the publicity that other budding uses get. The killer app for Ruby is Rails - as in "Ruby on Rails" - and it's taken scripting onto the web, using a "Model - View - Controller" architecture which allows the look and feel of a web application to be separates from the calculation / data storage / business logic. That way, you can change your algorithms without having to redesign your web site, or you can give your website a fresh coast of paint without having to renew all the wiring and plumbing at the same time!
Let me add another language to the mix - Python. I love working with Python; it's a superb Computer Scientist's language, it's got a simple elegance and it's right for the researcher. Like Ruby, Python has taken over areas from Perl, and indeed I'll say that Python's often a good choice. But - as with Ruby - there would also be applications where it would be less than ideal.
This is a Ruby-based post - I'm writing it to position Ruby. So let me conclude by giving thoughts of where Ruby would high amongst the factors that I considered for an application:
• Areas where quick coding to meet specific one-off tasks, but mostly on the same types of data, is required
• Areas where some of those one off tasks expand to become more complex and regular in how they run
• Areas where interaction with other programs (be they operating system commands or applications) is important
• Where code is being written by staff who's primary job is perhaps not "programmer"
• Where there is already a base of Ruby objects, or where there's no existing codebase in another language that yuo would need to rewrite. "Green Field" rather than "Brown Field" sites.
So where would I choose something else?
a) Where the coding was likely to turn into a major project, along the manmonths to manyears of programming lines, with the need for many programmers to be interacting and sharing coding. I would be looking at Python before Ruby, and I might also take a glance across to languages such as Java
b) With a strong existing Perl base, with a need for very quick one-liners as my predominant application, I would still use Perl. That's a pragmatic decision to a very great extent; there's nothing wrong with Ruby for oneliners, but a oneliner is often a line that calls in already written code, and if that's in Perl ...
c) If performance speed and cpu usage is critical, and development time less so, I would be looking at C or C++. There's no point in writing a piece of weather forecasting that runs slower than the weather happens, except for research purposes. And if you have an application that's going to run resource-critically on thousands of computers (search engine, programmable device such as iPad or iPhone) ...
d) Where a tiny runtime footprint is required, a good mix of coding speed and running speed, and a license that lets your code be widely distributed without payment / licensing issues, nor "viral licensing" which forces your code to be open source too if you distribute it. Such applications are prime candidates for Lua.
I mentioned earlier that Ruby's predominant application is Rails - so you'll find a number of "Ruby on Rails" training course available that are designed for that application. You'll find far fewer vanilla Ruby courses - but if you're going to be using Ruby as a scripting language for systems admin, as a powerful data analysis language, in Selenium or Watir, etc ... they it's the more vanilla course that will be the one you need. But Rails is predominant, so those other courses are "niche" - which is where we specialize.
If you're new to programming - Learning to program in Ruby
. If you've already got programming experience, Ruby Programming
. Both of those courses cover all the various bits and pieces of the core language. If you want to have an overview of Ruby's use on the web, through Rails, then stay on for another day - Introduction to Rails
- which will give you that overview. You may be thinking that you're a systems administrator and not a web page writer, but the ability to call up you server information through a browser, and to run common admin tasks from that interface, and from any computer, is a capability not to be sneezed at!
This article is illustrated with pictures of our training centre, and a course that's taking part there. We're situated about 100 miles to the west of London, in secluded grounds just a few minutes walk from the town centre of Melksham, Wiltshire
. The quiet environment in designed for concentrated study and effective learning - you won't hear the phone ring (our HQ and offices are on a different site in the town), and you'll have plenty of space on the course to work - for a computer (or even two), for your course materials, and for taking notes.
As a provider of niche courses, delegates come from far and wide - and at well as training rooms, we also offer hotel (four to five star standard) rooms. You can book a room inclusive with the course, or if your company procedures insist on it being a separate booking, that's fine too. By staying on site and with other delegates, you get the opportunity to extend your practical sessions into the evening, and to spend time with other delegates learning more about them and their use of the subject being taught - ruby in the case of this article. Our rooms and hotel are designed with the technical business guest in mind - from a very broad broadband connection, through desks and plenty of power points in all rooms and bean-to-cup coffee on self service 24 hours a day, to large double beds in all rooms, a minimum age for guests of 14, and a key card and staffing system that lets you check in early or late, come and go as you please, and pay as a part of your course on a company account, or when you're with us.
The majority of delegates stay with us - but some don't; if you live within 30 minutes drive, have friends or relatives in the area, or a company policy that insists on a certain chain, or for any other reason, we're happy for you to attend the course at a rate that's 60 pounds per day (+VAT) lower.
There's a full schedule of all of our upcoming public courses [here]
, and at other times we're available for private courses at our centre, or on your site. (written 2010-07-11, updated 2010-07-15)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesR050 - Ruby - General 
Ruby Programming and Rails - 4 different courses in one - (2009-03-26) 
Learning PHP, Ruby, Lua and Python - upcoming courses - (2009-06-11) 
Learning to program in ... - (2009-11-15) 
Ruby on Rails - a sample application to teach you how - (2010-01-30) 
Ruby - training for automated testing users - (2010-06-25) 
Ruby training - some fresh examples for string handling applications - (2011-02-05) 
Ruby Documentation through rdoc - (2012-07-07) 
A bright new gem - updated Ruby training - (2014-09-16) 
Back in the saddle again - excellent open source course from Well House Consultants - (2015-11-26)Q102 - Choosing your language 
Learning to program in - (2004-10-07) 
Speaking all the languages - (2009-01-12) 
I have not programmed before, and need to learn - (2009-01-19) 
Learning to program in PHP, Python, Java or Lua ... - (2009-02-19) 
Admission - (2009-11-19) 
When should I use Java, Perl, PHP, or Python? - (2009-12-13) 
All the Cs ... and Java too - (2009-12-13) 
The same very simple program in many different programming languages - (2010-03-31) 
Rekeying a table - comparison in #Ruby #Perl and #Python - (2011-02-14) 
Python or Lua - which should I use / learn? - (2011-12-21) 
Ruby v Perl - a comparison example - (2012-02-21) 
Shell, Awk, Perl of Python? - (2012-06-14) 
Programming languages - what are the differences between them? - (2012-06-27)G908 - Well House Consultants - Language Comparisons 
FAQ - Perl or PHP - (2005-02-11) 
Ruby, C, Java and more - getting out of loops - (2008-03-19) 
Q - Should I use Perl or Python? - (2008-07-23) 
Books in the store in the USA - still a portent of the UK market to come? - (2010-05-08) 
Teaching Lua to a Perl advocate - (2010-09-06) 
What will we be teaching in six years? - (2010-10-17) 
Public and private courses - subjects available for 2011 - (2010-12-29)
Some other Articles
Old prices - what would the equivalent price have been in 1966?Contact Information for Melksham Oak Community SchoolA move towards the familyCycling in Melksham, and looking forwardRuby - how does it compare and where is it the right language?Relationships between Java classes - inheritance, packaging and othersChanging with weather and seasonsWriting a server in Java Fail Safe Error Handling in Java via ExceptionsMySQL and Java - connectivity past, present, and future thoughts