a companion discussion area for blog.codinghorror.com

The PHP Singularity


#181

“There are only two kinds of languages: the ones people complain about and the ones nobody uses…”

Said by a person that can not accept any criticism of C++ and the quote is self-serving.

Using it to defend something is the height of idiocy.

Bjarne, while being infinitely more intelligent and educated than any PHP “dev” is still using the fallacy that all items in set Language have flaws, then all said languages are equally flawed. There are many subsets of Language that are superior in significant ways over PHP and C++, though C++ also belongs to the superior to PHP subset.

PHP is better than Malbolge, Brainfuck, and Whitespace and that is about it. It is significantly, and irreparably worse then any other language, mainstream or not.


#182

What could I do after building Stack Overflow. Stop the evil reign of PHP? Seems legit…!! Hehe


#183

“I can’t even say what’s wrong with PHP” without using metaphors. I love the double clawhammer, but metaphors alone don’t make a point.


#184

I am a 9 years PHP coder (not just LAMP) and also 2 years Node.js coder. I love both stack of technologies. What I think that makes the PHP great is not the language itself, but the community behind it. I found the community tends to be very open and constantly roll out great libraries. I remember back in the days when Ruby on Rails just hit the street, people all want to do “everything written in Rails and MVC” type of thing. But very soon PHP comes up with many MVC type of frameworks. Now, I found history repeats itself. Everyone seems to do “everything written in Node.js and Async fashion” type of thing. But again PHP comes up with an array of libraries that obviously inspired by Node.js. And I am one of the member in the PHP community to be in this process today.

Check out all the following great things in PHP

  1. Composer: http://getcomposer.org/ Node style package management
  2. DNode protocol for PHP https://github.com/bergie/dnode-php
  3. PHP-UV, a PHP extension to talk to libuv, the core library behind Node.js
  4. Pupcake, an early effort to make PHP perform Node.js type of functionalities https://github.com/superjimpupcake/Pupcake
  5. React, Event-driven, non-blocking I/O with PHP

It is all about community. If the community can continue with the momentum and willingness to listen to the cool stuffs happening outside of PHP and keep improving itself, PHP will continue growing and survive, otherwise, it will go nowhere.


#185

Have your say on this too…

http://fabien.potencier.org/article/64/php-is-much-better-than-you-think


#186

Only one language makes my eyes bleed more than PHP… Objective-C. I’ll take a spoonful of PHP over ObjC any day.

Both taste really bad to me.


#187

The problem isn’t PHP, per se, it’s people who fall into the trap of seeing how simple it is to create “working” PHP applications, and then think that all this talk about quality and craftsmanship and design patterns is a load of crap.

The same could be said of the damage that old VB6 (and it’s cousins VBA and VBScript) did to the software development profession - it created an entire subculture of what I call “Pinocchio Developers”, that is developers who think they are real developers but just appear to be developers. When these people get into companies, they tend to foster a culture built around quick fixes and shoddy design, because it’s all they know, and tools such as PHP help to foster this with how deceptively easy it is to become a “PHP programmer” without any knowledge of quality, simply by copying and pasting code snippets or writing spaghetti code. Then you get a developer in this company who DOES know about good design, and they become lepers since for years the company has operated on the notion that good design, craftsmanship (e.g. the SOLID principles), and all of these good things aren’t really needed because Bob the Programmer built a ball of mud system using PHP, and it works just well enough that it doesn’t crash and burn (as someone else said: Broken gets fixed, shoddy lasts forever).

That’s why PHP sucks, and that’s why PHP is dangerous: It isn’t because it’s a poor tool, it’s because it blurs or even removes completely the line between a good developer and a bad developer.


#192

I glanced over this article of, “oh no don’t use PHP it’s evil” generalizations. I’m not seeing exactly what the author is upset about? Security PHP issues? or what? In fact I just did a search on “security” on this page and walla, zilch, nothing that the author talks about.

PHP4, yeah maybe this author is onto something.

PHP5 with OOP - hell no, PHP5 with OOP ROCKS!!! Jeff Atwood, the author of this article is way off into a galaxy far far away in god knows where.

Use XAMPP or WAMP to develop on your computer. Don’t put your code out there on the net until you know how to do security. Read up on Larry Ullman’s PHP books and/or go to Amazon and read reviews on PHP books specifically PHP OOP.

Learn and use OOP (Object Oriented Programming) while simultaneously learn and use a PHP framework like Yii PHP Framework or Zend.

I LOVE using PHP, MySQL, and the Yii PHP Framework. LOVE IT!! Yeah, super, duper really LOVE it!

Peace out


#193

Its not about hate, evil or php people being wrong. Its about choice and preference.

There nearly is a choice, an obvious one. Its just a bit to hard to deploy.

I’ve used PHP for years, made plenty of nice websites for happy clients. I’d like to have a choice in the language I choose for all my projects.

http://hashtwo.com/blog/the-php-singularity-1


#195

Given Facebook’s long term commitment to PHP I think you may as well forget the possibility of it fading into obscurity.


#196

I’ve had absolutely no problem coding in PHP, I think the problem may just be bad or lazy programmers who expect way too much out of a language and not more from themselves. Also there’s too many articles written about ‘how bad’ PHP is while not explicitly outlining examples or providing solutions.


#197

Honestly PHP is not that bad. I find its flexibility quite good. What the article comments about needing a shoe or a bottle as being a disadvantage I say is actually an advantage in that it gives you many options to do something. Don’t have the right tool? Build it.

