Eye of the Beholder


Okay, so PHP Sucks, But It Doesn’t Matter.

I like Jeff Atwood. I enjoy reading his blog and I’m looking forward to stackoverflow. I’m just not used to seeing him quote painfully old articles when trying to make his points.

From my own experience, and the countless of online tutorials and blogs, many PHP developers are guilty of the same crap code VB developers were once renowned for. OO, N-Tier, exception handling, domain modeling, refactoring and unit testing are all foreign concepts in the PHP world.

Ever heard of PHP 5? PHPUnit? Zend Studio? The plethora of other tools that real, good development shops use? Sure, a lot of the junk you see in PHP was done by hobbyists or people without a good, firm understanding of how things work. There are quite a few professionals out there who develop and distribute quality PHP-based products.

I think Stas put it best, PHP isn’t the only language where really crappy code is produced. I read The Daily WTF quite a lot and notice a ton of other languages in there, so they must all suck too, right?

It’s certainly very possible to build really elegant solutions in PHP. It’s also possible to build maintainable solutions in PHP. As tools like Zend Framework, PHPUnit, Phing, phpUnderControl, xdebug, Eclipse with PDT, Omega Vortex’s own Omega Matrix, and many others start to become more widely used, I think it’s very possible that you’ll see a gradual increase in the overall quality of PHP code.



1 Sign You’re a Lousy PHP Programmer


Here’s a comprehensive list of 1 Sign that you’re a lousy PHP Programmer.

  1. You write a list of 40 reasons someone is a lousy PHP programmer when over half the reasons don’t apply to every situation, much less a lot of real-world situations.

Honestly, I wanted to tear this one to pieces with a really long entry outlining why certain points on that list were just ridiculous. I won’t bother. If you’re even a mediocre PHP Programmer and understand certain concepts, you’ll be able to do it yourself.

Granted, there are some common sense points in there, but most of the valid points on his list are just that: common sense. There are a few noteworthy items that aren’t common sense, but I was so taken aback by some of the outlandish claims that I can hardly count those. Don’t say I didn’t warn you, if you feel your IQ drop while or after reading that list.

Disclaimer: I don’t really think this person is a lousy PHP Programmer, but I do think it was in poor taste that he BSed a list like this and included points that are completely unreasonable.



On the Warpath


As much as I hate to upstage Shroomy, when I saw this I had to link to it.

You saw my response to CIO’s piece of trash article about PHP. Now, have a look at Terry Chay’s.

Enjoy.



Why do you do that?


What is with the blog applications that bring entries back to the top of the RSS Feed when they’ve been edited? That has to be the most retarded functionality anyone’s ever come up with.

Case in point, I was reading Planet PHP this morning and a 2-year-old entry that outlined the ongoing childish attitudes some people within the PHP Community have resurfaced. If I hadn’t checked the dates on all of these particular blog entries, I would’ve thought this was new material. Since this entry served as a gateway to another blog entry that was a specific attack on Chris Shiflett, any random passer-by who thinks this is all new stuff is going to a) have negative thoughts about the “whiner” in question; or b) have negative thoughts about Chris over something that’s two freaking years old.

I implore you. If you’re the author of any blog software, stop doing this. Not only is it extremely annoying to get repeats of old crap in my RSS Feeds whenever someone edits something, it can lead to potentially hazardous things like this resurfacing and causing unnecessary damage to one or more people’s reputations.



Privett on PHP Reposts


I’ve gone through and reposted some of the old entries from Privett on PHP. Just the ones that I thought were worth bringing over. I set their dates to their original date of posting so that they wouldn’t all float up to the top here. You can scan through the PHP category if you want to go back and read them again.



Re: Octopussy numbers in PHP


John Lim made a post about a problem he had with certain output that he believed should be the same. He requires registration for comments, and I couldn’t be bothered, so here’s my response.

Check out the integer literals example in the PHP Manual for the answer to why he’s having issues. His sample code is:

echo 09," => (09) <br>";
echo 9," => (9) <br>";

The reason that doesn’t work as expected is because 09 when used as an integer is interpreted as an octal number. So, the result that he’s seeing is:

0 => (09)
9 => (9)

That’s just how integer literals work and it’s documented behavior. It’s not a bug. Well, it’s a bug in his code, but it’s not a bug in PHP.



How low can you go?


CIO has an article up entitled “You used PHP to do WHAT?” in which the author describes some of PHP’s supposed “shortcomings” … From reading the article, it becomes quite apparent quickly that the author really doesn’t have a clue what he’s talking about.

