Live data from Hacker News

Ask HN: Should I Learn Ruby?

news.ycombinator.com

81–90 of 112 posts

Re: Ask HN: Should I Learn Ruby?

#81

Earlier quoted context omitted.

Yes, Sinatra is a Ruby web framework. Sinatra is more of a "micro-framework" and puts you closer to the http method. Basically, the api mimics http more closely, you literally use get, put, post, and delete methods to define your routes and actions. In Sinatra, you define your routes in the same place where you program your Resource's functionality, so less mapping is required. In Rails, you have a separate controlle…

Also, if you want rapid prototyping, you should look into a document store such as Mongo. Not having to write migrations (as you would with ActiveRecord + Mysql) is huge. Also, your models can be more flexible. You can add keys to your document as needed. With Mysql, you need to have a migration to add the column.

@refugee - My experiences have been quite the opposite. Mongo allows me to focus on the domain. AR forces me to think about fitting the relational model into my problem, which causes a huge impedance mismatch, and causes lots of extra work and performance issues.

Of course it depends on the problem, but working with hashes and arrays is simpler than the relational model, no?

I do concede the vast swaths of docs for AR, however AR is pretty complicated and issues arise that aren't well documented.

Re: Ask HN: Should I Learn Ruby?

#82

Earlier quoted context omitted.

Yes, Sinatra is a Ruby web framework. Sinatra is more of a "micro-framework" and puts you closer to the http method. Basically, the api mimics http more closely, you literally use get, put, post, and delete methods to define your routes and actions. In Sinatra, you define your routes in the same place where you program your Resource's functionality, so less mapping is required. In Rails, you have a separate controlle…

Also, if you want rapid prototyping, you should look into a document store such as Mongo. Not having to write migrations (as you would with ActiveRecord + Mysql) is huge. Also, your models can be more flexible. You can add keys to your document as needed. With Mysql, you need to have a migration to add the column.

@grasshopper - That makes sense. Mongo is certainly new tech, so it would be more work right now with Rails.

With Sinatra, I'm finding it to be less work.

I would probably stick with relational tech if starting off with Rails, but keep your eye open toward alternative store, such as document databases and key/value stores.

Re: Ask HN: Should I Learn Ruby?

#83

Earlier quoted context omitted.

That's a helpful metaphor. What I'm looking for is a framework that can be used for rapid prototyping, and it sounds like rails fits the bill.

Django is great for rapid prototyping. The admin area is built in, that alone saves a ridiculous amount of time

The admin will definitely be extremely helpful to someone who is new to databases.

Re: Ask HN: Should I Learn Ruby?

#84

Earlier quoted context omitted.

Also, if you want rapid prototyping, you should look into a document store such as Mongo. Not having to write migrations (as you would with ActiveRecord + Mysql) is huge. Also, your models can be more flexible. You can add keys to your document as needed. With Mysql, you need to have a migration to add the column.

That's true and all, but Rails and Django were built to run on SQL dbs right out of the box. Getting them to work with MongoDB takes some work, and I don't think it's a diversion that someone just starting learning frameworks should try to deal with. As for migrations, I don't think he's gonna be dealing with anything too complicated schema-wise. Django South will write your migrations for you. Maybe Rails has someth…

[deleted]

Re: Ask HN: Should I Learn Ruby?

#85

Earlier quoted context omitted.

You may also want to consider Sinatra for rapid prototyping. It's lighter weight (less framework) than Rails. Depending on your preferences, it may suite your needs.

Sinatra is also based on Ruby yes? How does it differ specifically from Rails?

[deleted]

Re: Ask HN: Should I Learn Ruby?

#86
post #13

I'd say, learn Python or Ruby, doesn't matter, but try them both for a few days. One will click and the other won't. If you go the Python route, I've got a free book I'm working for beginners that might be too beginner for you: http://learnpythonthehardway.org/ But I reference two other books on that page which actually could be a good start for you. After that, check out the Django book: http://www.djangobook.com/en…

I generally agree with your comment, but I found this stament to be inaccurate: > (more popular than Rails actually) [citation needed]. The largest websites/web applications in the world are built in Rails much more frequently than in Django. And there is much more demand for Rails developers in the marketplace. I fail to see evidence that Django is actually used more than Rails is in the real world.

[deleted]

Re: Ask HN: Should I Learn Ruby?

#87

For what its worth, I was doing stuff in Ruby at work but I switched to Groovy after a while. Things like Oracle db drivers, using "gem install" behind a ntlm network proxy were some roadblocks that I ran into with Ruby in a locked down enterprise environment. If you are going to be writing code and running your own servers then Ruby is easier to work with. I still think there is a cultural clash with Ruby in larger/…

As for oracle side of things, you might want oc check out OraceEnhanced adapter (blog.rayapps.com). It is developed by a very smart guy (oracle developer of the year 2009), and we use it in several production apps - works great.

Re: Ask HN: Should I Learn Ruby?

#88

Earlier quoted context omitted.

The largest websites/web applications in the world are built in Rails much more frequently than in Django. While we're calling each other out for citations, that's an awfully big statement to make without citations as well. Let's just put it this way: Both frameworks power large sites, you pretty much can't go wrong with either.

> While we're calling each other out for citations, that's an awfully big statement to make without citations as well. I made the statement because I'm ready to back it up. Among the most popular 1000 sites on the web, you will find at least a dozen Rails sites [1]. There are extremely common names like Twitter, Hulu, Scribd, Justin.TV, White/Yellow Pages, Urban Dictionary, etc. How many Django sites do you see in th…

Didn't twitter move to Scala for their website ?

Re: Ask HN: Should I Learn Ruby?

#89
post #88

Earlier quoted context omitted.

> While we're calling each other out for citations, that's an awfully big statement to make without citations as well. I made the statement because I'm ready to back it up. Among the most popular 1000 sites on the web, you will find at least a dozen Rails sites [1]. There are extremely common names like Twitter, Hulu, Scribd, Justin.TV, White/Yellow Pages, Urban Dictionary, etc. How many Django sites do you see in th…

Didn't twitter move to Scala for their website ?

no. they use scala for some of their services, like message queues.

Re: Ask HN: Should I Learn Ruby?

#90

Earlier quoted context omitted.

You may want to reread his post. The penultimate sentence is a kicker.

Yeah it's a hoot, especially coming from the guy who will kill people not using statistics, which is a great read btw. http://www.zedshaw.com/essays/programmer_stats.html I'm sure it's just an off-the-cuff remark. I've made plenty in my day.

I'm sure it's just an off-the-cuff remark.

The guy weighs in on the opposite side of something that is common knowledge, then says you should check what I'm saying because I could be fibbing, oh and I'm famous for having a bias against the side I've just disfavoured — and you reach that conclusion?

If I were a cynic I'd say both you and he were trolling, but I rather think he was just taking the mickey and it's turned into a rather droll black comedy.

Post reply on HN