PHP Constants: How many is too many?

What are PHP constants? A constant allows you to define data that will not change during execution. Think of it like a variable that is always the same. This may not sound very useful at first but I am going Read More …

Building a PHP Profiler Part 3: Database Load

Profiling Database Load Profiling database load is as simple as counting the number of times that a query is run on the database. Last week we added memory reporting to our profiler. This week we will update it to handle database queries and find Read More …

Building a PHP Profiler Part 2: PHP Memory Usage

Last week’s post included a simple PHP profiler class. This week we will expand on it and add in features to report on PHP memory usage within your script. We also add in some percentage reporting to make it easier Read More …

Building a PHP Profiler

What is a PHP Profiler? A profiler quickly becomes an absolute requirement for any large PHP project. Profiling provides the tools to look at your apps performance at different points within your code. By analyzing the time it takes to Read More …

Handling Bug Suspects like a Detective

Bug Suspects On a recent training flight, I was teaching the student about flight at a slow airspeed when our electrical systems began to malfunction. At first the radios lights flickered, and I thought it might be a problem with Read More …

User Error is Developer Error

Is user error even possible? I believe there are two possible attitudes when it comes to user error. Either you believe it is possible for the user to make a mistake or you believe it is not possible for the Read More …

Building a Select or Other input with PHP and jQuery

A select or other input is a great way to represent a list of common options but still give the user a chance to enter some other value entirely. It is a dropdown select field with options that provides a text Read More …

Automation is not always good

Several years ago, I was on a flight that taught me firsthand about the proper role of automation in our technology. We had been flying since early in the morning from Chester County Airport in Pennsylvania to Monterey Airport in Read More …

The Heading Bug

A heading bug is nothing like a software bug. It is a small pointer that rides inside of a plane’s heading indicator. You can move the bug with a knob to set it on a particular heading and it will stay Read More …

What does PHP stand for?

With a name like “PHP: Hypertext Preprocessor” you can be sure that PHP will have good support for recursion. A recursive function is simply a function that calls itself. You don’t need to do anything special in the function’s definition Read More …