Here was my response to his absurd Facebook reference:

 

OK, to finally rid myself of any more Facebook references, you folks should all read this link:
http://developers.facebook.com/resources.php

and this link:
http://developers.facebook.com/documentation.php

So what? Facebook uses a standard API that can be INTERFACED by languages besides PHP? How does that prove your point in the slightest?

You, sir, are a tool. This entire article is nothing but link-baiting FUD. You claim to be a PHP developer, but you apparently don’t know even the basics of scaling and security in PHP applications.

You and the editors of CIO should be ashamed of yourselves for letting such poor content through.

And what a hypocrite. Saying the things you do about PHP when this site is running off of a PHP-backend from a pre-packaged CMS product (Drupal).

FUD really annoys me. What annoys me more is that this publication is targeted more towards management-type people. So, if you’re a PHP Developer, the person reading this article could very well be your boss. How are you supposed to cope with your boss having these types of “facts” on hand when it comes time to decide what technology to move forward with? Especially, when most managerial types I’ve met don’t know much more than what the author of this article apparently does.



Microsoft Throws Yahoo a Bone


I have to admit that I’m a little concerned about this. Apparently, Microsoft wants to buy Yahoo and threw $44.6 billion at them in an offer.

My question is what does this mean for PHP if Yahoo accepts the offer? Not enough major players use PHP and Yahoo was one of our best aces to throw when people started talking down about the language. What’s Microsoft going to do with Yahoo if they buy them out?

Maybe someone with a little more knowledge on the issue can shed some light somewhere …



PHP 5 Certification


As you can see from the new button at the top of the site, I passed the PHP 5 Certification Exam. :)



Let Me Clarify …


(Repost from Privett on PHP)

My response to this comment (comment link no longer available) ended up getting too long for a comment. It would’ve just been overlooked. So, let me take a minute to clarify.

Stefan is the only individual I called out, because he set himself up to be called out. And “chips on my shoulder” come from watching PHP slowly get replaced in companies, because of the belief that it’s not ready for Enterprise-level development. And you want to know why? These very antics by the aforementioned people. I’m here, because I want PHP to succeed in the realms that it’s failing in. Yeah, Enterprise development using PHP has been on an uptick, but it’s been SLOW. And there’s plenty of things that Zend and the PHP Group can do to fix this.

The fact of the matter is, something needs to change, somewhere. And as unlikely that it is that anyone in the PHP Community is going to listen to someone calling them out on their faults, it’s got to be done. If someone doesn’t realistically say “Hey, this is a problem. You need to fix it.” everything is going to stay the way it is, and PHP is going to continue to drag its feet behind other languages, in the enterprise.

That’s why I commend Stefan for what he does in the Community, but highly disagree with the tone in which he uses to do it. He was called out because he IS pretty much the reason that PHP is as secure as it is, today. And that’s something that we do not, as a Community, want to lose. But, as long as he keeps pushing against the community in the ways that he does, the Community is going to instinctively push back. That’s not getting to solutions, it’s only causing more problems.

But, he is not the underlying problem, either. Zend and ALL of the PHP Developers need to step back, take a long look at what’s been accomplished and where they want PHP to go, and decide on a REAL plan. Not this haphazardly doing things as it’s interesting or whenever I feel like it. They have the power to do it, it’s just whether or not they want to do it.

Also, I’m not here to incite problems within the community. Everything I’ve said has been pretty much constructive criticism, and not intended to be taken negatively. “Is PHP Doomed?” was a question, not a statement. And probably too strong of one, as I went on to say, later. Of course PHP’s not doomed. It has a long way to fall before it could be considered doomed. But, if it did start that descent, I hope the PHP Group and Zend would be able to fix whatever mistakes were being made to get it back up to where it needed to be.

And if you do want to keep using PHP, in the future, “Letting them do what they want” isn’t an option. As the community behind the language, we all need to step up and let them know that they need to take some serious time, get their hands out of the code, and resolve some of the issues that keep causing problems. Whether it be communication errors, errors in leadership, etc. The PHP Community is HUGE, and if we were to all speak in unison, we WOULD be heard. It’s all about whether you intend to sit idly by while more problems keep cropping up, or take a stand to help better the language that you love.

And I commend Stefan Esser for taking that stand. I just wish he’d stand with an attitude that wasn’t so demeaning and “be the better man”, as cliche as that is.

Next Page »

Jeremy’s Blog is proudly powered by WordPress and themed by Mukkamu