Ask HN: I don't like Rails. Am I missing something?
I started working on a rails project for a TechStars team this week. It's my first time working with Rails. I haven't touched a CRUD app or a relational database for a while. Rails is full of conventions and tools that need to be rote learned. I realize that they're designed produce DRY codebases, and substantially reduce development time. I feel boxed in - the app is very unresponsive and at I'm writing essay-like queries. I miss node, redis and socket.io. Perhaps this is such a painful process because I'm a rails newb.
10 comments
Your description screams "I'm doing it wrong."
Simple advice since you need results: Have your bosses hire an experienced Rails hacker for 1-2 days to come in and pair with you until you're over the initial learning curve. Any of the large shops (including my old one, Hashrocket) should provide this service for you if you insist on it. Won't cost more than a couple thousand bucks at most, less if you find an independent willing to be nice with you.
I wouldn't want to be a complete Rails noob right now -- the first steps up that learning curve are brutal. However, once you have it down there's still nothing else that comes close to the productivity you get.
In fact, I'm going to tweet a link to this in case people that follow me want to volunteer to help you.
Simple advice since you need results: Have your bosses hire an experienced Rails hacker for 1-2 days to come in and pair with you until you're over the initial learning curve. Any of the large shops (including my old one, Hashrocket) should provide this service for you if you insist on it. Won't cost more than a couple thousand bucks at most, less if you find an independent willing to be nice with you.
I wouldn't want to be a complete Rails noob right now -- the first steps up that learning curve are brutal. However, once you have it down there's still nothing else that comes close to the productivity you get.
In fact, I'm going to tweet a link to this in case people that follow me want to volunteer to help you.
I'm down [email protected]
I am an experienced Rails developer and evangelist. I much (NB: opinion) prefer Rails over everything else. If you would be so kind to share details or code (if possible) I might point out what you are doing wrong, and why Rails seems not to work for you.
I'm not a big fan of rails, initially that learning curve stopped me from making progress with ruby. I went with sinatra instead. The simplicity of the sinatra framework let me get right down to writing code. I learned alot of ruby that way and getting to know the MVC model was much easier because I was constructing pieces of it by hand, which some might deem wasteful but honestly rails can be overkill for the things you may want to do.
Rails has been the web framework of choice for ruby for some years now and will continue to be but thats not to say its the best tool for every job. Sometimes you have to peel it all back. Thats where sinatra is brilliant. Sinatra is becoming more mature and will continue to pick up steam.
Rails has been the web framework of choice for ruby for some years now and will continue to be but thats not to say its the best tool for every job. Sometimes you have to peel it all back. Thats where sinatra is brilliant. Sinatra is becoming more mature and will continue to pick up steam.
There's also Padrino if you want something straddling the middle ground.
http://padrinorb.com/
http://padrinorb.com/
Rather than make a new thread, I figured I'd ask here - for a newcomer to web app development looking for a framework to learn, would you all suggest Rails or Django or something else?
Speaking only for myself, I decided to learn Python/Django instead of Ruby/Rails. Part of this is because I work in journalism, where Python is more widely used than Rails, and part of it is that I didn't like the framework doing so much work for me.
I think one of the problems, possibly with the Op, is learning MVC and understanding basic concepts. Sytax is a big thing. You'll find many examples of why writing in ruby or python is sometimes preferable to other languages. Otherwise, if you understand core concepts and language, learning either one is preference. I like the Ruby ecosystem a little better, and moves really fast as problems come up, but this is my personal preference.
http://www.quora.com/Which-should-I-learn-Django-or-Rails?q=...
Probably more applicable is Ruby or Python: http://www.quora.com/If-I-only-have-time-to-learn-Python-or-...
Probably more applicable is Ruby or Python: http://www.quora.com/If-I-only-have-time-to-learn-Python-or-...
Am I missing something here? Why would this be worthy of a downvote?
Genuinely want to know so I don't make this 'mistake' again if it is in fact bad form.
Genuinely want to know so I don't make this 'mistake' again if it is in fact bad form.
The scope, rather than the language is what you need to focus on when starting to learn web development. Choose 2 frameworks, a "big" and a "small" one, then develop similar applications on both of them. This way you'll have chance to see the big picture and how the low level gears work.
For ruby you can go with Rails + Sinatra, for python you can try out Django + Flask for example.
For ruby you can go with Rails + Sinatra, for python you can try out Django + Flask for example.
"It's just ruby."- My favorite quote from one of the best Ruby programmers I know, who at the time had very little to no experience with Rails.
I'd say any framework has a "steep" learning curve, after which things just become easier and easier.
A problem I often see is that a lot of people try to learn Ruby through Rails; And while that may work for some basics, a lot of things are still going to be "magic" until you understand Ruby itself a little better.
I'd say any framework has a "steep" learning curve, after which things just become easier and easier.
A problem I often see is that a lot of people try to learn Ruby through Rails; And while that may work for some basics, a lot of things are still going to be "magic" until you understand Ruby itself a little better.
(insert unrequested humor)
What? My mother learned rails (really, she's a web developer)!
Doesn't anyone develop on C any more?
What? My mother learned rails (really, she's a web developer)!
Doesn't anyone develop on C any more?
Which version of rails are you using? Rails 3 is far far superior to rails 2.x in my experience.
In addition, does the rails model fit your needs? Rails is there to be able to roll out a clean, well structured, well tested CRUD application - it's certainly not a "I win" button.
I'd wager that if you find you're using essay-like queries, either you've missed a trick, or rails isn't a great fit for your application.
In addition, does the rails model fit your needs? Rails is there to be able to roll out a clean, well structured, well tested CRUD application - it's certainly not a "I win" button.
I'd wager that if you find you're using essay-like queries, either you've missed a trick, or rails isn't a great fit for your application.
Rails 3. I think I've missed a trick.
My experience with Rails is that if you stay on the path it marks for you, you will really develop on rails. If you want to customize a little, it makes it really painful.
If all you need is a CRUD app such as Basecamp and the other products from 37signals, Rails is a no-brainer and you'll be already half-way done.
If you need something more or something different, you better off looking deep in the pool of plugins, because if they don't have the answers, you'll need many hours to break the convention and tweak to your requirements.
The essay-like queries is a code smell, by the way, and to me it suggests you're underutilizing Active Record scopes.
If all you need is a CRUD app such as Basecamp and the other products from 37signals, Rails is a no-brainer and you'll be already half-way done.
If you need something more or something different, you better off looking deep in the pool of plugins, because if they don't have the answers, you'll need many hours to break the convention and tweak to your requirements.
The essay-like queries is a code smell, by the way, and to me it suggests you're underutilizing Active Record scopes.
I agree. Based on conversations that I've had with rails gurus (I'm in a co-work space with pivotal labs) the essay-like queries are definitely a code smell. I think the guy who has laid the relational foundation for the app I'm working on (and taught me all the rails I know to date) has done so in a non-Railsy way.
Yes, and it's not Rails only; every framework that uses Active Record (and that covers the vast majority) requires this sort of approach.
"Skinny controller, fat model" is not as easy as it sounds.
"Skinny controller, fat model" is not as easy as it sounds.
Not to sound flippant, but there's your first problem. Rails really doesn't want to be layered over an legacy database schema. Doing so would definitely lead to essay-like queries.
Rails is self-described as very "opinionated." In practice, I have found this to mean that if something is difficult I'm not doing what Rails expects me to do.
Sometimes that means I'm not using a mechanism in Rails that does exactly what I want, thereby making life harder for myself. Sometimes that means that means I want something different than the use-case Rails is optimized for. This is still possible, but more complicated. In the balance, this has meant that easy things are easy and hard things are hard.
If it is hard to do something easy, you are probably doing it wrong. Working through some up-to-date Rails tutorials/guides will likely make your life much easier. You still might not like it, but you'll be working with it instead of against it.
Sometimes that means I'm not using a mechanism in Rails that does exactly what I want, thereby making life harder for myself. Sometimes that means that means I want something different than the use-case Rails is optimized for. This is still possible, but more complicated. In the balance, this has meant that easy things are easy and hard things are hard.
If it is hard to do something easy, you are probably doing it wrong. Working through some up-to-date Rails tutorials/guides will likely make your life much easier. You still might not like it, but you'll be working with it instead of against it.
well put. // fyi: you write prose like a programmer
That's because I'm writing this for programmers. FWIW, I'm not a programmer in my day job.
It was a compliment. Carry on
I took it as one (and upvoted you). I'm not sure why your comment got so many downvotes.
You're not necessarily missing anything. I tried learning rails twice, and neither time did it really click with me. Then I tried learning django and it was a much better experience. I think it's just a matter of going with what works for you. As long as there's an ecosystem around the framework / toolkit, it doesn't matter what you're using.