• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Noulakaz

The blog of Avinash, Christina, Anya and Kyan Meetoo.

20150709-avinash-christina-anya-kyan
  • Home
  • About
  • People
    • Christina & Avinash Meetoo
    • Avinash Meetoo
    • Christina Meetoo
    • Anya Meetoo
    • Kyan Meetoo
  • General
    • News
    • Mauritius
    • Politics
    • Education
    • Business
    • Travel
  • Computing
    • Apple
    • Linux
    • LUGM
    • Programming
    • Web
    • Technology
    • Knowledge Seven
  • Entertainment
    • Music
    • Movies
    • Photography
    • Sports

The Ruby Programming Language

6 June 2006 By Avinash Meetoo 22 Comments

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.

Of course, there are a lot of tutorials online. I recommend Why’s (Poignant) Guide to Ruby.

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

Perfect!

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.

Ruby comes with a read-eval-print interpreter called irb which is very powerful. And there are at least two good IDE that I know of, one based on Eclipse called RDT and Eric3.

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.

Conclusion

The revolution is on. Learn Ruby and you’ll be happier. I have and I am ;-)

Filed Under: Education, Programming

Reader Interactions

Comments

  1. yan says

    6 June 2006 at 15:58

    Quelques presentations interessantes sur Django et RoR ici: http://www.djangoproject.com/snakesandrubies/

  2. Burito says

    6 June 2006 at 16:09

    Get rid of Java and C++?

    Perhaps you’re one of those open-source enthusiasts flouting again and again the merits of such types of languages. Or is it the fact that Java’s free but not open source and that C++ well dominates the scientific software market (not open source either)?

    Java and C++ are very demanding when it comes to teaching: they’re not easy to master by standards for the beginner but it instills in him the concept of objects and GUIs very early . Does that mean the guy does not think functionally? I don’t think so. By the way, it’s better for them to dive straight into the popular languages of the moment which are Visual Basic, C++ and of course the unavoidable Java. It’s all about a question of market needs.The trends in modern computing justified the inclusion of C++ and then Java in academia.

    Bear in mind: Java’s hard to displace. C++’s here to stay for long years to come. Let’s all see how things play out in academia in the Western part of this world…

  3. Olivier says

    7 June 2006 at 05:55

    I agree. Ruby IS beautiful. And it makes programming fun again!
    I’m working on a Ruby project currently, trying to put together a path-finding software for a public transit system.

    It is very intuitive, and metaprogramming just blows my mind.

    Good continuation!

  4. Javed Mandary says

    7 June 2006 at 11:01

    Come on now one can get rid of JAVA .. JAVA rules :P

  5. Kailash Balnac says

    7 June 2006 at 13:28

    Hi Avinash

    Am into learning RoR myself and am about to create my own application.

    I just love migrations ! :)

    Hope we can share our experiences..

    Cheers
    Kailash

  6. avinash says

    7 June 2006 at 21:16

    To Burito and Javed:

    I’ve been teaching for some years now and I really think that it’s much better to introduce programming using Ruby (or Python or Scheme or Haskell…) instead of C++ and Java.

    Of course, the student will afterwards need to learn Java (no real need for C++ IMHO) because of industry demands. One very important consequence of having learnt (and understood) basic programming using Ruby is that the student will be better equipped to understand advanced Java and tools (like Design Patterns & Frameworks, Refactoring, Unit Testing, Object-Relational Mapping, Version Control, etc) instead of simply:

    public class Hello
    {
        public static void main(String [] args)
        {
            System.out.println(“Hello world!”);
        }
    }

    To Yan, Olivier and Kailash:

    Yeah! We have all seen the light. Now let’s build great software ;-)

  7. Raj says

    14 June 2006 at 20:34

    Hi

    I’ve already downloaded Ruby and intend to have a look soon. One thing I’d like to know though and it applies to all interprated languages such as Perl, Python and Ruby.

    How to you deploy your apps and utilities without the end user tampering with the code. I know there’s a compiler for Per from ActiveState but what about Ruby and Python. Any tool yet available to may be just encode the source?

    Deploying the full runtimes of these languages of end users would be quite risky (you don’t want your end users trying Hello world on their own …), is there any way to just deploy the runtimes?

    I know I can Google for these answers but I thought I’d have your views here.

    Cheers

    Raj

  8. avinash says

    15 June 2006 at 14:45

    Hi Raj,

    All intepreted languages obviously require the interpreter to be installed on the client. And as we all know, interpreters require the source code.

    If you don’t want people to get access to your source code (you, naughty boy ;-) ), you have IMHO two possibilities:

    (1) Use a compiler! RubyScript2Exe seems very promissing.

    (2) Use a code obfuscator. Here is what Google says about obfuscators. Notice that there is still a lot of work to do.

    A simpler solution is to release your software as open source ;-)

  9. Anonymous says

    24 June 2006 at 15:53

    Thanks Avinash. Its not a question of sharing my source code :-), its more about end users in a production environment tampering with the source code of applications that are vital to the proper running of the company. I’ll give the two links a try.

  10. Ketwaroo D. Yaasir says

    29 November 2006 at 20:09

    oh and if you are stuck on windows(all hell breaks loose at the mention of the forbidden word), there’s an IDE(work in progress) for windows(Avinash hurls a table at me)
    Linkage: http://www.sapphiresteel.com/

    and it’s developed by… OMG! Huw Collingbourne! The same guy who created “The Golden Wombat of Destiny”.

    Ok, it’s probably that useful.
    anywho, the one thing i like about ruby are the talking foxes. yep. that and the star monkeys. all 55,000 of em. (and i’m still on chapter 1)

  11. hrubesh says

    7 February 2007 at 00:15

    Pointers and objects. ‘The address of my object’ is the phrase that keeps me running with programming, vb.net actually sucks. c# is ok, c++ rocks though i last programmed in c++ two years ago, i love java for it brought me in this world of objects.
    Someoned mentionned about artists and programming: yeah totally true, Programming is an art, yet not everybody is an artist, I also sing in the bathroom.
    I’ve got something for all of you getting into programming, I’ll rather call it coding at this stage, bcs, degrees, diplomas, certifications, whichever the way, it leads to the same direction, the driver is you. when i was a tutor, I interpreted men continuously asking for everything as baby asking to be spoon fed. Anything that is done beautifully is pure creation of the mind, supported by eager to seek and understand.
    Extreme programming: I actually forgot the methodologies if this is what they are called., different projects and environment require different approaches, i saw myself doing xp when i programmed in vb.net – okay call it stupid for the programming language does not necessarily determine that, yet i am serious. It was like learning how to eat with a spoon and then comes a princess feeding you with a golden kalchoul. Too many wizards and options in an ilist that generate code is not a good thing.
    My opinion, hrub.

  12. Claris says

    4 March 2007 at 19:01

    Hi Avinash, are you aware of any good FREE Ruby IDE running on Windows?

  13. avinash says

    4 March 2007 at 19:25

    Try

    * RDT
    * Plasmacode
    * RaiRails

  14. curiousEngine says

    30 March 2007 at 21:47

    hmmmmmmm, i would like to see your response to the following article:
    http://adamconnor.org/?p=63#comments

  15. avinash says

    31 March 2007 at 01:08

    Adam Connor loves LISP and therefore finds anything else less perfect. This is understandable as LISP is really beautiful (I am personally a big fan of Scheme).

    That’s all.

  16. Satish Talim says

    14 April 2007 at 10:35

    For those interested, I have my online Ruby Study Notes here (the way I learned Ruby) –
    http://rubylearning.com/

  17. Fadilnet says

    1 May 2007 at 10:47

    Python pwns Ruby! – that was my initial impression.
    I had to make a choice and I picked Python. hmm..I think I’ll check out Ruby. I just hope not to be modded down @ /. after saying “I am for Ruby” lol.

  18. Luke says

    20 May 2007 at 00:15

    I have a good ruby tutorial. Actually, I will be converting to an online ruby programming book.

    http://www.meshplex.org/wiki/Ruby/Ruby_on_Rails_programming_tutorials

  19. avinash says

    20 May 2007 at 15:30

    Nice tutorial Luke!

    Keep be informed about your progress if you can.

  20. Jordi says

    15 October 2007 at 15:59

    I don’t think we should be so hasty in wanting to replace C++ and Java, because they are so deeply rooted in the industry. I don’t raelly know a lot about Ruby, but if it’s such a fine language, it might replace them, but it should be done with care rather than haste.

    Also, while things are the way they are, I think that a language like this might indeed be a good one for teaching programming. However, I think that a language like C or C++ should also be taught to teach about how a computer works.

  21. avinash says

    15 October 2007 at 18:08

    Hi Jordi,

    In fact, I was telling my colleagues the other day that Ruby would be a fine programming language to teach (high-level) programming and C would be extremely good to teach how a computer works.

    For me, C is the new assembly and Ruby is the new Pascal and both are important…