I will say that PHP in the last year has gotten worse however in that they continue to try and introduce new features that just aren’t part of the PHP plan in the early days. Traits? Really? They should have just enhanced the functions they had and worked on simplifying things instead of adding new stuff.


#198

PHP is so convenient sometimes… I never runned into any sort of mathematical operation regarding date and time that could not be solved by using only 3 functions: date, time and strtotime.

Java, on the other side… I spent days reading javadocs for loads and loads of Calendar, JulianCalendar, GregoryCalendar, MayanCalendar classes… having to use special classes for date parsing and converting back and forth from numerical to text data types… made me almost smash my head against a wall.

In .NET, it was just fine… until it started to apply internationalization, time zones and etcetera to my calculations without I asking, and without even giving a warning about it.

Sorry about the bad English.


#199

I wonder about people that post things like this. I also wonder about people who talk about MVC frameworks, and say ridiculous things like “this one framework is preferable to another because it holds me to mvc better.” Truly, hearing it over and over and over again really makes me shudder.

Same is true here. Everybody likes to bitch about how poorly designed PHP is. And if they were actually taking issue with the design of the language (it’s a legitimate gripe), they would have a point. But then they do one of two (usually both) things.

First, they provide a lot of pissy memish pictures with no concrete actionable information, and say the whole thing’s crap. Then, they’ll start flapping their lips about how bad other people’s code is.

But, you see, that’s not an honest argument. Either way. As a programmer, it’s your obligation to complain about other people’s code no matter how great it is (unless it’s perfect). And that goes for any platform you work on. Convincing clients they’ve been hoodwinked, and that they need a complete re-implementation is a consultant’s bread and butter. Sad but true.

And yet, it’s not really an argument for one language design or another.
Is the problem that php lets you get away with writing such bad code? Is the problem that a lot of the big projects like CodeIgniter, Magento, Wordpress, Drupal, and many many others just really suck to work on?

No. Of course not. The problem, as stated is that php forces you to build upside down houses with doors that fall off. Totally against your will, too! Listening to this guy, you would almost think that there’s no possible way any competent programmer could ever build a sensible piece of code in php because php is so poorly designed that no sane programmer would ever even try to do it.

All the while, no real complaints, other than he can’t figure this or that or something else out. That’s not the fault of the language either. Willful stupidity, and intentional ignorance are never the fault of the language. And neither are grandstanding trite blog posts with no real content.

That’s all I’m sayin.

Later.


#202

This article “inspired” the first post in my blog. Here are my 5 points why PHP is not easy and straightforward as it may seem:

http://yatb.giacomodrago.com/en/post/1/php-is-not-easy-as-it-may-seem.html

Share your thoughts! :slight_smile:


#203

I am amazed at the negative responses. I know PHP isn’t perfect, but why are some of you morons using PHP for projects, making a living of it and then hating on it? PHP websites are easy to deploy, runs on almost any web server, easy to understand. If you cannot code a good web application blame yourself not the language, I’ve seen good and bad web applications in PHP. The only thing I see in this blog post is that the author is trying to get some attention.

" I’m starting a new open source web project with the goal of making the code as freely and easily runnable to the world as possible. Despite the serious problems with PHP, I was forced to consider it. "

Yeah typical Internet tough guy.


#204

“Despite the serious problems with PHP, I was forced to consider it.”

So, 5 months later, what did you go with?


#208

Php is AWESOME. What other languages have http methods already built into it? Sure, you’re not going to build a state of the art search engine with it, but what other languages out there can you use by itself– without installing some ridiculous framework– and still produce a decent app from it? Of course, you can choose to use a framework if you want to… that’s half the fun of using the language. With PHP you choose your own workflow, your own destiny.

Those who bash PHP don’t understand it. It’s not really a language. It is a template language- and it has only been a good 10 years it has been considered to be a viable solution for building sites with it, only about 5 years a secure solution to interacting with database layers. PHP is still young. Those who spend years working with Java and C bash PHP for its OOP facility and security flaws. It is 2012, and PHP is still scripting language with a few comp sci principles adopted to it. So what? That’s what it has always been.

I’m sick of people bashing PHP for what it can’t do. Instead, embrace it for what it CAN do: Community sites, blogs, wikis, simple stuff. Look around. Over half the startups out there choose PHP. Are we a glutton for punishment? Maybe. But we also know that you don’t put your life’s work , or stake your thesis in comp sci on PHP. Working with PHP is about simple design patterns and using that to bang out simple and highly scalable solutions- albeit a little ugly.

So go ahead- keep bashing PHP and use a “real language” for your next project. Build your beautiful classes, interfaces, and singletons in the privacy of your own windowless basement- because that’s about as far as you’re going to go with it for your first 6 months of development. In the meantime, I’ll keep building my horrible spaghetti coded community sites, hosted on my 3 dollar a month shared servers, and laugh all the way to the bank.


#210

Thanks for this. I picked up JavaScript SQL and ASIII so easily and PHP just feels like total chaos. I thought I was just an idiot graphic designer but it feels good to have someone who knows what they’re talking about confirm my suspicions.


#212

RIGHT! Blame it on the tools NOT the one using the tools.
Guess what Jeff,
a good programmer is a good programmer (regardless of tools).

I don’t have much exp. with PHP. But let me tell you one think about it:
every time I wanted something changed in my PHP wordpress blog, it never took me more than 5min to do it! with almost 0 knowledge of the language!

Cant say the same for … pyhon , ruby , C#