

Why PHP Sucks (Hint:  It doesn't) - wigglywonk
http://chipmunkninja.com/Why-PHP-Sucks-Hint%3A-It-1q@

======
Tamerlin
"The lesson? Shut up and code."

The author's full of it. Though I agree with the idea that not having cool
features doesn't make a language suck (though it can certainly make
programming in that language less fun), the rest of his stuff is why we have
so much terrible code out there.

If you just "shut up and code" you'll rarely get what you wanted as far as
functionality goes.

Also highly complex code is usually a sign of a bad programmer, not a good
one. Complex code is very rarely necessary to get the job done, and it leads
to very high maintenance systems.

Good programmers take great pride in producing things that are simple, as is
the case with most artists. The best photographs usually aren't the ones that
have everything in them, but rather the ones that have exactly what the
photographer needed to say what he/she wanted to say.

Not to place photography on a pedestal, IMO this applies to all of the arts.
Sometimes complex is good, but usually it's just clutter.

------
martythemaniak
"brutal application of free market supply and demand. If having Feature X
really would make my web application development significantly easier,
somebody would have already written a language or environment that used it."

I see this kind of thinking applied to a multitude of subjects and it never
makes any sense. The market isn't some static thing that has already rendered
its final judgement - the competitive landscape is constantly changing and (in
this particular example) python or ruby programmers extolling the virtues of
their language to PHP programmers and convincing them that it is better is a
vital component of python/ruby gaining greater market share.

This type of thinking can be used to discourage absolutely anything that is
new - "if its so good, why hasn't someone already done it? If it is not
already done, it must therefore suck".

In fact, it reminds of a joke about the conservatism of Canadian VCs: The
entrepreneur goes to the VC and pitches his business. Being somewhat
conservative, the VC asks him "Well, if your idea is great, why hasn't someone
from the Valley already invested in it?"

------
bct
> As I’ve programmed in various capacities and looked at hundreds of thousands
> of lines of code over the years, I’ve never once thought to myself how the
> task would have been easier if that supposed missing feature were truly
> there.

I think we've got a Blubber here.

> Ah, reply the nay-sayers, you only think that way because you have never
> known Feature X and how it could help. To which one must reply: hogwash.
> [...] If having Feature X really would make my web application development
> significantly easier, somebody would have already written a language or
> environment that used it.

Supporting Feature X is one thing; supporting it in a way that makes it
worthwhile to use is another.

PHP's anonymous functions are a perfect example.

~~~
mlinsey
A "blubber"?

~~~
bct
<http://en.wikipedia.org/wiki/Blub_>(programming)

------
jrockway
It's unfortunate that he thinks Perl is one of those lanagues (like PHP and
COBOL) that you "shouldn't use" because it's useless, dead, broken, whatever.
PHP gets a lot of hate because it's completely broken. The designers knew
nothing about programming when they designed it, and that shows up every time
someone writes a PHP site.

But I digress. Perl is not in the same class as PHP, it's in the same class as
Ruby and Python. I think it actually one-ups those languages in a variety of
places, actually. Perl has predictable scoping rules, unlike Ruby; and you can
have multi-line anonymous functions, unlike Python :) I know this sounds like
a broken record, but Perl's culture of libraries is something other languages
really need to steal. The best part of using Perl is the code that you _don't_
write ;)

Anyway, just thought I would clear this up. The world has a lot of hate for
Perl, but it's mostly unfounded. Perl back in 1996 sucked, but programmers
back in 1996 sucked. In the last few years, Perl has attracted a ton of
exceptional programmers, and we have some really nice stuff now. (Moose,
Ernst, Catalyst, DBIx::Class, the list goes on...)

</rant>

------
swombat
Why has this article gathered so many points here? It was quite inane, no?

------
mattdennewitz
one thing i learned at art school: having crummy paint and worn brushes
doesn't mean you can't produce a great piece of work.

~~~
bct
Unfortunately some people think that means there's no point in seeking out
good brushes and paint. (or worse, that good brushes and paint are an elitist
myth)

~~~
jrockway
And others think that painting with their own blood adds to the work because
it's so painful. (Speaking from experience, slicing open your arm is much less
painful than writing PHP. As for reading the average PHP app, let's just say
I'd rather die painfully.)

------
nir
Very true, but too often people end up focusing on tools instead of what you
do with them.

I suspect most people engaged in PHP/Ruby/Python/Erlang/etc use them as much
as suburban dads use their Black & Decker powertools. Seems to me you either
obsess about your tools or you actually use them - few do both.

~~~
nir
Sorry.. This was supposed to be in reply to "Unfortunately some people think
that means there's no point in seeking out good brushes and paint."

------
stcredzero
You need an easy way to pass around anonymous functions, or you can't easily
implement Don't Repeat Yourself. Result? You repeat yourself and write poorly
factored code.

Writing poorly factored code is the norm. Sturgeon's law applies here too.
That doesn't mean it should be your goal, however.

------
brlewis
I totally disagree with this essay, but wow is it nicely written.