Trackbacks

  1. Avinash Meetoo: Blog » Blog Archive » Three great technical books says:
    14 June 2007 at 20:04

    […] programming language as it allows the programmer to solve complex problems very easily. I’ve already written about my fascination with that programming language. The metaprogramming aspects of Ruby will blow […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Our Personal Websites

Avinash Meetoo
Christina Meetoo
Anya Meetoo
Kyan Meetoo

Related Posts

I don’t know any programming language

Try many programming languages

Fashionable programming languages

Random Posts

When kids (and parents) become criminals

My favourite characters from Orange Is the New Black

Ma'am and David Budd in Bodyguard

Recent Comments

  • Avinash Meetoo on Teachers of RCC around 1989-1990
  • Vishal on Teachers of RCC around 1989-1990
  • Glenn Mckay on The five biggest problems in Mauritius

Archives

  • December 2022 (1)
  • November 2022 (1)
  • October 2022 (4)
  • August 2022 (3)
  • July 2022 (3)
  • June 2022 (5)
  • May 2022 (5)
  • January 2022 (3)
  • December 2021 (2)
  • November 2021 (1)
  • October 2021 (1)
  • September 2021 (4)
  • August 2021 (2)
  • July 2021 (14)
  • May 2021 (2)
  • April 2021 (4)
  • March 2021 (9)
  • February 2021 (2)
  • January 2021 (1)
  • October 2020 (1)
  • September 2020 (1)
  • August 2020 (2)
  • July 2020 (5)
  • June 2020 (3)
  • May 2020 (5)
  • April 2020 (6)
  • March 2020 (2)
  • February 2020 (2)
  • January 2020 (2)
  • October 2019 (1)
  • September 2019 (2)
  • July 2019 (2)
  • June 2019 (1)
  • May 2019 (3)
  • April 2019 (2)
  • March 2019 (1)
  • February 2019 (1)
  • January 2019 (3)
  • December 2018 (1)
  • October 2018 (3)
  • August 2018 (2)
  • July 2018 (2)
  • June 2018 (1)
  • May 2018 (1)
  • April 2018 (1)
  • February 2018 (1)
  • December 2017 (1)
  • October 2017 (1)
  • September 2017 (1)
  • August 2017 (1)
  • July 2017 (1)
  • May 2017 (4)
  • April 2017 (3)
  • March 2017 (4)
  • February 2017 (5)
  • January 2017 (3)
  • October 2016 (1)
  • September 2016 (1)
  • August 2016 (4)
  • July 2016 (1)
  • June 2016 (1)
  • March 2016 (3)
  • February 2016 (3)
  • January 2016 (1)
  • December 2015 (1)
  • November 2015 (2)
  • September 2015 (1)
  • August 2015 (3)
  • March 2015 (1)
  • December 2014 (1)
  • November 2014 (4)
  • October 2014 (1)
  • March 2014 (2)
  • February 2014 (3)
  • December 2013 (1)
  • October 2013 (1)
  • September 2013 (1)
  • August 2013 (1)
  • July 2013 (1)
  • June 2013 (2)
  • May 2013 (1)
  • March 2013 (3)
  • January 2013 (2)
  • December 2012 (3)
  • November 2012 (4)
  • September 2012 (3)
  • August 2012 (2)
  • July 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (2)
  • February 2012 (1)
  • January 2012 (4)
  • December 2011 (2)
  • November 2011 (1)
  • October 2011 (4)
  • September 2011 (2)
  • August 2011 (1)
  • July 2011 (2)
  • June 2011 (4)
  • April 2011 (7)
  • March 2011 (2)
  • February 2011 (1)
  • January 2011 (3)
  • November 2010 (3)
  • October 2010 (1)
  • September 2010 (2)
  • August 2010 (4)
  • July 2010 (2)
  • June 2010 (1)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (5)
  • December 2009 (2)
  • November 2009 (3)
  • October 2009 (1)
  • September 2009 (5)
  • August 2009 (3)
  • July 2009 (1)
  • June 2009 (3)
  • May 2009 (2)
  • April 2009 (7)
  • March 2009 (12)
  • February 2009 (10)
  • January 2009 (5)
  • December 2008 (4)
  • November 2008 (11)
  • October 2008 (6)
  • September 2008 (7)
  • August 2008 (3)
  • July 2008 (8)
  • June 2008 (6)
  • May 2008 (5)
  • April 2008 (7)
  • March 2008 (6)
  • February 2008 (3)
  • January 2008 (6)
  • December 2007 (11)
  • November 2007 (10)
  • October 2007 (7)
  • September 2007 (9)
  • August 2007 (3)
  • July 2007 (7)
  • June 2007 (8)
  • May 2007 (14)
  • April 2007 (11)
  • March 2007 (18)
  • February 2007 (14)
  • January 2007 (15)
  • December 2006 (16)
  • November 2006 (10)
  • October 2006 (7)
  • September 2006 (8)
  • August 2006 (8)
  • July 2006 (6)
  • June 2006 (4)
  • May 2006 (13)
  • April 2006 (10)
  • March 2006 (11)
  • February 2006 (7)
  • January 2006 (14)
  • December 2005 (8)
  • November 2005 (6)
  • October 2005 (7)
  • September 2005 (2)
  • August 2005 (6)
  • July 2005 (2)
  • June 2005 (6)
  • May 2005 (15)
  • April 2005 (12)
  • March 2005 (3)
  • February 2005 (8)
  • January 2005 (3)
  • December 2004 (1)
  • November 2004 (2)
  • October 2004 (2)
  • September 2004 (3)
  • August 2004 (3)
  • July 2004 (3)
  • June 2004 (3)
  • May 2004 (6)
  • April 2004 (10)
  • March 2004 (12)
Creative Commons License This work is licensed by Avinash Meetoo under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License.