Archive for June, 2008

An introduction to friendly URLs in PHP

Sunday, June 22nd, 2008 Posted in PHP, RegEx | 6 Comments »

Nice URLs, readable URLs, search-engine-friendly URLs. Different names same deal. It can't really be disagreed on that something like example.com/index.php?page=article&id=409 is not nearly as nice as example.com/article/409. Turns out this isn't all that hard with PHP - infact it can turn into ...

IE6 z-index bug

Monday, June 16th, 2008 Posted in Browser Quirks | No Comments »

I ran into an IE6 bug the other day which I've encountered a few times before and managed to workaround without really knowing the true cause. This time I decided to look into what was actually going on. The problem is the way ...

Multiple Dispatch and the Visitor Pattern

Saturday, June 14th, 2008 Posted in Code Design, Design Patterns, Java, Lisp | No Comments »

Following from my yakking about the state machine pattern, I've run into situations since where I've had a class which must react differently to different inputs, and thought how, rather than write a huge switch statement, or huge else-if with ...

UTF-7 with JavaMail

Saturday, June 14th, 2008 Posted in Java, Protocols | No Comments »

Java has a pretty cool api for handling email called JavaMail. There are classes for constructing and sending multipart email as well as classes for connecting to mailboxes and processing the messages therein. I hit a bit of a problem, however, ...