Live data from Hacker News

PHP Addiction

marco.org

1–10 of 320 posts

Re: PHP Addiction

#2
>the first question that comes up is what to use instead, and they’re met with a barrage of difficult choices and wildly different opinions and recommendations.

The real answer is "it doesn't matter". Of course python people will try to convince you to use python, and ruby people will try to convince you to use ruby. But both groups will agree that either language is far better than PHP. And as someone who likes neither of those languages, I would agree with both of them, just pick one. There's no "wrong choice" to worry about.

Re: PHP Addiction

#4
post #3

i have been a PHP programmer from college. Switching to python was the best decision i made.i'm just in love with python.

x3 - it's far simpler to learn due to consistency, more powerful to do both low & high level programming and a pleasure to work with. Just as simple to setup for web as php. Not real reason to be in knee deep php mess.

Re: PHP Addiction

#6

>the first question that comes up is what to use instead, and they’re met with a barrage of difficult choices and wildly different opinions and recommendations. The real answer is "it doesn't matter". Of course python people will try to convince you to use python, and ruby people will try to convince you to use ruby. But both groups will agree that either language is far better than PHP. And as someone who likes neit…

Very much this. The comparison he tried to draw with Linux distros, same deal. Who cares? Try one. You're a hacker, go grab a language and hack some code. No, you won't be as good with Python when you start as you may currently be with PHP, big deal.

A weekend project is the PERFECT time to learn a new language/framework. Sure the weekend may become 2-6 weekends, who cares?

If I am not mistaken, Twitter and Reddit have both changed very large parts of their codebase from one language to another, so I don't really know if I buy that argument either.

Finally, I think programming languages should work for the guy writing the program. I made a point of learning everything I could (and continue to do so) about every language I come across. So when I need to do something, I have 6-7 toolboxes at my disposal, as opposed to 1 or 2. I write in 5-6 different languages every day at my current job, and have become a very valuable employee because of this.

This is coming from someone who has only the most basic experience with PHP, take it with a grain of salt.

Re: PHP Addiction

#7
I'll sound like a broken record, but I'm convinced Flask is the perfect transition.

It's built for smaller web apps, and rapid prototyping. The system of mapping endpoints to functions is incredibly intuitive -- if you've used Python before, learning Flask is incredibly easy.

Re: PHP Addiction

#8
I've been having a similar problem with the added difficulty* that I don't do development as my full-time job (yet) and have been coding mostly for developer contests and hackathons.

So when I start something that has a deadline in 24 hours or just a few days, I can either fall back to PHP to get something going fast or spend most of my time just learning a new language. So, I have been typically going with PHP…

I've found that the important thing is to take the time to set yourself up with the minimum environment that can get something, anything going in a different language: that means whatever is needed to print something on a page and get some logic working with GET and POST parameters. Because the nice thing with PHP is that it's so easy to write a single file that displays text on a page, or that responds to POST and GET parameters with some logic behind it. If I started with Ruby for example, I wouldn't know how to do this basic thing. (granted, with Rails and Heroku, this is easy)

My plan is to make Python my generalist programming language and I started to look at Flask (http://flask.pocoo.org/) for that reason: it's a mini-framework that doesn't take long to learn how to do these simple things. I can then play with it for simple things.

*though it can make things easier since I can just work on whatever I want in whatever language I want :)

Re: PHP Addiction

#9
The problem is pretty much what the article he discusses mentions: I can copy up a PHP file to any old random web host, and it will Just Work.

I would love to be able to not write PHP. But the language that replaces it has to be that easy to deploy.

Re: PHP Addiction

#10
post #4
post #3

i have been a PHP programmer from college. Switching to python was the best decision i made.i'm just in love with python.

x3 - it's far simpler to learn due to consistency, more powerful to do both low & high level programming and a pleasure to work with. Just as simple to setup for web as php. Not real reason to be in knee deep php mess.

> "Just as simple to setup for web as php"

That's simply not true. I love Python (I'm using Flask for projects at this moment), but saying that setting up a python web service is as easy as php is disingenuous.

Post reply on HN