Ask HN: What should I learn next? Python or Ruby/Rails?

I have been doing PHP for a long time now. I know some C/C++ through college.

I have started dabbling in Python but was told by many that I should instead consider Ruby/Rails

One important note: I do intend to, at some point, learn both of them. Just wondering which one you would recommend I start with.

Thanks :)

  • I find Python easier to get started with, because there is much less syntax to learn when coming from another language, particularly the ones you have been working with. Ruby does more out of the box for webapps, and does more with less characters, but only marginally, and it has a slight perl aftertaste that makes it a tad annoying at times when you're starting. In summary, I'd recommend you start with Python because you can learn essentially all of the language in very little time from the basis you already have. Ruby is definitely more hyped right now than Python, and it is awesome for web stuff, but starting with Python and then learning Ruby should be easier than the other way around. Or maybe it's just so for me.

  • You should start with Perl.

    Then think about doing Python or Ruby.

  • That depends on why you are looking to learn a new language.

    For most web development projects, PHP is fine. If you are looking to learn something totally new, why not go for something like Smalltalk, Erlang, Lisp or some other language that's quite different from Ruby, Python and PHP?.

    If you are looking to learn something that will help your web development skills, then make sure you are very strong with Javascript and a framework such as Jquery before looking to other languages.

  • Each language is relatively easy to get started with, and there are numerous free tutorials available on the web. Why not take two weeks and try each one out for a week? See how far you get building something and decide which is the best fit for you right now.

    If you've written a PHP app, maybe it's a good candidate for rewriting in these languages. Having a problem space that you're intimately familiar with can reduce the variables to just the languages or frameworks themselves.

  • Both are good languages. I would suggest Python if you're going to be doing any scientific computing for its excellent library support (numpy/scipy/matplotlib especially), and Ruby if you want to being doing web application programming.

  • When you were advised to consider Ruby over Python, what reason were you given?

    Also, you may not be aware but this is an almost daily question on StackOverflow so I would advise looking there also.

  • either is fine. they have much more in common than they are different. choose which ever makes most sense practically (for examples: if you know someone who would give you help + support, use the language they use; if you already use a certain host and they only support one of them, use the one they support)

  • As a fairly experienced Ruby on Rails developer I am receiving a couple of phone calls a week from recruitment companies (in Sydney). They are desperate for people.

    That should tell you all you need to know. Web is where it's at. Django has much less penetration. Rails is still fairly rare but it's gaining momentum in business (finally) and IMO it's a very good thing to know right now. Your PHP skills will be a big plus, too.

    That said, I have nothing against Python, it's a great language, so if you're not doing it for employability reasons, why not. It just seems to me that the Rails hype has made it a big deal for businesses currently. Get on that train and you'll be well-compensated. Python .. love it, but doesn't pay as well, simple as that.