Hacker News new | past | comments | ask | show | jobs | submit login
Want to learn Rails? Start here. (zackshapiro.com)
120 points by kine on Sept 16, 2012 | hide | past | web | favorite | 23 comments



Somewhat tangential, but I wish there were more comprehensive learning resources for Clojure, particularly getting started with web development. Given that there is no equivalent of Django or Rails, and web development in clj is really about assembling a collection of libraries (Ring, Compojure/Moustache, Enlive/Hiccup etc), it is much harder for the initiate to understand how everything fits together. The fact that Rails is so opinionated also really helps the new developer become productive in a relatively short timeframe.

I'd imagine this would apply to just about any other language as well really. The Ruby community really is fortunate to have such brilliant free resources out there for learning Rails and the language.


Um, why exactly would you use something like Clojure if you're not comfortable building up your own particular set of libraries that you like for your project?

Clojure to me seems like a language culture that would likely tend towards smaller libraries that do specific things than something with batteries included and such like Rails.

If you want something on the JVM with more of a batteries included approach Play Framework for Java and Scala is pretty nice and Lift for Scala is cool if you're willing to take a very different approach to your web stack.


> Um, why exactly would you use something like Clojure if you're not comfortable building up your own particular set of libraries that you like for your project?

I decided upon Clojure as I think it meets the needs of my project well, which is basically an expert system. I need to consume a number of domain specific java libraries, and the native support for logic programming with core.logic and datalog is a big win. Clojure certainly wasn't the easiest choice - I would be much further ahead if I started with Ruby.

> Clojure to me seems like a language culture that would likely tend towards smaller libraries that do specific things than something with batteries included and such like Rails.

I should clarify that I think Clojure's favouring of smaller composable libraries is ultimately a better approach than the monolithic framework. It is much more difficult to get to a point where you're productive however.


Have you tried Noir? (http://webnoir.org/)


Yes, in fact I'm building my MVP on Noir. Noir is an excellent place to start, but I suspect the documentation and tutorials are not keeping up with the state of the framework and all of the awesome periphery things that Chris Granger is working on in the Clojurescript space.

Initially there was going to be a complimentary framework for Noir called Pinot for client-side code (clojurescript), which has since been broken up into a number of different libraries. Having more guidance around structuring large projects with these new tools (https://github.com/ibdknox/fetch, https://github.com/ibdknox/crate, https://github.com/ibdknox/jayq) in the context of a Noir app would be superb.

I suspect these things will come given time - web development in Clojure is evolving very quickly and compared to Ruby is relatively new. The Clojure community is also much smaller than the Ruby community I would imagine, so it follows that there will be fewer learning resources about.


Usual things in rails is really simple but doing unusual things requires going down a rabbit hole of google searching, rdoc, blogs, etc due to the modularity (I had this issue with thor) of rails.


This exactly describes my experience with Rails. It was so easy to do very normal things, and finding and extending gems was so much easier than doing the same with apps for Django, because in Django I basically had to rewrite every app I wanted to use (plugabiltiy was really bad, at least back in 2009-ish).

But with rails as soon as I wanted to do something less than extremely typical I was in a world of terror an ambiguity. It was so hard to figure out the "right" way to accomplish a lot of tasks.


The ambiguity wrt choices is what gives rails it's large ecosystem (as well as semi high 'addon' churn). It's both bad and good, bad due to the huge amount of reading needed to fully understand a stack such as devise and good in that it allows such modularity.


This is a lot of the reason that I don't recommend that students use something like Devise right off the bat. Putting things in middlewares is pretty great for separation of concerns, but it's confusing as hell if you need to figure out how something is done, and it's nowhere to be found in your source.


I think there are a lot of established "right" ways to do normal or fairly normal things, I think though with anything it's about figuring out what's right in the context of what you're building when you're off the beaten path. That's at least been my experience.


This sounds just like Django. I wonder if this is just something that inevitably happens with comprehensive frameworks?

I remember I once suggested that the people behind GitHub consider whether they could leverage their pull requests as a practical alternative to Stack Overflow, but they basically told me (in a formal boilerplate response) to fuck off.


Very solid approach. As an incoming Fall '12 DBC student, I've found Ruby Koans (http://rubykoans.com/) and Ruby Cookbook (http://www.amazon.com/Cookbook-Cookbooks-OReilly-Lucas-Carls...) to be incredibly helpful in grounding and adding more context to my Rails Tutorial experience.



So basically

1: Study it

2: When you're lost, research and ask someone

?


I think the real take-away is to give yourself an actionable/completable project, that you can devote significant blocks of time to, and then feel good when you complete them.


Bingo, Rolandal


I'm a big fan of the giving myself some kind of challenge to prove out a framework or technology. Like, "build a meme site" or "build twitter" or something like that. It does two things. One, you are forced to use the technology for a real thing to solve real problems. Two, it becomes very apparent how good the documentation/community/libraries are. Both are critical because most any technology can solve most any problem you throw at it if you are willing to write enough code, but the libraries, documentation, and community make a huge difference in the day to day experience of using any language or framework.


I'm actually in the process of learning Ruby right now. I'm curious though. From the perspective of someone who has hasn't been programming for a long time, would you consider it a good idea to learn Ruby before learning Rails? I'm waiting on my copy of The Well-Grounded Rubyist to arrive so I can get started.


Check out http://tryruby.org/ while you wait. I just ran through it again last night and it's so beautifully crafted I want to weep.

I learnt Ruby kind-of-alongside Rails and wish I'd spent more time focusing on the language itself; I'm going back and deepening my knowledge of it now. But it depends on how your mind works, whether you want to get a Rails project going yesterday, what knowledge you have locked away somewhere, and so on.


Absolutely. I'm a non-programmer that had been working on picking up Rails a number of times without a good background in Ruby. Each time I'd run into one issue or another and not have enough knowledge to push past it.

I've put in a bit of time in Ruby and it's opened up Rails (and programming in general) for me more than I thought it would. The biggest advantage, besides just general programming, is reading other people's code and documentation. Recently, I've been exploring i18n (internationalization) in Rails. By going into time_ago_in_words helper, I was led to the distance_of_time_in_words helper and it's source code (https://github.com/rails/rails/blob/bd8a9701c27b4261e9d8dd84...). By understanding enough ruby, the Rails code became a wonderful source of documentation.



The article doesn't mention http://railsforzombies.org.

Which is a great first tutorial to get some basic with Rails.


Here's another good list, and it takes contributions on GitHub. http://iwanttolearnruby.com/




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: