Hacker Newsnew | comments | show | ask | jobs | submit login

This is unfortunately true. I'm a PHP programmer (currently writing a book, A Highly Negative Book About PHP, that I've been billing as "like Essential Java but tells you what not to do") and, I like to think, a fairly good one; reading this article made me cringe because this guy is emblematic of most of the problems in the PHP community. He:

-accepts uncritically gobs of code dredged up via Google

-considers something "robust" if it doesn't break old code, when the rest of us hate it because we have to live with register_globals and other horrors

-considers "universal support" of craptastic versions of mod_php to be a good thing (some, but not all, major shared hosting messes use FastCGI)

-modifies files in production and thinks that's okay

It makes those of us who do know what we're doing and focus on disciplined code look bad, because the article author is what most people think of when talking about "PHP programmers".




I'm convinced that this post is satire and the author has trolled us all.

In fact, i reject any other explaination. Sticks fingers in ears. Lalalalala, it's satire, nobody is this incompetent. Lalalalala, can't hear you.

-----


> PHP is exactly like C. Either you like both or you don’t like either, there is no claim you can make about PHP that can’t be made about C as well, and vice versa.

This is absolutely satire. I don't think anyone can troll much harder than "PHP is exactly like C".

-----


Cedric used to work for Google. He was, on occasion, a brilliantly hilarious troll.

-----


The best one has to be running your site from a git repo.

I'm not sure why running old code on an old server that has support for the old code is considered a good thing about PHP. I love BASIC because I can boot up a C64 and the code I wrote 20 years ago still works today!

-----


> The best one has to be running your site from a git repo.

What's wrong with that? `git pull` to update everything to the latest HEAD, `git co -- HEAD~1` to roll back the latest update, `git diff` to see the latest differences, etc...

This repo doesn't have to be the development repo, just a specialized non-bare repo that's used just for production. It works great for simple sites that don't require extensive deployment infrastructure.

-----


Careful with that, git operations aren't atomic. Safer to keep two git dirs and flip a symlink between them between pulls.

-----


I really did consider that since the other posts by the author sound considerably more sane, but he's incredibly good at deadpan if so.

-----


I suspect you are missing some context here.

Cedric wrote the book on unit testing (literally! [1]). He uses PHP at times when he doesn't need the reliability unit testing gives you and can't justify the extra time it takes.

Given that he works at Google, I suspect his "in production" doesn't actually mean big, real sites.

[1] http://testng.org/doc/index.html

-----


I'm less astonished at his lack of unit testing (because I often eschew it in PHP projects, too) and more the, uh, everything else that he said that was horrible.

And I don't care if it's a "big, real" site or not, making mods to a live site is (almost) never good practice. Fix it offline, test it, push.

-----


From your description, it sounds like Crockford's "JavaScript: The Good Parts" to me.

-----


For the record, "PHP: The Good Parts" is downright fucking awful. Apologies to the author if he reads this, but I'll buy him a beer and restate my opinion.

-----


I've not read any of the "The Good Parts" series, so I can't comment from personal experience, but I've heard that Crockford's book is the only good one in that series. He wrote it, and he wrote it well, and then O'Reilly decided to base a series about it, but didn't get authors who could write those books to the same standard.

-----


This is pretty much dead on.

-----


Weird, whenever I look up "PHP: The Good Parts" it comes back completely empty.

-----


Haha, I get it! Because the language is bad! Oh, you jokester.

-----


As it happens, the introduction says, verbatim, "It's like PHP: The Good Parts, but that already exists and is terrible."

So, yeah. ;-) Still a ways off, though.

-----


"-considers something "robust" if it doesn't break old code, when the rest of us hate it because we have to live with register_globals and other horrors"

Agreed - as a PHP programmer (mainly in Zend Framework), who is now learning Python... I hate register_globals. With a fiery passion.

More importantly, as someone who hosts several photographer websites, I have a bone to pick with http://bludomain.com/ - congrats on your eighth birthday. Have you updated your code since you were born? It's a travesty that involves turning on almost every deprecated option in a php.ini. :\

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: