Learn Python or Ruby?
1–10 of 11 posts
Re: Learn Python or Ruby?
#2http://stackoverflow.com/questions/141642/what-limitations-h...
Ruby does seem to have somewhat more powerful constructs (e.g. blocks).
One nice thing that python has (which ruby doesn't) is indentation-based syntax. With ruby you have to use "end" all the time to signify the end of a block.
Re: Learn Python or Ruby?
#3Re: Learn Python or Ruby?
#4Re: Learn Python or Ruby?
#5Re: Learn Python or Ruby?
#6I personally found I preferred working in Ruby, so that's what I use - eg: I'm not a fan of significant indenting, I like that in Ruby you have to put 'end' (or '}') at the end of code block, I find it makes it more readable.
Also, if you're going to be doing web development, be sure to check out the available frameworks. Rails and Sinatra are the main Ruby ones, Django (and I'm sure others) for Python. Again, I found Rails works in a way that makes sense to me (probably because I came from CodeIgniter in PHP) so that helped sway me towards Ruby.
If you do go down the Ruby on Rails route, be sure to check out Why's (Poignant) Guide to Ruby and Rails for Zombies (http://railsforzombies.org)
Re: Learn Python or Ruby?
#7Not saying Ruby doesn't have all that stuff, though. One factor was how much of a pain it is to develop Ruby on Windows.
Re: Learn Python or Ruby?
#8Re: Learn Python or Ruby?
#9Python's design and community encourages a more object oriented style. Ruby encourages a more functional style.
Python lacks some support for closures and inline functions. Ruby has good support for both.
Python has libraries for almost everything. Ruby's libraries are more web focused. It also has libraries in other areas, but not as much as Python.
Ruby is a little more flexible, which leads to some of the DSL's and metaprogramming that seem to be common in the Ruby community.
Ruby has more syntax than Python. Ruby has a few ways to do things, while Python tries to stick to one way.
Both are good. It might help to skim through a tutorial for each first, and see which one you like better. Between Python and Ruby, I think it mostly comes down to taste.
Re: Learn Python or Ruby?
#10What resources are best depends on what level of programming experience you are starting with. For Ruby: 0 experience I recommend starting with Learn to Program by Chris Pine Have some experience go straight to Learn Ruby the Hard Way by Zed Shaw After you have some exposure to the ruby language start on rails with the Rails 3 Tutorial by Michael Hartl. It goes step by step through building a twitter clone. Follow the Rails 3 Tutorial with Agile Web Development with Rails. It builds a shopping cart using a different methodology than the Rails 3 tutorial. After that I the classes from code school are pretty awesome and the railscasts by Ryan Bates is the best $9 I spend a month.