

Ask HN: Ruby, PHP, or Python? - iamgabeaudick

I want to learn a web development language. (I think) I've narrowed it down to these three. Which should I commit to? (If none of these, than which?)
======
ghotli
The community matters. PHP had a hard life growing up in the early web.
Googling for answers in php will often promote bad programming practices, like
putting all your code in one file. The ruby and python communities are a bit
more interested in code maintainability, at least historically through my own
googling around. Learn the frameworks in the ruby or python communities and
then come back to php with fresh insight if you really want to go the php
route.

My two cents. Hopefully this won't turn into a flame war.

~~~
apsurd
This advice is correct, but you can still learn good programming technique via
php by using <http://kohanaphp.com>

OOP, strict php 5, mvc, with a some nice ORM inspired by active record. If you
are looking for super easy docs to get you started, checkout the
<http://codeigniter.com> to get you started (kohana is/was forked from CI)

p.s. kohana 3 is the newest version which you can get from github, it's a lot
different from 2.x and contains a database mapper called "sprig" i believe.
It's supposed to be django-esque but I'm not familiar with django to say
anything about that ... only check it out!

Also if you want to go the ruby route, of course there's ROR but do take a
second to look into sinatra, it's SUPER easy. it's simplicity is thus -
beautiful.

------
phren0logy
I would give ruby or python a try, and skip PHP. There is no bad choice
between python and ruby, IMO. They are just different. Spend an afternoon with
each and make your can't-lose decision based on that.

------
mumrah
Well, I can say that Python pays better and in general leads to more
interesting work (rather than PHP that is). I imagine Ruby is similar.

However, I think Python is a better investment all around.

------
xutopia
I'm a Ruby developer with a few years of experience with PHP. PHP is not a
normal programming language. Its first iteration was a set of Perl scripts and
it was never meant to grow outside the scope of web development.

Ruby and Python are better suited for growing beyond the web and into great
areas.

In my entourage I believe Ruby is more of a startup language and Python more
of an entreprise language. Though both see their fair share of use in both.

------
rdrimmie
I think python, but of the three I only have first-hand experience in it and
php. I think it depends on what languages you currently know, and which of
them is the most different.

I started learning PHP in 2001, coming from web development in ASP3 written in
VBScript. At the time, developing pages in PHP and VBScript was very similar,
and it was really more a matter of learning the few syntax differences and the
core library.

Python is a much different language than PHP and VBScript, and as a result
working on learning it has made me a much better programmer and it has been a
lot more interesting because I'm working with concepts that I might not
otherwise cross paths with in my day-to-day programming and gives me a leg up
as these concepts are added to php.

If you haven't already, please also consider learning javascript. There's a
lot of nascent node.js webframeworks that you could start with.

------
thefahim
As a Ruby head (and former LAMP developer), I would suggest PHP. The dead
simple deployment will allow you to concentrate on learning how to code.

You can always do Ruby/Python afterwards. It's easy to go from one to the
other.

------
joshklein
My advice would be that no matter which of these languages you pick, do NOT
use a framework (at first). It's important that you learn how the language
itself works and puzzle out the common patterns with your own solutions. When
you're done learning the basics of web development, then start looking into
frameworks.

------
crazydiamond
Python and ruby are both great languages. You should try each out for a week
before deciding. Check out the libraries, although I think they both cover all
bases more or less.

You might want to do an app with Rails and Django (or some other framework --
many to chose from) and see how you like it.

------
steveklabnik
This has been discussed endlessly before, and is really likely to turn into a
flame war.

Try them all. Do a 'hello world' project in each. Use the one you love.
They're all fine, and many people have written many successful sites with all
three.

------
amk
Learn PHP, but please, please, learn to write clean and manageable code. I
highly recommend picking up a framework along with php. Good ones are Symfony
and Cakephp. I would have suggested Python but php is much easier to learn and
deploy.

------
halfbakedmoron
Learn C, then you will know.

