Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm a self-taught programmer. I've been learning RoR since October with varying intensity (sometimes all day, sometimes nothing for several weeks). Before that I knew only Java, but knew it pretty well. I've heard so much hype about RoR and how it's supposed to make you happy, productive, etc. So far it's only made me frustrated. I learned it out of the Agile book, and I suspect part of the difficulty might have to do with my not knowing JavaScript and CSS, and having only a shaky grasp of databases and HTML. But apparently it took me much longer to complete the project in the Agile book than other people, and I still don't remember much of it. There are some things about Rails that I just can't seem to get, e.g. when to use symbols and when NOT to, or how dynamic methods are called.

Recently I was given a small Rails assignment where I'm asked to make a small change to the interface. It's taken me around 25 hours and although I've made some progress in understanding the code, I still have no idea how to proceed. I can't even ask Stack Overflow because there is so much code I'll have to provide to give context.

So my question is in the title: is RoR supposed to take a long time to learn or am I just slow? Can it be that I've been learning from the wrong book? My learning style is such that I either understand nothing or understand everything, if that makes sense.

share|improve this question

closed as primarily opinion-based by gnat, MichaelT, Corbin March, Kilian Foth, Jimmy Hoffa Sep 10 '13 at 15:08

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Learning is Always Incremental,You understand a bit more each time you learn something.Problem solving is hard and requires patience (regardless of programming language expertise) sooner you accept it easier it will be for you to tackle them with a cool mind. –  Aditya P Mar 31 '11 at 5:27
    
I thought it did but its probably because its very convention oriented in my case. Very used to configuring a lot of the stuff that it does as convention. –  Rig Sep 9 '13 at 14:28
add comment

10 Answers

From your question, it's obvious that it is not only Rails you are trying to learn, but, at the same time you have to grasp concepts of web development, as well as databases and SQL. It's a huge task so please be patient.

On the other hand, with Rails you have no choice - you have to learn all three: M, V and C from MVC, all at the same time, but that would be the case with any MVC framework around, with Rails being among easiest, I'd say.

What you could do instead is to start with some simpler framework, such as Sinatra, until you get comfortable with basic concepts of Ruby and HTTP, and then slowly progress further towards richer presentation (views and CSS) and database-based models.

share|improve this answer
1  
Point of grammar: “both” implies two items in the list, whereas you've got three. –  Donal Fellows Jun 23 '11 at 19:35
    
@Donal: Thanks, understood, agreed and supposedly corrected. –  Mladen Jablanović Jun 24 '11 at 4:31
add comment

When you're learning Rails and your only background is Java, you're not just learning a new web framework. You're learning a new programming language as well, and one that is significantly different from Java.

It may help for you to learn Ruby first and then look at Rails and its conventions. Learning what Rails does and how it does it went a lot easier for me once I no longer had to struggle to understand Ruby and could read (and write) Rails code/templates.

I went through the Ruby on Rails Tutorial and found it very helpful. The tutorial book is free and there is a version for Rails 2.3 and 3.0. You might also find it helpful to read up on MVC (Model-View-Controller) and web development/page lifecycle in general.

share|improve this answer
add comment

Anita, I have had nearly the same experience as you. but think I now understand why it is so difficult to learn:

  • RoR is not one language, it is a wide collection of technologies, languages and techniques.
  • It is not like Java, C++ or other languages which have a logical structure
  • There is no one way to learn and no single book that can teach you (more on this later)
  • In my opinion, the community appears to have a somewhat "opinionated" attitude which is not as forgiving as other communities when learning. People regularly disagree on how things "should" be done. This comes from the top, from the guy who invented RoR
  • Testing is strongly encouraged to be a core part of development in most RoR lessons, and the testing languages are DSL's that can also add to the already high learning load.
  • There is not proper documentation for the language, only an API, some guides and whatever books you can find.
  • Some core methods and techniques are "automagical" and it is not clear how they work. For example, the has_secure_password methods.

I have been learning it for over a year now and here are some things that I think make it easier to learn, that I have come to from experience:

  • Attack it from several angles. When you have several books, tutorials and blogs to work from, this can "open" a way in for you to learn. A single book or blog on it's own can leave you "stuck".
  • Consider learning some HTML/CSS & Ruby. Not it all, just enough to get by, before you go too far in to RoR.
  • Take a course on RSpec (or similar testing methodology). The Codeschool one on RSpec is particularly good and this will stop you getting stuck in a RoR lesson because you cannot follow the testing.
  • Get about 3 books. Obie Fernandez "The Rails 3 Way" one is a must, used for reference when there is something you just don't get (not for cover to cover reading). The Agile one you mentioned just confused me. "Learing Rails 3" comes at things from a different direction and can help break down some issues you can't get from other tutorials.
  • Do a screencast or online learning course. Michael Hartl's tutorial is good, but very steep learning. I found that the books above, plus Codeschool course on RSpec, helped me get through it - but I still had to reach out to the author on a couple of small points.
  • Ask, ask, ask! There is a Ruby Forum, Rails Forum, IRC rooms and StackExchange etc - use them all, frequently!

