Archive for June 12th, 2005

The Importance of Commenting Your Code

When I was teaching myself PHP many, many years ago I thought that commenting my code was a complete waste of time. I was writing the code for my own use and so it wasn’t important to me that someone else be able to follow my logic very easily.

Fast forward through the years and today I find commenting my code to be one of the most important ways to save myself time. With all the projects I’m constantly juggling, it’s critical for me to comment my code so that I can come back days, weeks, and sometimes months later and pick up where I left off without much effort.
Read the rest of this entry »

Posted by Administrator on June 12th, 2005 .
Filed under: Programming | 2 Comments »

Quick Tip For PHP Loops

When you’re writing lengthy code it’s really easy to get confused and lose track of your control loops.

When I was making the transition from PHP newbie to being able to write my own code, I often had trouble keeping track of all the if/then loops, foreach loops, and all the other various control procedures. Invariably I’d type some code, upload it to the server, hit it with my browser only to get no output and no error code… the worst possible result.

That horrible blank screen that means a trip back to Notepad to hunt through lines and lines of code to figure out if it’s a missing } or one too many } or some other silly typo.

Many years later, and many many projects the wiser, I’ve got a coding method that all but eliminates these kind of time wasting coding problems.
Read the rest of this entry »

Posted by Administrator on June 12th, 2005 .
Filed under: Programming | 2 Comments »