Live data from Hacker News

Rails Is Not For Beginners

horsesaysinternet.com

41–50 of 79 posts

Re: Rails Is Not For Beginners

#41
post #27

If you optimize a framework for beginners, you're optimizing for learnability. That's great for the first few days or even weeks of learning. But once you're past that, it's not so great. What you care more about is the usability of the thing once you know it. There are plenty of cases where learnability and usability are in conflict. Letting learnability win is a short-term relief. If you on the other hand optimize…

I personally went from PHP > RUBY > Ruby(cgi) > Sinatra > Rails, And i think the journey was great because sometimes we need to learn and work in really bad technologies to appreciate something as good as rails.

We should strive to make the learning curve more enjoyable rather than making it beginner friendly, The only way i know of doing that is to show evolution of technologies, there merits and de-merits and why or how we have reached where we have reached and why we took the technological decisions that we took. How we reached to rails from PHP or cgi. How treacherous the journey was.

Rails just has too much magic and higher level of abstraction built in that it easier for beginners, But when you want to do something really great you need to look under the hood. That is RUBY, Rack and HTTP.

Because sooner or later you will realize that a web app is nothing more than HTML/CSS/Javascript so you know the nuts and bolts of the underlying infrastructure the better.

I think learning something as basic as sinatra is much better than learning rails , so that you have some idea of the underlying stuff and then when you move to rails you can learn more of rails by just looking at its code.

Personally i learnt a great deal from looking at rails source than looking at a tutorial. But surely it would be a daunting task for a noob. Also learning Rack comes naturally with sinatra. and as you look at Rack, sooner or later you would figure out how to write a cgi adapter for your rack app.

Then Comes rails which saves you from all the mundane task you were doing developing in sinatra and much more.

This way you would have a better understanding and appreciation for rails and all the stuff that you don't have to do or write in rails.

At the same time you will have a better understanding of how a particular feature is working in rails. This improves your debugging skills because you know where to look for when something goes wrong.

Finally Ruby is the elephant in the room so you need to be better at ruby to become excellent at rails, Which often is shadowed by the magic that rails provides, so learning RUBY first is more important than rails, sinatra or anything.

Re: Rails Is Not For Beginners

#42
post #34

Earlier quoted context omitted.

I beg to disagree. Learnability and usability can get along together. Good examples are Jquery and Cakephp. Both have executed this very well from producing well written and well maintained documentation then add a good amount of plugins that is contributed by the community. For example, in cakephp we have this cook book http://book.cakephp.org which the quality of the content surpasses every cakephp book on amazon.…

The problem with cakephp is that every book written on this subject surpasses the quality of the framework itself. cakephp is easy to learn, but for me it's unusable in the long run. Easy stuff get's even easier, hard stuff get's harder. That's exactly what David meant. If you trade everything for learnability, it's not usable.

That sums up my experience with cakePHP too. I don't know what's happened with this framework in the last couple of years, but when I was first learning Rails and enjoying it, I used cakePHP for a big project because I knew PHP well, and didn't yet feel comfortable with committing to using Rails for it.

That was a decision I regretted many times. The hoops I had to jump through to deal with complex database queries were ridiculous. The difference in quality and robustness between ActiveRecord and cakePHP's ORM (at that time, anyway) were pronounced, with AR coming out way, way ahead.

There's no doubt, in my mind, that if you are going to take on a large, ambitious web application project, you'll be better served by Rails.

Re: Rails Is Not For Beginners

#43

