Ruby as First Language

Discussion in 'Ruby' started by woodyee, Feb 23, 2006.

  1. woodyee

    woodyee Guest

    Hi! I'm interested in getting opinions on Ruby as a first language. For
    example, how it compares to python/perl/basic/etc as a first language.
    My goals are to learn the basics of a language, then delve into network
    programming, and then learn how to interact with the operating system
    programaticallly. Will Ruby help me achieve this goal? Will Ruby enable
    me to transition to other languages (ex., C/Assembly/etc)? Thanks in
    advance!

    WY
     
    woodyee, Feb 23, 2006
    #1
    1. Advertising

  2. woodyee

    Guest

    Hi --

    On Thu, 23 Feb 2006, woodyee wrote:

    > Hi! I'm interested in getting opinions on Ruby as a first language. For
    > example, how it compares to python/perl/basic/etc as a first language.
    > My goals are to learn the basics of a language, then delve into network
    > programming, and then learn how to interact with the operating system
    > programaticallly. Will Ruby help me achieve this goal?


    Yes, and then some.

    > Will Ruby enable me to transition to other languages (ex.,
    > C/Assembly/etc)? Thanks in advance!


    It won't cause you to know those other languages of course, but it
    will enable you to learn them in the sense that it won't stop you :)
    And C actually connects up naturally with Ruby, since Ruby is written
    in C and you can write C extensions for Ruby.

    Have you seen this book?

    http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html


    David

    --
    David A. Black ()
    Ruby Power and Light (http://www.rubypowerandlight.com)

    "Ruby for Rails" chapters now available
    from Manning Early Access Program! http://www.manning.com/books/black
     
    , Feb 23, 2006
    #2
    1. Advertising

  3. woodyee wrote:
    > Hi! I'm interested in getting opinions on Ruby as a first language.
    > For example, how it compares to python/perl/basic/etc as a first
    > language. My goals are to learn the basics of a language, then delve
    > into network programming, and then learn how to interact with the
    > operating system programaticallly. Will Ruby help me achieve this
    > goal? Will Ruby enable me to transition to other languages (ex.,
    > C/Assembly/etc)? Thanks in advance!


    Ruby vs. Perl: much cleaner syntax and less typing.

    Ruby vs. Basic: although there might be Basic dialects around that have
    evolved from the ridiculous line number + GOTO I'd rather not consider it.

    Ruby vs. Python: can't comment on that.

    Ruby takes away a lot of the nifty details that you would have to deal
    with in C or C++ (memory management etc.) or Perl (how many $'s do I need
    here?). OTOH there is no *direct* access to system libs (as from C for
    example). For that you would have to write a C extension. Still, I think
    to initially learn to develop software Ruby is a pretty good choice.

    Kind regards

    robert
     
    Robert Klemme, Feb 23, 2006
    #3
  4. --=-TpE+hqRiu7EohiA+v2LD
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit

    On Thu, 2006-02-23 at 23:14 +0900, wrote:

    > Have you seen this book?
    >
    > http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html


    I wish I had that book when I first started programming. That book
    changed my way of thinking about code more than any other book! Be
    warned....If you learn ruby first then you'll hate the syntax of just
    about every other language!

    Charlie Bowman
    recentrambles.com

    --=-TpE+hqRiu7EohiA+v2LD--
     
    Charlie Bowman, Feb 23, 2006
    #4
  5. woodyee

    Dave Burt Guest

    Robert Klemme wrote:
    > OTOH there is no *direct* access to system libs (as from C for
    > example). For that you would have to write a C extension. Still, I think
    > to initially learn to develop software Ruby is a pretty good choice.


    Just to knock down your only negative point a little, Robert, there is DL,
    which makes accessing C libraries about equal in pain to doing it in C, no?

    Me, I'm all for learning Ruby as a first language. My first language was
    Basic, and I do reckon that it probably doesn't matter too much what you
    pick, but an important factor is being able to actually produce something
    cool/fun/useful as you go. (Games, for instance.) Learning a second language
    will be significantly easier after you've learnt one already, almost
    regardless of the language.

    Ruby's productive, flexible, and crosses paradigms other languages are built
    around. Perhaps it's less simple than, say, Java or Basic, but I think it
    more than makes up for it in the
    being-able-to-get-something-done-quickly-and-easily department. The
    paradigm-crossingness of it may mean it's easier to pick up a wider range of
    languages after you've mastered Ruby; it's a bit like Lisp, a bit like
    Basic, a bit like Java.

    Choose Ruby.

    Cheers,
    Dave
     
    Dave Burt, Feb 23, 2006
    #5
  6. woodyee

    Gene Tani Guest

    Robert Klemme wrote:
    > woodyee wrote:


    > Ruby vs. Perl: much cleaner syntax and less typing.
    >
    >
    > Ruby vs. Python: can't comment on that.
    >


    Perl has gotten a bad rap, well-written perl is pretty easy to follow.
    Also perl's kind of hard to avoid, in certain circles, lots of times i
    start somethign by reading CPAN modules, lots of OReilly books have
    sample code in perl, etc. so at least being able to read perl code is
    helpful

    python:
    http://mail.python.org/pipermail/python-list/2005-October/305692.html

    ruby has a couple really nice IDEs, komodo and Arachno, which make
    learning as painless as possible, popping up method names for you to
    click on when the IDE can determine what object instance you're talking
    about. (Wing IDE for python is also really nice).
     
    Gene Tani, Feb 23, 2006
    #6
  7. woodyee

    Giacecco Guest

    Hi Woodyee, how important is this information according to your
    profession?

    If you're doing this for yourself, Ruby will be a great language to
    learn and use.

    But if you are doing this to revise your position in the job market,
    none of the languages you listed will give you much advantage: it's
    Java and/or C# to be obligatory these days in any curriculum.

    I am certain that Ruby will grow a lot in the next years and things
    will change, but if you have to decide today, and it is for your job,
    Ruby is still too weak.

    Gianfranco
     
    Giacecco, Feb 23, 2006
    #7
  8. Gene Tani wrote:
    > Perl has gotten a bad rap, well-written perl is pretty easy to follow.
    > Also perl's kind of hard to avoid, in certain circles, lots of times i
    > start somethign by reading CPAN modules, lots of OReilly books have
    > sample code in perl, etc. so at least being able to read perl code is
    > helpful


    Yes, but this thread is about "first language". I don't know how Perl's
    OO has changed since Perl 5 but then it was horrible. Certainly nothing
    I'd recommend for learning OO - I'd definitely choose even C++ and of
    course Java / C# over Perl for OO.

    Kind regards

    robert
     
    Robert Klemme, Feb 23, 2006
    #8
  9. Dave Burt wrote:
    > Robert Klemme wrote:
    >> OTOH there is no *direct* access to system libs (as from C for
    >> example). For that you would have to write a C extension. Still, I
    >> think to initially learn to develop software Ruby is a pretty good
    >> choice.

    >
    > Just to knock down your only negative point a little, Robert, there
    > is DL, which makes accessing C libraries about equal in pain to doing
    > it in C, no?


    I forgot that. Yeah, with DL it seems reasonably easy. Good point!

    > Me, I'm all for learning Ruby as a first language. My first language
    > was Basic, and I do reckon that it probably doesn't matter too much
    > what you pick, but an important factor is being able to actually
    > produce something cool/fun/useful as you go. (Games, for instance.)


    I wouldn't go that far. For example, at the time I was using BASIC there
    were no functions and you had to work with GOSUB and GOTO for
    modularization; for me this is a major drawback. I rather recommend to
    use PASCAL (no kidding) over ancient BASIC's. I know current BASIC
    dialects are much better - but then again, there are so many of them...

    > Learning a second language will be significantly easier after you've
    > learnt one already, almost regardless of the language.


    I'm not sure; it certainly helps, but I guess the paradigmatic distance
    (TM) of the second language makes a difference. I guess it's easier to go
    from C++ to SmallTalk (both OO) than from Lisp to BASIC...

    > Choose Ruby.


    Definitively! :)

    robert
     
    Robert Klemme, Feb 23, 2006
    #9
  10. woodyee

    James H. Guest

    But more importantly, *should* Ruby be a first language taught, period?
    I tend to think no.

    C allows you to have a base understanding of all the technical aspects
    of programming, like memory management, procedural thought, and the
    basics of writing methods. These are generally good skills to have,
    and you'll find that you use them everywhere. C is a lot like latin,
    insofar that it's not changing much, and is used to communicate ideas.
    I also think it's a little more "native" to initial human understanding
    about programming. People tend to think of it as a linear, or
    semi-cyclical set of instructions. In that regard, I think C is a good
    way to enter the scene.

    The thought process overhead in object oriented programming is quite
    extensive. It takes a long time to really get in the mode. If you
    learn somethings about C, and get a basic grasp before moving on to
    Ruby, you'll understand and have a better appreciation for some of the
    "magic" going on behind the scenes, as well as opening other avenues
    for your programming career. Doubly, it takes a long time to learn how
    to think in objects -- something I admit, myself, to just be getting
    the hang of. When you start reading about design patterns, you realize
    the complexity, and beauty that OOP allows you.

    If the original poster decides to forgo C for Ruby in the time being, I
    hope the poster eventually returns to it, if even just to have a base
    understanding of what's going on beneath the scenes.
     
    James H., Feb 23, 2006
    #10
  11. James H. wrote:
    > But more importantly, *should* Ruby be a first language taught,
    > period? I tend to think no.


    That's precisely the point where we disagree. :)

    > C allows you to have a base understanding of all the technical aspects
    > of programming, like memory management, procedural thought, and the
    > basics of writing methods.


    It won't teach you anything about methods because there are none in C. :)

    > These are generally good skills to have,
    > and you'll find that you use them everywhere. C is a lot like latin,
    > insofar that it's not changing much, and is used to communicate ideas.


    I use UML to communicate ideas - or Ruby - but certainly not C. I don't
    think it's suited for this at all. There's too much overhead.

    > I also think it's a little more "native" to initial human
    > understanding about programming. People tend to think of it as a
    > linear, or semi-cyclical set of instructions. In that regard, I
    > think C is a good way to enter the scene.


    Even if you want to start with a strictly procedural language I'd strongly
    favour Pascal over C exactly because those detailed technical aspects are
    *not* present there. Getting memory allocation and pointer handling right
    is difficult for a novice and prevents early successes. IMHO it's far
    more important to grasp abstract concepts that are common to many
    programming languages (like abstraction, modularization, data structures)
    than to know how to not shoot yourself in the foot when doing *ptr++.

    > The thought process overhead in object oriented programming is quite
    > extensive. It takes a long time to really get in the mode. If you
    > learn somethings about C, and get a basic grasp before moving on to
    > Ruby, you'll understand and have a better appreciation for some of the
    > "magic" going on behind the scenes, as well as opening other avenues
    > for your programming career. Doubly, it takes a long time to learn
    > how to think in objects -- something I admit, myself, to just be
    > getting the hang of. When you start reading about design patterns,
    > you realize the complexity, and beauty that OOP allows you.


    Although I agree with your last paragraph (that OO is more difficult to
    grasp than the procedural paradigma) I strongly disagree with what you
    state in the first paragraph. If you like to, you can use Ruby
    procedurally most of the time.

    Kind regards

    robert
     
    Robert Klemme, Feb 23, 2006
    #11
  12. woodyee

    James H. Guest

    > > C allows you to have a base understanding of all the technical aspects
    > > of programming, like memory management, procedural thought, and the
    > > basics of writing methods.

    >
    > It won't teach you anything about methods because there are none in C. :)


    Ah, yes. I have a bad habit of using procedure and method
    interchangably =/

    Interesting point about Pascal though, and when I read your words I
    find myself nodding my head in agreement that it is definitely more
    important to understand the concepts found amongst the majority of
    programming languages than the specifics of one (e.g. pointers -- one
    of the great evils of C).

    Okay, how about this: "If you decide to use Ruby as a first language,
    it would be wise to learn C later down the road given it's widespread
    usage". Does that make more sense?

    James
     
    James H., Feb 23, 2006
    #12
  13. Re: [OT] Ruby as First Language

    On Feb 23, 2006, at 8:33 AM, Robert Klemme wrote:

    > Even if you want to start with a strictly procedural language I'd
    > strongly
    > favour Pascal over C exactly because those detailed technical
    > aspects are
    > *not* present there.


    Object and Turbo Pascal took the language nicely into the realm of
    OO. It's still a great way to learn how to program - and even after
    all of these years, I still can't understand why nearly all major
    Universities (in the US anyway) have abandoned it completely.

    --Steve
     
    Stephen Waits, Feb 23, 2006
    #13
  14. "James H." <> writes:

    > it would be wise to learn C later down the road given it's widespread
    > usage". Does that make more sense?


    Is the "C widespread usage" still true, by the way? I admit it is
    still necessary to master C to write extension modules or low level
    software, but should this application domain called "widespread" ?

    --
    Eric Jacoboni, ne il y a 1444155794 secondes
     
    Eric Jacoboni, Feb 23, 2006
    #14
  15. James H. wrote:
    >>> C allows you to have a base understanding of all the technical
    >>> aspects of programming, like memory management, procedural thought,
    >>> and the basics of writing methods.

    >>
    >> It won't teach you anything about methods because there are none in
    >> C. :)

    >
    > Ah, yes. I have a bad habit of using procedure and method
    > interchangably =/
    >
    > Interesting point about Pascal though, and when I read your words I
    > find myself nodding my head in agreement that it is definitely more
    > important to understand the concepts found amongst the majority of
    > programming languages than the specifics of one (e.g. pointers -- one
    > of the great evils of C).


    :)))

    > Okay, how about this: "If you decide to use Ruby as a first language,
    > it would be wise to learn C later down the road given it's widespread
    > usage". Does that make more sense?


    Certainly! C might not be for everyone but if mastered certainly helps
    understanding basic issues about how programs, processors and operating
    systems interact.

    Kind regards

    robert
     
    Robert Klemme, Feb 23, 2006
    #15
  16. woodyee

    James H. Guest

    The OS you're using is likely written in a combination of C and C++ ;)
    There are tonnes of legacy systems written in C too. You can't forget
    those.
     
    James H., Feb 23, 2006
    #16
  17. --=-F83GHtiTbb9vg7hTJQoC
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit

    That's such a good point. I'm a self taught programmer and my first
    language was perl. Without anyone to point me in the right direction, I
    developed some pretty bad habbits. You can still pick up bad habbits
    using ruby, but it's less likely.

    charlie bowman
    recentrambles.com

    On Fri, 2006-02-24 at 02:34 +0900, pat eyler wrote:

    > Ruby makes sense as a first language because it allows
    > nearly instant gratification, encourages good habits, and provides a
    > good bridge to other things.


    --=-F83GHtiTbb9vg7hTJQoC--
     
    Charlie Bowman, Feb 23, 2006
    #17
  18. woodyee

    Glen Guest

    James H. wrote:
    > Doubly, it takes a long time to learn how
    > to think in objects -- something I admit, myself, to just be getting
    > the hang of.


    I think there are two flaws in your argument.

    1) Your experience does not set the standard for everyone else.

    2) I assume you started with a language similar to C (or at least
    procedural), and then learned OO. Because it took you a long time to
    fully grasp OO, you think it is best to start with a procedural
    language. ?? Is there no possibility that it took you longer to grasp
    OO *because* you started with a procedural language?

    I was taught both procedural and OO in college, and did not experience
    the difficulties you mention.

    Alan Shalloway, one of the authors of "Design Patterns Explained"
    argues that avoiding design patterns makes it harder to learn them
    object-oriented design. Instead, he introduces his students to
    object-oriented design *and* design patterns and has found the students
    learn object-oriented design faster.

    Quote from preface in book:
    "The design pattern books I had been reading and the design pattern
    experts I had been talking to were saying that you really needed to
    have a good grounding in object-oriented design before embarking on a
    study of design patterns. Nevertheless, I saw, with my own eyes,
    students who learned object-oriented design concurrently with design
    patterns learned object-oriented design faster than those just studying
    object-oriented design. They even seemed to learn design patterns at
    almost the same rate as experienced object-oriented practitioners."

    If experience can be used to draw conclusions, I would trust his
    experience with a larger test set over yours.

    --
    Glen
     
    Glen, Feb 23, 2006
    #18
  19. woodyee

    Bill Kelly Guest

    From: "Giacecco" <>
    >
    > I am certain that Ruby will grow a lot in the next years and things
    > will change, but if you have to decide today, and it is for your job,
    > Ruby is still too weak.


    It should be noted that many people here are using ruby for our jobs.

    :)

    It's true Ruby isn't suited to every task, but it's working for a lot
    of us.


    Regards,

    Bill
     
    Bill Kelly, Feb 23, 2006
    #19
  20. --=-hj6XWEFNCfacc0QzcWDS
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit

    If you plan on working on the web, you should definitely make sure that
    ruby is in your tool belt.

    On Fri, 2006-02-24 at 04:04 +0900, Bill Kelly wrote:

    > From: "Giacecco" <>
    > >
    > > I am certain that Ruby will grow a lot in the next years and things
    > > will change, but if you have to decide today, and it is for your job,
    > > Ruby is still too weak.

    >
    > It should be noted that many people here are using ruby for our jobs.
    >
    > :)
    >
    > It's true Ruby isn't suited to every task, but it's working for a lot
    > of us.
    >
    >
    > Regards,
    >
    > Bill
    >
    >
    >
    >
    >


    --=-hj6XWEFNCfacc0QzcWDS--
     
    Charlie Bowman, Feb 23, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed
    Replies:
    24
    Views:
    1,026
    Dimitri Maziuk
    Mar 27, 2006
  2. DaveInSidney
    Replies:
    0
    Views:
    436
    DaveInSidney
    May 9, 2005
  3. Martin DeMello

    Ruby as a first language

    Martin DeMello, Aug 13, 2004, in forum: Ruby
    Replies:
    8
    Views:
    148
    Jason Lee
    Aug 18, 2004
  4. MRH
    Replies:
    62
    Views:
    682
  5. Andrew S. Townley
    Replies:
    0
    Views:
    327
    Andrew S. Townley
    Apr 13, 2009
Loading...

Share This Page