Live data from Hacker News

PHP Addiction

marco.org

221–230 of 320 posts

Re: PHP Addiction

#221
I'd suggest switching to JavaScript (or CoffeeScript) instead of Python or some other trendy language.

a) You need to know it anyway.

b) Node.js is awesome and works the way web servers ought to work.

c) JavaScript, if you avoid the obvious warts, is a really nice language. Every other language I've learned either has as many warts as JavaScript or isn't practical.

Having picked JavaScript, it turns out to be amazingly powerful. Need to automate content production? Adobe's stuff is all scriptable via JavaScript. Want to write a 3d game? Unity uses a dialect of JavaScript.

Re: PHP Addiction

#222
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

> Linux (over OSX) does actually have a package system I found running a VM on my mac to be the best of both worlds. Plus you can backup and distribute your VM so the entire team develops on the same setup.

+1 !!!

Re: PHP Addiction

#223
Question: is there a Node.js package out there that lets me write in PHP style, without having to configure anything?

I mean, I install node, I install the node package, I start the server...

And then it just looks for an "index.node" file or something in a directory? URL's would map to node files? It would use some kind of templating syntax like or whatever, but the point is, it would be as easy to use as PHP. (Each template could get the URL parameters, and read session variables, just like PHP.)

I've used Express, of course, but that's overkill for throwing together a little website. People love the PHP model of files. It's clearly not theoretically ideal, or particularly scalable, but it works and is easy.

Anything out there? Maybe I should throw it together myself...

Re: PHP Addiction

#224

Earlier quoted context omitted.

> 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 o…

>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 (or whatever) style templatin…

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

#225
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing . Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got…

"Linux is only free if your time is worthless"

Had to do it. I like linux a lot, but It doesn't make the quote false.

Re: PHP Addiction

#226
post #175

Earlier quoted context omitted.

> 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 o…

> 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.…

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

#227

Earlier quoted context omitted.

> 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 o…

Nope, you are purely defining "better" as "how easy it is for someone completely ignorant to start making stuff".

No. Marco's point was that he went back to using PHP. Are you saying that he's completely ignorant?

Re: PHP Addiction

#228
post #175

Earlier quoted context omitted.

> 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 o…

> 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.…

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

#229
post #175

Earlier quoted context omitted.

> 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.…

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 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

#230
post #80

The only thing actually wrong with PHP, is that it's popular but not cool. And that's a terrible place to sit for any product. It runs half the Internet quite well, but if you went by the posting on HN, you'd think it was Windows Vista. I've probably read every article critical of PHP that has hit the front page of HN in the last few years, and the one thing they all have in common is the vague refrain that PHP is a…

Follow the "deeply flawed" link in the article to see lots of bullet points of precise criticisms. The target of the link is http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...

Precise criticisms that are mostly wrong.
Post reply on HN