I Wish PHP Could Read My Mind

PHPI’ve been working on a fairly large project, doing some ‘renovations’ on a php-based site.  So far the project has been a great deal of fun.  I enjoy working in php, and the original developer clearly followed the golden rule of starting with a plan and building from there. He also had the courtesy to document and comment his code, making it easy for me to follow in his footsteps.

Unfortunately, when it came to web usability and database security, he didn’t quite put best practices into place.  So, instead of being able to forge ahead with the additions to the code the site owner was hoping for, I’m having to step back and redesign the scripts from a user’s standpoint, as well as put some basic security measures into place.

I’m learning plenty, finding lots of opportunities to get creative, and getting some good ideas from the prior developer, but I have one beef about this project.  Actually, it’s the same beef I have about all php projects.  When working in html and css, when the carefully crafted result isn’t quite what was expected, it’s very easy to point the finger at the browser (usually, though not always, Internet Explorer).  In the case of php, however, it’s not quite so easy to assign blame elsewhere.

The fact is, php does exactly what you tell it to do — which is not necessarily what you want it to do. In fact, I’m taking a break to write this blog post for the very reason that my %&#* script is doing exactly what I’m telling it to, and unfortunately, this seems to bear little relation to what I’d like it to be doing. So if anyone has a crystal ball for php, that I can just hand over to it and say, “Here, look into the ball and you’ll see just what I’m after here,” I’d love to know where to get one of my own.

Be Sociable, Share!

Leave a Reply

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>