Benchmarking PHP: Is it possible to have too many comments?

Posted by & filed under Programming.

PHP is an interpreted language; and as such, the computer needs to process the script each time it is run. Honestly, I don’t know much about the internal workings of PHP; so I don’t know how it handles comments in the code. More specifically, I don’t know how well it handles comments. I have seen… Read more »

Quick trick for speeding up pagination

Posted by & filed under Programming.

One of my web projects, like so many others, has a series of pages where data is displayed in a table. Often this data becomes too large for a single page, and it has to be broken down into separate pages. The 5 dollar word for this is pagination, and you’ve seen it; you just… Read more »

Multiple cases for switch construct

Posted by & filed under Programming.

Looking at the PHP documentation, it is not clear how to add multiple values for the same case in a switch construct. It seems that you should be able to do But, you can’t. I tried, and it didn’t work. Fortunately, after much searching, I found a way to do it; and it’s not near… Read more »

Syntax highlighting code in WordPress blogs

Posted by & filed under Blogging, Programming.

Since several of my posts have source code in them, I needed a way to syntax highlight. I found a pretty good one for PHP code, but it didn’t do anything else. While working on an article for a JavaScript function, I needed a highlighter. So, out searching I went.

Javascript time formatting function

Posted by & filed under Programming.

While working on a web application, I found myself with the need for a Javascript function that would format dates to a consistent state. Several different functions exist out on the internet to perform this task, but none were exactly what I was looking for. Most of them did a fairly decent job of taking… Read more »