[kw-pm] why the hatred for PHP?

Andrew Kohlsmith akohlsmith-pm at benshaw.com
Wed Jun 23 13:46:39 CDT 2004


On Wednesday 23 June 2004 14:42, Marko Vidberg wrote:
> Ok, I get all the griping (validly so) about messy code being too easy
> with PHP, having tried to hack stuff into squirrelmail and oscommerce with
> limited success.  I do have to agree that a lot of the bigger OSS PHP
> projects are a mess.  Regardless, I still find working with PHP (with
> properly separated logic and presentation sections) to be much quicker
> than with Perl when it comes to web work... but then again I never was the
> greatest Perl guru.

Actually I find that the easiest-to-read programs are written by 
mediocre-to-good skill level programmers.  The newbies make a mess of 
everything because they don't know what they're doing (and usually don't 
care) and the stellar programmers oftentimes don't comment very well because 
they're so used to what they're doing that it is obvious to them (through no 
fault of their own).

The mediocre programmer is more careful and explicit in his or her 
documentation.  The algorithms and techniques used will not be top-notch but 
the code usually does work and is easy to understand.  There's a great quote 
I am reminded of:

An architect's first work is apt to be spare and clean.  He knows he doesn't 
know what he's doing, so he does it carefully and with great restraint.

As he designs the first work, frill after frill and embellishment after 
embellishment occur to him.  These get stored away to be used "next time".  
Sooner or later the first system is finished, and the architect, with firm 
confidence and a demonstrated mastery of that class of systems, is ready to 
build a second system.

This second is the most dangerous system a man ever designs. When he does his 
third and later ones, his prior experiences will confirm each other as to the 
general characteristics of such systems, and their differences will identify 
those parts of his experience that are particular and not generalizable.

The general tendency is to over-design the second system, using all the ideas 
and frills that were cautiously sidetracked on the first one.  The result, as 
Ovid says, is a "big pile".
                -- Frederick Brooks, "The Mythical Man Month"

-A.



More information about the kw-pm mailing list