

Ask HN: PHP or Python? for a beginner. - dave_k

6 months ago I decided I wanted to learn how to develop websites. Since then I have been working on developing my first project (www.plotified.com) in PHP. I choose PHP because I have a couple friends who are very proficient in it, and would make for good references if needed.<p>So, now that I am a little versed in PHP I am wondering if i made the right choice. Should I have gone with Python? Or should I continue PHP til I and proficient in it and then learn Python? Any advice would be much appreciated.
======
facorreia
Usually I would advise you to start with Python. It's beginner-friendly and
has a lot of potential.

But I think you should stick to PHP for now. You have already started to build
up some knowledge. You should take advantage and build upon this foundation.
Specially because as you start to get more comfortable with the basics, you'll
focus more in other aspects of development than simply learning the language
and its libraries.

Having a couple friends nearby that can help is also a great boost.

You'll probably want to move on in the future and learn other platforms. I see
no hurry. Maybe you should take another 6 months and tackle a more challenging
project, instead of rebooting to another language and platform right away.

There's a lot of bad software written in PHP, but in other languages that
happens too. On the other hand, great software and great companies such as
Mediawiki (Wikipedia), Wordpress and Facebook have leveraged PHP to great
success.

------
cardmagic
My advice is to try them both and see which one is a better fit for your
style. With a modern PaaS like <https://console.appfog.com/> you can deploy
apps in many languages easily without the hassle of setting up entire stacks.

------
randomdrake
Why not both?

They're both fun to write applications in. In fact, why not pick up some Perl
and maybe some JS while you're at it?

Limiting yourself to one language can teach you bad habits or start to close
your mind to the possibilities that may be available in other languages. It's
great to master a language, sure, but at this point in your learning, you
should be reaching out all over the place to absorb as much as you can.

By learning other languages, you not only fill your tool belt with new and
shiny things, but you learn to use the other things in your tool belt better.
Different languages make you think differently about how you design and
structure things. You'll find similarities, that will reinforce your basic
programming but, you'll also find differences, that will open your mind to
structuring or writing your programs in new and interesting ways.

I wouldn't lock yourself in to any particular language. You'll make yourself
more marketable and a better programmer by becoming well-versed in many
languages.

~~~
lucperkins
I agree, although I would argue for making JavaScript your primary language
for web development, especially in light of (a) the possibility that has
emerged in the past few years of running JavaScript on the front and back end
(I'm referring of course to Node.js), and (b) the movement toward doing and
more and more on the front end with far more selective recourse to the back
end (here I'm referring to libraries like Backbone, Ember, etc.). PHP and
Python are both very cool and have amazing communities, but get as comfortable
as possible with JS first.

~~~
dave_k
I have heard and read quite a bit about node.js. That's something I will
definitely need to look into more. thanks!

