RoR, Learning Ruby the Wrong Way

Posted by ryan
at 10:20 AM on Monday, October 31, 2005

Like most people that have recently jumped on the Ruby on Rails bandwagon (or at least given it a try), one of the first things I did was read the Ruby on Rails book and jump into developing my own web app. Well, here I am a few months later looking at my initial version of the app – and I am completely disappointed. The code is crap – it’s inelegant, somewhat procedural and completely un Ruby-like. And I blame it all on Ruby on Rails.

You see, in my rush to stay with the hype I’ve jumped into Ruby on Rails without spending due time learning Ruby. I suspect many people have done the same thing and what you will begin to see is a dilution of the talent in the Ruby community as more people come into the language the wrong way – through RoR.

It’s not a bad thing that Ruby on Rails has brought exposure to Ruby, but it’s obscuring the language itself which is unfortunate. In an attempt to rectify my mis-education I have taken a step back and am starting to explore the language before proceeding on with more RoR. Until developing with Ruby becomes intuitive to me I shouldn’t be working w/ RoR. I mean how many people successfully learn Java by learning Struts first?

My hope is that I am amongst the minority, but I suspect there are others who have made the same mistake as I have.

Comments

Leave a response

  1. Ryan DaigleMay 10, 2006 @ 05:04 PM
    Making mistakes is not the issue, the issue is that most people are trying to write a book before learning to read (figuratively, of course). You can probably do one without the other, but your results will not be ideal.
  2. Sean SmithMay 10, 2006 @ 05:04 PM
    This post strongly resonates with me. I am currently working on a largish Rails project. When I initially started out, I did not know any Ruby at all. Since then I have picked up Pragmatic Ruby and started doing some of my programming assignments in ruby (where it makes sense anyway). End result: refactoring a lot of uglier code because I am finding easier ways to do everything.
  3. KyleMay 10, 2006 @ 08:22 PM
    I absolutely agree. I'm struggling just to learn how to do things in Ruby, let alone make a lot of headway with Rails. Don't get me wrong, I love the promise of what Rails offers, I just can't seem to get my head wrapped around Ruby. I think my biggest problem is that I'm so used to Microsoft centric languages (eg: VB, C#, etc) that freeing my mind of the constraints of a typed language are slowing me down. I will continue to plug away though, I won't give up.
  4. Jim Van FleetMay 10, 2006 @ 09:07 PM
    How exactly does one learn without making mistakes? Don't you remember the Java 101 programs you wrote? The laundry room simulations? The doubly-linked lists? Now, in addition to learning the language, you're actually producing something useful. Uh, potentially.
  5. John WoodMay 10, 2006 @ 09:07 PM
    I went into Ruby through Rails as well, but I don't regret it at all - it means that I have a reason to be learning the language. I know I'd never have picked up Ruby without Rails being around. I've not really done any "pure" Ruby development yet, beyond a script to deliver queued e-mails from a mailing list app. I am however slowly working through the Ruby Quizes, which are helping me to see new ways of doing things.
  6. Glen TrudgetJanuary 20, 2007 @ 08:16 PM
    I have walked in those exact same foot steps. I have a project that I wanted to get up and running and rails appeared to the answer. I followed the screencasts, got the Agile book and quickly realised my mistake. Not learning ruby properly. As it turns out, I have got some code working, but am trying to understand the use of objects planning there design. To be more succinct, 'The Ruby Way'. It just seems that the use of objects and mixins Vs multiple inheritance is a little confusing for me at this moment in time. It is quite astounding though to write a section of code and marvel and the simplicty. A journey of a thousand steps.....
  7. Cameron SingeApril 25, 2007 @ 01:38 AM

    I think RubyonRails.com was great help to get the buzz out there, there are lot of short comings with most languages and beginners, a lot of people new to programming in general do things with out understanding the concept behind the process and with the amount of tutorials out there they can normal get things done with out learning a single bit of ruby. This is even worse in the drag and drop world of asp .net. At least with ruby you actually have to type. Ryan, at least you can look back on your code and realize how much you have come, it would be worse if you still after a while of rails had no idea of ruby and the power. What got me into rails to start with was Ruby for Rails by David Black. This was an excellent book, really designed for experience developers making the change. Gave you a great insight to ruby and then melded it with rails to bring the concepts together. Worth every cent.

  8. RyanOctober 18, 2007 @ 10:24 PM

    I did the exact same thing; however, I think those who can reflect on that very mistake are the ones who will take a step back and learn Ruby. And actually care about their code. I don’t think this hides the Ruby talent, but it definitely might hinder the speed at which the talent is exposed. And like you said, who’s to say Ruby would even be known if it weren’t for Rails.

    I completely see what you’re saying, but I think it all works out in the end.