Hacker News new | ask | show | jobs
by mynameisme 4666 days ago
I love picking on PHP as much as anyone else, but you can write just as terrible code in Python as any other dynamically typed language. Those Django and Rails projects can grow into monstrosities as well.
3 comments

Perhaps, but while the PHP community will debate endlessly about standards and projects inevitably end up become a pile of inconsisten spaghetti code, the conventions in Python make uniformity the path of least resistance, at least by an order of magnitude.

Also, while Rails is in the same league as Django as far as tools and expressiveness go(expressiveness perhaps more so), Django goes to considerable lengths to enforce style and consistency; it is not taboo to politely tell people that their code is not PEP8 compliant.

While certainly not as strict as PEP8, the Ruby community also has accepted style conventions that all bigger projects follow (especially Rails) and that you can call out people on.
Instead of choosing one over the other, why not choose both? I specialise in both PHP and Python. For web projects on commodity hardware, nothing beats PHP, especially when used with powerful frameworks such as Zend, Yii or Drupal. For installable programs or scripting, Python works well with wxPython.

>> Quoted from article: "It was around this point that I decided I'd rather be an unemployed Pythonist than an employed LAMP developer."

Sorry man, I'd rather be an employed LAMP developer, but with a few side projects in Python. It's just a programming language, not a religion. :D

I'm the author of the blog post. If the question is related to why I dropped PHP it's because I was getting a lot more done in Django and Tornado so I could finish projects quicker and take on more work.

There were so many clients in need of Pythonists in London in 2011-2013 when I was working there that I didn't have the time of day to take care of PHP ones. Also, PHP rates were dying and there weren't a lot of people competing for the Python work so I could keep my day rates nice and juicy.

I can think of a lot of things that beat Zend, Yii and Drupal in terms of code management, security, DRYness of code that's implemented, flexibility, the list goes on.

As a fully employed Drupal developer who's currently spending every free minute working with Rails, it's vastly more about working with tools that I like working with, and PHP and Drupal do not currently give me that.

I can play a little piano, but I'm way better at the bass because it's more fun. I can get work done on a PC, but I get way more done on a Mac because it's easier for me to work with. I can cook with a dull knife, but it's never as much fun as using a good one.

I think it's okay for people who don't really like PHP to publicly admit that, but it often seems to be taken as a religious attack by those on the other end of the spectrum.

Of course you can, but I think choosing between various languages mostly ends up being a matter of taste. I tried PHP, built a rather large website using it and found out I didn't like reading my own code after a while - a problem I have not encountered yet using python. I don't think this kind of article should be taken as a list of reasons that make python better than PHP, just as a reminder that maybe you could have a look at python if you do not enjoy writing your code in PHP.