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

5 points by kloncks ↗ HN
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 :)

31 comments

[ 3.8 ms ] story [ 92.5 ms ] thread
You should start with Perl.

Then think about doing Python or Ruby.

Why Perl?
(comment deleted)
why not perl ?
Because Perl is the "glue" or "duct tape," if you will, of the internet.
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.
Perl is the most resilient language. Even if things have changed, it will be back. With a vengeance.
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.
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.
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.

That Ruby is much more popular right now and used more than Python.

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

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.
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.

Rails is ok for now, but it's just a fad.

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

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.

> "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.

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.

> 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.

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

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.

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

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.

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.
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.

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.
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.