News for hackers. Stuff that matters.

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 :)

( 30 comments | 5 points | on HN )
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by Kliment on Thursday December 10, 2009 @12:59AM (#987404)
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.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by shippingcomps3 on Thursday December 10, 2009 @12:26AM (#987374)
You should start with Perl.

Then think about doing Python or Ruby.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by kloncks on Thursday December 10, 2009 @12:33AM (#987380)
Why Perl?
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by mock on Friday December 11, 2009 @06:34AM (#989536)
Because as a PHP programmer Perl will have areas of familiarity which may make the learning process easier. In return, you will gain a greater appreaciation for why the PHP developers made the decisions they did by seeing how it was done in a language they borrowed heavily from. As a bonus you'll learn to use a language that is ubiquitous in all sorts of sysadmin tasks, and have another tool that you can use when PHP isn't the right one for the job. Finally, knowing Perl will allow you to use the huge wealth of CPAN modules available to help you solve almost any task. At worst it will enable you to port them to your language of choice.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by shippingcomps3 on Thursday December 10, 2009 @01:33AM (#987444)
Because Perl is the "glue" or "duct tape," if you will, of the internet.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by samdk on Thursday December 10, 2009 @04:01AM (#987568)
Perl may have once been the duct tape of the internet, but it's pretty solidly into its 'drying and peeling off' phase right now.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by jamesbritt on Thursday December 10, 2009 @02:59AM (#987523)
That was succinct observation in its day, but I hardly think it applies now. Things have changed a whole lot. That's not to say perl can't be used today, but its relative value has decreased. "Duct tape" is no longer the ambition to admire.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by shippingcomps3 on Thursday December 10, 2009 @03:50AM (#987559)
Perl is the most resilient language. Even if things have changed, it will be back. With a vengeance.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by yr on Thursday December 10, 2009 @12:41AM (#987386)
why not perl ?
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by gexla on Thursday December 10, 2009 @03:20AM (#987537)
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.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by gr366 on Thursday December 10, 2009 @06:05PM (#988787)
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.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by samdk on Thursday December 10, 2009 @04:10AM (#987581)
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.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by boggles on Thursday December 10, 2009 @12:41AM (#987387)
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.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by kloncks on Thursday December 10, 2009 @08:22AM (#987780)
That Ruby is much more popular right now and used more than Python.

Everyone has said Python is simple, simple, simple, though.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by andrewcooke on Thursday December 10, 2009 @01:39AM (#987450)
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)
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by sailormoon on Thursday December 10, 2009 @02:38AM (#987503)
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.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by shippingcomps3 on Thursday December 10, 2009 @03:05AM (#987529)
Rails is ok for now, but it's just a fad.

You gotta go with Perl. You'll thank me later.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by dandv on Friday December 11, 2009 @11:21PM (#991142)
It's very common to see these criticisms brought against Perl: it's line noise, a write-only language, only useful for scripting, dead and so on.

Thankfully, they are all unfounded.

While scripting has been the use case in the '90s, Perl is nowadays used for a variety of tasks, including complex desktop applications such as the Perl IDE (screenshots), web application frameworks (Catalyst), bioinformatics (extensively), content management systems (e.g. WebGUI), hierarchical wikis (MojoMojo) etc. and powers very large websites (IMDB, Magazines.com, BBC, Amazon.com, LiveJournal, Ticketmaster, Craigslist etc.).

More at http://www.wikivs.com/wiki/Perl_vs_Java#Common_criticisms

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by freebird_uk on Saturday December 12, 2009 @04:45AM (#991378)
I founded a consumer internet start up in 2006. We use perl for everything. Haven't regretted it. The CPAN is just so awesome. Anything you want to do is already done. Over the last 3 years the perl community has gotten stronger and stronger with better tools, more modules, etc. Perl5 has regular release schedule and get faster every time.

That's my experience. Do whatever works for you.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by sailormoon on Saturday December 12, 2009 @05:20AM (#991393)
That is actually really cool and I am glad, and a little surprised, to hear the perl community is still alive. I will re-evaluate my preconceptions.
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by sailormoon on Friday December 11, 2009 @06:57AM (#989549)
You might as well suggest learning COBOL. Yes, it's lucrative maintaining all those old apps. But where's the satisfaction?

And really, companies are going to look at you strangely if you say "1 year Perl experience". They'll think "why on earth is someone learning Perl in 2009". No, go with one of the newer languages - python or ruby.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by preaction on Friday December 11, 2009 @03:14PM (#990362)
By your logic, we should not learn C because it's older than Perl and Python (why on earth is someone learning C in 2009).
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by sailormoon on Friday December 11, 2009 @09:14PM (#991007)
No, C is different.

Look, Perl was "the" fad language back in the 90s. No-one is building anything new with it today. So if you learn Perl, expect to be hired to maintain others' crappy sites.

C is different because it's the foundation everything else is built on.

I'm not trying to dis Perl here or anything; I'm just trying to state the nature of reality as I see it, so lower your spear, friend ..

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by Blend on Thursday December 24, 2009 @03:29AM (#1013577)
Perl has great potential. The reason Rails and other newer languages are getting attention is solely because they're new. Rails is easier to start programming in by people who'll never understand the difference between a constant and a variable in their life. Other languages are invisible to them.

Does that mean Rails is bad? No! Every language has its merits and demerits. It's easier for a programming to learn them all than fight for a single language.

Perl has its own strong points, just like any other language.

"No-one is building anything new with it today."

Generalizations. So easy to make, and so imprecise nevertheless.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by chromatic on Friday December 11, 2009 @02:43PM (#990301)
> "why on earth is someone learning Perl in 2009"

Pick any of copious documentation, more jobs available than for Python and Ruby combined, availability on almost any platform you're likely to encounter, a testing culture unmatched by any other language of which I'm aware, and ~19,224 individual distributions freely available, installable, and usable from the CPAN.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by sailormoon on Friday December 11, 2009 @09:18PM (#991008)
Yeah, but what kind of jobs? Building something new?

Look, I am not attacking Perl. I am just stating the reality that in 2009, a Perl job will be maintenance. There is nothing new. This might be very insulting but that's the simple fact.

I know of about 4 big new projects happening in this city using Rails. I don't know about other cities but i assume it is similar. Learn Rails, right now, is my sincere advice, offered in good faith.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by chromatic on Saturday December 12, 2009 @03:16AM (#991324)
> Yeah, but what kind of jobs? Building something new?

Look at the job data. It's publicly available. This is how statistics work.

> I know of about 4 big new projects happening in this city using Rails. I don't know about other cities but i assume....

This neither how statistics work, nor facts.

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by sailormoon on Saturday December 12, 2009 @05:21AM (#991395)
Did you forget to paste in the statistics/facts that show me how wrong I am?
Re:Ask HN: What should I learn next? Python or Ruby/Rails? by chromatic on Saturday December 12, 2009 @02:05PM (#991822)
Start with Tim Bunce's "Perl Myths 2009":

http://www.slideshare.net/Tim.Bunce/perl-myths-200909

Re:Ask HN: What should I learn next? Python or Ruby/Rails? by timbunce on Tuesday December 22, 2009 @07:03PM (#1011126)
Well, that seemed to have worked :)