Archive for June, 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 »

If You Can’t Be First, Don’t Even Bother

I was recently talking with a client of mine that pays me a monthly retainer for marketing consultations and service. I was trying to sum up the advice given in the wonderful marketing book “Positioning: The Battle for Your Mind”.

I was having a difficult time getting the point across so I used an example: Dyson vacuum cleaners.
Read the rest of this entry »

Posted by Administrator on June 10th, 2005 .
Filed under: Marketing, Entrepreneurs | 2 Comments »

90% of Success Is Just Following Through

Woody Allen said 80% of success is showing up. I don’t know how long ago he uttered the phrase but I’m certain of one thing: customer service hasn’t gotten any better since then.

What’s truly amazing to me is how great a divide there is between what people say they’ll do and what they actually do.

If you’re in sales, or you’re an entrepreneur scratching and fighting for every new client you might want to put less energy into generating sales leads and little more attention into following through on the sales leads you DO have.
Read the rest of this entry »

Posted by Administrator on June 7th, 2005 .
Filed under: Customer Service | 2 Comments »

Adding Functionality to Templates

I recently saw a post in the forums for WordPress where someone was trying to add someone else’s php code to their themes. The code started off by setting a cookie. It was correctly commented in the source code to

…put this before any html

The reason being that to set a cookie, there must be no information sent to the browser yet. This is also true of other header(); php commands.

So, how can we put the script where we want, without having a whole bunch of errors thrown on the page?
Read the rest of this entry »

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