Element Wrappers in JavaScript

Element wrappers are coming. We are going to see more frameworks using wrappers for JavaScript DOM Elements.

Read ›

Passwords From Hell

Your email password is the most important password. It links to your bank and any other sensitive info using the forgot password feature.

After reading the recent Lifehacker article How I'd Hack Your Weak Passwords I wanted to share my thoughts. I disagree on some points.

Read ›

Escape Input and Output

There is a surprising amount of confusion about XSS and SQL injection among the PHP programmers I've worked with. Here are some common ways to do it right and to do it wrong.

Read ›

Wake Up! Do You Know Encryption?

I'm surprised by how many developers aren't familiar with encryption. Many say to me that encryption is md5 and sha1.

Applications often need one-way encryption and two-way encryption. There are also public/private key encryption schemes like pgp which are not as commonly used in web applications.

Read ›

Resumes and Interviews Gone Wrong

I've had some colorful interviews lately. It brought to mind a lot of DON'Ts in Interviews and Resumes. I capitalize DON'T because everyone should know these basic rules.

Read ›

Will Mobile Devices Make Flash Stronger?

Yesterday I was playing Flash games with my 5 year old on our Ubuntu desktop. As you may know, Flash support on Linux is dismal. Specifically I was using the Adobe plugin on Firefox 3.6 in Ubuntu 9.10 with a powerful NVIDIA GeForce 9600-series graphics card and a speedy Intel Core2 Duo. We played games on flonga.com.

Here are some of the problems that made games unplayable:

Read ›

Wrangling MS Word's HTML

Oh boy.

Handling a paste from a Word document into a browser-based WYSIWYG editor is a pain in the butt. I'm using CKEDITOR, which does have a built-in tool for stripping Word's nasty HTML, but it doesn't work well. I also had no success using PHP's HTMLPurifier, htmLawed or Tidy alone.

Read ›

Flash's Über Compatibility

Here is the HTML that Adobe Recommends to embed a flash file:

Read ›


I developed the following php function after writing trim($path,'/') too many times. It took me a lot of iterations to pass all the unit tests, but it works with URI and file paths for all OSs. It goes as far as to account for the strange possibility of a path containing an escaped slash. It runs pretty quickly--less than twice as long as a simple use of join: join('/',$parts).

Read ›

Multiple Codebases on localhost

After writing my last article about using apache's RewriteCond to work with multiple codebases on localhost, a coworker pointed out a far simpler method using apache VirtualHosts.

On my dev machine, I'm lazy about server admin and just use wamp. To work with multiple codebases below is my simple and easy configuration.

Read ›