I usually say this about the types of webframeworks they are: Rails - > great for intermediate people who see benefits it brings. Great for pretty straight forward projects for beginners that can follow a book. Sinatra -> Great for beginners to "just get something working". Not great if someone needs everything decided for them. Awesome for advanced people. Awesome for non-standard projects. Padrino (Why don't we hea…

People get Padrino confused with Audrino and think they're gonna have to hack hardware. That scares them and they move on :-)

Re: Rails Is Not For Beginners

#44

Earlier quoted context omitted.

I beg to disagree. Learnability and usability can get along together. Good examples are Jquery and Cakephp. Both have executed this very well from producing well written and well maintained documentation then add a good amount of plugins that is contributed by the community. For example, in cakephp we have this cook book http://book.cakephp.org which the quality of the content surpasses every cakephp book on amazon.…

I don't agree about JQuery. The learnability is good and it's really easy to get things done very fast. But when the code base grows it becomes really hard to maintain the code if you don't know JavaScript very well and know how to structure the code. That's why many people have started to use CoffeeScript and/or Backbone.js to write more maintainable JavaScript. But the CoffeeScript/Backbone.js route is harder for b…

  > But the CoffeeScript/Backbone.js route is harder for
  > beginners but in the long run it's a much better choice.
What you say makes no sense. Ok it makes sense, but does not make sense in context of jQuery. jQuery was never intended to be a framework or tool to organize your code. It is just a DOM/events/Ajax library, that's it. Its purpose is completely orthogonal to what Backbone does and even more so to what Coffeescript does. You don't manipulate DOM with Coffeescript or Backbone, but you may use Coffeescript to write your DOM manipulation code and you may use Backbone to organize your code.

Re: Rails Is Not For Beginners

#45
post #27

If you optimize a framework for beginners, you're optimizing for learnability. That's great for the first few days or even weeks of learning. But once you're past that, it's not so great. What you care more about is the usability of the thing once you know it. There are plenty of cases where learnability and usability are in conflict. Letting learnability win is a short-term relief. If you on the other hand optimize…

>All that being said, I think Sinatra is wonderful. So what if it's not a fit for building a whole Basecamp or Github? It's great for teaching someone the basics of how HTTP works and it's great for smaller surface apps or for smaller, isolated parts of bigger apps.

Sinatra is actually a great foundation for big things, although it doesn't give you the whole stack, but only the way how to build your stack.

I've been developing on Padrino (which builds on Sinatra) for 2 years now and I am still surprised by how easy adding features/plugins to Sinatra (and by that, Padrino) is, especially as the most useful Rails plugins now also come with a "pure rack" variant.

On the other side, I often ran into problems with the huge stack that Rails has, so that I had to tackle issues far before I actually needed a feature.

Re: Rails Is Not For Beginners

#46

Earlier quoted context omitted.

I don't agree about JQuery. The learnability is good and it's really easy to get things done very fast. But when the code base grows it becomes really hard to maintain the code if you don't know JavaScript very well and know how to structure the code. That's why many people have started to use CoffeeScript and/or Backbone.js to write more maintainable JavaScript. But the CoffeeScript/Backbone.js route is harder for b…

> But the CoffeeScript/Backbone.js route is harder for > beginners but in the long run it's a much better choice. What you say makes no sense. Ok it makes sense, but does not make sense in context of jQuery. jQuery was never intended to be a framework or tool to organize your code. It is just a DOM/events/Ajax library, that's it. Its purpose is completely orthogonal to what Backbone does and even more so to what Coff…

Yes, I understand what you mean and when I wrote this I knew that someone would comment on it :)

This is how I see it:

Pure JavaScript + JQuery = Very easy to get started but very hard to maintain when the code base grows if you don't know JavaScript very well.

CoffeeScript + JQuery + Backbone.js = Harder to get started but the code becomes easier to maintain when the codebase is big.

I know that JQuery is not about organizing code.

Re: Rails Is Not For Beginners

#47
post #10
post #5

I have a harder time using Sinatra because I never know where to put things. Also, the biggest problem with learning Rails is the Ruby language. After you learn the language, switching from Sinatra to Rails and back is not problematic.

Yeah, Rails gives beginners a big advantage by generating a huge scaffolding. It clears up a lot of ambiguities about where things go, and as a beginner it lets you explore different things that you can do in Rails.

I didn't find the scaffolding that difficult to understand, because I've used CakePHP before, but what gets me in Rails is the magic helper keywords. For instance: ActiveRecord.find_by_columnname(value), {controller}_path, {controller}_url.

I'm fairly certain that's not all of them, but I don't even know what those things are called to look for them. Those 3 are covered in a lot of tutorials without really explaining the full list of stuff Rails does for you automatically.

Re: Rails Is Not For Beginners

#48
It occurred to me while interviewing the other day--web development is not really for beginners anymore. To do web development without endangering customer passwords, data security and credit card numbers now takes very substantial knowledge, and it is knowledge that some beginners won't realize they need.

If you don't understand how to prevent sql injection attacks, cross site scripting, why SSL by default for web apps is needed, and whole host of things, you should probably stay away from anything more serious than flat html.

Re: Rails Is Not For Beginners

#50
post #34

Earlier quoted context omitted.

I beg to disagree. Learnability and usability can get along together. Good examples are Jquery and Cakephp. Both have executed this very well from producing well written and well maintained documentation then add a good amount of plugins that is contributed by the community. For example, in cakephp we have this cook book http://book.cakephp.org which the quality of the content surpasses every cakephp book on amazon.…

The problem with cakephp is that every book written on this subject surpasses the quality of the framework itself. cakephp is easy to learn, but for me it's unusable in the long run. Easy stuff get's even easier, hard stuff get's harder. That's exactly what David meant. If you trade everything for learnability, it's not usable.

Two things:

- In my very humble opinion, only one - English! I can't comment on the international community - book has been any good (That by Mariano Iglesias) and they all tend to either have outdated information or just bad code samples. So no, they do not surpass the quality of the framework. - Hard stuff is always hard, regardless of the framework. At a certain point, you start butting heads with limitations in the language, at which point no framework will help. I've also found "hard stuff" to be fairly easy in CakePHP due to the large plugin base I can reach into - only Django and Ruby Gems really solve this sort of problem - so no, the hard stuff doesn't get harder.

Regardless, I'd be more than happy to get your feedback on this though. Send me a message :)

Post reply on HN