A PHP Apology?
Via the Seattle Tech Startups list, I came across probably the most vehement, well-written, detailed critique of the PHP language I have seen yet.
Via the Seattle Tech Startups list, I came across probably the most vehement, well-written, detailed critique of the PHP language I have seen yet.
We're big fans of the Dojo Toolkit, a Javascript framework that allows you to build rich Internet applications right in the browser. We're impressed with the power and flexibility, and have built several big applications on it in addition to solving lots of small tasks.
We've also used other Javascript libraries, including JQuery, Prototype, Scriptaculous, and several others.
PHP development is one of our specialties at Freelock Computing. I've written quite a few PHP applications, some from scratch, some starting with other people's code, some as extensions for open source projects.
There are thousands of languages out there, but only a couple handfuls are used for web applications. Of these, PHP is a runaway success. Yet I constantly see it criticized by developers of other languages, often for completely untrue reasons.
Ok. Last post on the quality code series. One of the downsides of getting older is realizing you do have shortcomings. You know how when you're young, going into a job interview, the toughest question is the one about your weaknesses?
Before code can be customizable, it must be clear. But clarity is not enough, if you're going to be using a codebase in multiple places.
Programming is an exercise in understanding a problem. To program effectively, you need to fully understand, in intricate detail, the problem your program is solving. Sometimes as a programmer you don't fully understand the problem until you've wrestled with it a few times in code.
Programming borrows a lot from the construction industry. Many programming terms derive from construction: hacking, builds, development, architecture, scaffolding, frameworks, and dozens of others. But in some ways, programming has an element of power beyond construction.
Continuing on the series, the next item on the list seems to be the mistake I see the most--putting slow code in loops, loading up things that don't need to be loaded, making simple requests expensive.
There are many articles that cover PHP vulnerabilities, but I've run across a lot of programmers and code that seems oblivious to them.