News for hackers. Stuff that matters.
Re:PHP Addiction by Legion on Friday June 29, 2012 @02:03PM (#4178056)
> The only thing actually wrong with PHP, is that it's popular but not cool.

No, what's "wrong" with PHP is that other things that are better have come along since. That's not a fault of PHP, that's the nature of language evolution.

> It runs half the Internet quite well

COBOL runs tons of mission critical business services quite well. It doesn't mean that nobody's improved on COBOL or that you should use it for a new project today.

Re:PHP Addiction by crazygringo on Friday June 29, 2012 @02:32PM (#4178252)
> No, what's "wrong" with PHP is that other things that are better have come along since.

The problem is, no, nothing else has. Node.js is awesome and fun, but far harder to set up for basic webpage serving. Python is awesome, but also has a huge learning curve to learn how to serve basic webpages with. And... I can't think of anything else. Perl? ASP? Java is a huge pain to set up and maintain.

What other language out there is better than PHP for getting simple webpages up and running quickly? I wish there were one, but when you consider practical aspects instead of just theoretical ones, there really isn't. Sadly.

Re:PHP Addiction by Legion on Friday June 29, 2012 @02:42PM (#4178312)
> The problem is, no, nothing else has.

Myself and an army of other ex-PHP developers disagree.

> What other language out there is better than PHP for getting simple webpages up and running quickly?

This discussion is not just about "getting simple webpages up and running quickly". In fact, it's pretty clear people are talking about developing web applications, and not slapping together a quick and dirty page or two.

If you want to have a discussion about what language is best for inexperienced people to whip up a simple site without having to bother learning much, that's fine, but that's not this discussion. At the very least, that's certainly not what Marco was talking about, nor Jeff in the blog post Marco was responding to.

Re:PHP Addiction by rickmb on Friday June 29, 2012 @05:14PM (#4179125)
Don't take it personally, but I've seen a lot of confirmation bias from ex-PHP developers.

Often from developers who may, thanks to language Y, write more elegant code on the line / function level, but still create the same architectural mess as they did before in PHP. (Rails doesn't save you from creating a mess, neither does the broad separation of concerns of any MVC framework.).

There are thousands of ex-PHP developers out there that think they are now better programmers because they now use Ruby or Python, building thousands projects that proof otherwise.

Five to ten years from now, people will be bitching on HN about legacy RoR software like there's no tomorrow. And they'll probably be blaming the language and/or the framework.

Re:PHP Addiction by SomeCallMeTim on Saturday June 30, 2012 @02:32AM (#4180926)
There is no shortage of people complaining about RoR today. [1][2]

Also, does the word "ghetto" ring any bells?

Not that I think Python solves all the problems well either. I'm a fan of Lua, personally, but only because it's a much cleaner language design, and it's faster, and it's easier to set up, and it's easier to write Node.js-style code that's easier to read, and... well, I guess there are a few reasons.

[1] http://discuss.joelonsoftware.com/default.asp?joel.3.309321....

[2] http://techcrunch.com/2008/05/01/twitter-said-to-be-abandoni...

Re:PHP Addiction by Legion on Saturday June 30, 2012 @02:13AM (#4180886)
> Don't take it personally, but I've seen a lot of confirmation bias from ex-PHP developers.

> Often from developers who may, thanks to language Y, write more elegant code on the line / function level, but still create the same architectural mess as they did before in PHP.

That's a longer-winded version of "You Can Write FORTRAN in Any Language". Certainly nothing exclusive or even particularly unique to PHP or PHP programmers.

Re:PHP Addiction by aggronn on Friday June 29, 2012 @06:54PM (#4179564)
If whats around 5-10 years from now represents the same improvement RoR has made over PHP in the last 5 years, we better be mad when developers working on team projects try to perpetuate RoR's use.
Re:PHP Addiction by crazygringo on Friday June 29, 2012 @05:04PM (#4179085)
No, it's exactly the point Marco was making:

> But when I wanted to write Second Crack, I went right back — it was a quick little project that I only wanted to spend a couple of days on, so it didn’t justify the overhead of learning a new language.

Whether it's webpages or web apps, nothing else is better than PHP for getting something small up and running quickly. That's the whole point of why Marco feels "addicted". I really wish there were something better in this context, but there isn't.

(And what do you mean, "ex-PHP developer"?? I've never heard someone call themselves an "ex-C" developer or an "ex-Java" developer. You make PHP sound like a cult or religion, instead of just a popular programming tool.)

Re:PHP Addiction by brlewis on Friday June 29, 2012 @05:18PM (#4179145)
I think "ex-PHP developer" just means someone for whom PHP is no longer the best thing for getting a small web app up and running quickly.
Re:PHP Addiction by iamumassthrower on Saturday June 30, 2012 @01:33AM (#4180794)
I think I trust ex-PHP developers' opinions about as much as ex-girlfriends' opinions.
Re:PHP Addiction by mistercow on Friday June 29, 2012 @03:23PM (#4178554)
>The problem is, no, nothing else has. Node.js is awesome and fun, but far harder to set up for basic webpage serving. Python is awesome, but also has a huge learning curve to learn how to serve basic webpages with. And... I can't think of anything else. Perl? ASP? Java is a huge pain to set up and maintain.

The crazy thing is that all of that could change with a simple project that does <?coffee > (or whatever) style templating while automatically offering access to CGI data and cookies at a scope reasonably close to the global one. This should take days to implement, and when I have a few of those to spare, I plan to tackle it.

Re:PHP Addiction by crazygringo on Friday June 29, 2012 @04:56PM (#4179057)
I think you're right, I just made the same comment in this thread. That could really be the key to getting, say Node.js to turn completely mainstream.
Re:PHP Addiction by mistercow on Friday June 29, 2012 @05:28PM (#4179192)
What I'd like to do is make a project specifically for CoffeeScript (and maybe also JavaScript) which would run with minimal configuration under several CommonJS supporting environments like v8cgi and Node. The conversion from <?coffee ?> templating is extremely simple, and beyond that, it's simply a matter of pasting on some boiler plate to set up global variables. I honestly think that the reason it hasn't been done is that it is so easy to implement that people feel it must not be worthwhile.
Re:PHP Addiction by antihero on Friday June 29, 2012 @02:57PM (#4178396)
Nope, you are purely defining "better" as "how easy it is for someone completely ignorant to start making stuff".
Re:PHP Addiction by crazygringo on Friday June 29, 2012 @05:05PM (#4179091)
No. Marco's point was that he went back to using PHP. Are you saying that he's completely ignorant?
Re:PHP Addiction by fyolnish on Friday June 29, 2012 @09:52PM (#4180142)
He does seem to be ignorant in regard to languages that are not php.
Re:PHP Addiction by batista on Saturday June 30, 2012 @02:33AM (#4180928)
Yes, and it's a standard redefinition of better in CS that you seem unaware of. Go and read the canonical "Worse is better" paper.
Re:PHP Addiction by koide on Saturday June 30, 2012 @03:54AM (#4181056)
I guess that what bothers most of us oldtimers is that better things have existed all along! :-)

better = in a better "programming language design" sense only