APD post processing wrapper
November 17th, 2007 by Aaron
A while ago, I discovered the ‘joys’ of APD… and then moreso, the ‘joys’ of not being able to make heads or tails out of the output script. After digging deeper, I saw that the original directory already had some PHP scripts to parse the output. I ran those and wasn’t very impressed. Even more important, my boss wouldn’t be impressed. I needed to be able to make something that could be useful to integrate into a table (I finally used dojo to create a table…)
At any rate, I thought I might save anyone some time by posting the code here:
Continue reading APD post processing wrapper
Is it better to write your ‘for’ loops backwards in PHP?
July 27th, 2007 by Aaron
After listening to a javascript internals optimization talk, I wanted to see how these concepts could relate to PHP. The biggest thing that stuck out to me was the order of the for loops in javascript. According to the talk, loops written backwards (or using the deincrement operator instead of the increment one…) was a lot faster. They said comparing a value to zero was faster than comparing a value to another value. With the backward loop, you were always comparing to zero. I decided to try these tests on php:
Continue reading Is it better to write your ‘for’ loops backwards in PHP?
The Perils of the AT in PHP
July 27th, 2007 by Aaron
A lot of weird things have been happening ever since we introduced a new error handler at (”the triangle”). First of all, it took down our whole site for a good portion of time (oops!), then it created a large project for us to review our code. Turns out a lot of the errors were just weird little things that we ignored. However, there were a few times where the @ operator (http://us3.php.net/manual/en/language.operators.errorcontrol.php) was a huge problem. I, for once, don’t think that the @ operator should ever be used again. Let me detail out what it does and why I don’t think we should use it:
Continue reading The Perils of the AT in PHP
Load Time Analyzer for Firefox
June 24th, 2007 by Aaron
So, I started looking at a few load time analyzers for my sites - and I found an interesting plugin for firefox. I wasn’t too entirely sure what I was going to find - but I figured I’d try it out and figure out if it was useful.
My test site will be JEMDiary - mainly because I know ALOT about it.
I could have used a local website, I’m sure - but a remote site was going to give a better load time analysis. JEMDiary’s homepage is a static HTML file (generated periodically behind the scenes). It loads a few external js and css files, and a set of images as well. The images in the images directory send headers to cache themselves, and so do the css and js files (interestingly, if the front page had specific profile images, they would not be cached…) At any rate, I wanted to test a fresh load on the site, and then a cached one - and see what I can determine from these load times.
Lets go…
Continue reading Load Time Analyzer for Firefox
