In This Chapter
Exploring Ruby fundamentals
Controlling flow in a Ruby program
Using Ruby collections
I don't like to make fun of people (at least not in print). But several years ago I was conversing with someone I didn't like. We were talking about computer programming languages. He was finishing a course on C language fundamentals, and he wanted me to give him some advice. Which programming language should he learn next?
I thought for a moment. Then I asked him which languages he eventually wanted to learn. “All of them,” he replied.
Sorry, no one can learn all computer programming languages. The world has thousands of computer languages. You can narrow down the list. Depending on how you count, at least 20 of these languages are “major” computer languages. But no one becomes expert in all 20 of them.
I would have advised this fellow to learn Ruby, but unfortunately, I couldn't. The year was 1982, and Ruby hadn't yet been invented. The Ruby programming language dates back to around 1993. The brainchild of Yukihiro “Matz” Matsumoto, this language crept onto the scene the way most one‐person efforts do. Some people read about the language, and a few people became excited about it. By 2004, when Ruby on Rails came along, many computer professionals had heard the name Ruby, but most didn't know much about the language.
But as time goes on, Ruby is becoming more and more popular. Rails has pushed Ruby into the computer programming limelight. And with Ruby, people ...