Please don't give up - you are intelligent, but seem to have a learning style similar to me, and Rails is just very difficult to learn and not particularly well taught (completely) anywhere.

share|improve this answer
add comment

Maybe the issue is less ruby (and or rails) and more the fact that you only have a 'shaky grasp' of HTML/CSS/JavaScript and SQL and databases.

Rails is a 'full-stack framework'. If your prior programming experience is core Java with maybe some Swing, then there are a lot of concepts to learn at the same time.

If I were approaching this problem I would start with getting SQL and relational modelling nailed first (there are no browser layout issues with SQL!). When you are confident with the database layer, then play with ActiveRecord and learn how rails wraps tuples from the db.

The next step would be then to learn the controllers and routing and then the UI (html/javascript etc).

If you're going to do any web development using pretty much any web framework, you will need to understand SQL and relational modelling (even if you then choose the NoSQL route later).

share|improve this answer
add comment

I also come from a Java background, and I had a pretty difficult time learning Rails. I had all the same issues you mentioned. I found that watching railscasts.com helped out in the beginning. Just seeing how someone else did things helped me catch on and I then started doing things on my own. I haven't touched Rails since Rails 3 came out though.

share|improve this answer
add comment

Your words, "sometimes all day, sometimes nothing for several weeks" tell me all I need to know. If you're learning a new language AND framework (I assume that's what you're doing because you mention "Ruby on Rails" and not just "Ruby"), consistency pays off. I have found the only way I learn and retain concepts is to study around a half-hour per day, usually at the end of the day, just before bedtime. If i study more than a half-hour, I get fidgety and lose focus. If I study less, I don't retain what I've learned.

Eliminate distractions - that's my best advice. And study every single day of the week. Before you know it, things will start to fall into place.

I didn't see any follow-up posts, so I'm wondering how you've done. It's been 2 years, and that should certainly be plenty of time to learn to be a top-shelf web developer!

share|improve this answer
add comment

I've been leaning Ruby and Rails for about 8 months now. I came in with an understanding of HTML, XML, SQL. I still found the same problem as you, what worked for me was working on real problems, not just reading and hoping to understand. You might have to run a lot of small tests of pieces of code or the mvc to grasp a concept. Symbols are something I am still working on. Just take it one problem at a time and as you solve them, you will learn something needed to solve another problem in your project.

Answer: No, it is not supposed to have a steep learning curve, the curve is different depending on your background.

share|improve this answer
add comment

It can. I know I run into the "learning curve" every time I try to really sit down and focus on learning Rails (every few months for about 2+ years now). The problem is so many things in Rails change at a lightning-fast pace, and often the resources you find are outdated almost immediately.

My advice is to start off focusing on Ruby (the basics at least) and then Rails, so you aren't relying 100% on the Rails framework to handle everything for you. You should also brush up on HTML/CSS/Javascript for obvious reasons. Also from experience don't get caught up in the constant churn of the Rails world: If you can ignore all the newfangled things the Rails cognoscenti evangelize like Haml, Sass, RSpec/BDD, Cucumber, etc or you'll drown in having to learn BDD and RSpec to write your code, having to learn Haml and Sass (not hard but still, it's another thing to learn) to code the front-end, etc. Start as simple as possible.

share|improve this answer
add comment

There's a learning curve for any programming language. We're not really learning a language in the conventional way. Like C/C++ but when things come to the real picture we're also have to know the nuts and bolts of few technologies as well.

The best way to approach it, is to learn by doing. Take all the pains to do it yourself.Usually we read things but when it comes to the real picture we will stuck up with it. I am a native C++ programmer, I can also code in C#. I know that there lot of goodness in that language and library in an abstract point of view but many of the topics I just read and skipped. So if you ask me, I am actually handicapped.

I'm learning Django framework. The book I opted is interestingly simple and it create a social bookmark application. So it's like learning things from the scratch to the advanced level by doing a real hands on project. I suggest you to approach in that way as all we're learning it yourself.

share|improve this answer
add comment

The thing with RoR, particularly with second "R" is that most learning tutorials focus on teaching you the "code-monkey" style. Especially the Agile book, it's full of superficial "now we just do this, don't bother why" programming steps. Plus the fact they keep changing their paradigm - i.e. first they were touting the RJS as the way go, now all of a sudden, it's about UJS.

As some people here suggested, you might try learning the ins and outs of the Ruby language itself first, then moving on to the framework. If you still want to learn both together, I found this book named "Ruby for Rails" to be quite helpful.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.