eaberry's blog

Major Site Blunders

Ya know, I just love somtimes when you get idiodic messages from major sites. Such as the following when I was trying to book an airline ticket ( I had to call in to book it ):

"The Returning date (03/09/2008) must be later than the Departing date (03/07/2009)."

The world must have already started going backwards in time.

Generic Cipher and Encryption

Lately I needed to encrypt some data: in this case username, password, and credit card data. It them hit me that there exists. I knew that I'd be reusing the encryption settings, so why not make some external API to do all that work for me so that all I have to do is say: "Hey, encrypt this!", or "Hey, decrypt this!".

Enter the "Cipher" module. It is a basic module that basically gives a developer an API to work with via a class to do basic encryption/description. Here's a little snippet of how it works:

Implementing Random ID Generation

NOTE: THIS IS A DRAFT COPY MISSING IMAGES, DIAGRAMS, AND OTHER MEDIA SUPPORT

Performance Ideas

So I have a few performance ideas that I wish to jot down here in my blog, and then implement and bench mark:

1. Use phpbtree to hold menu and path information
2. Use while( list($key, $value) = each($array)) because this does NOT make a copy of the array like foreach does

Syndicate content