The Logic behind naming roads

I-440 wraps around Raleigh
I currently live in the triangle area in North Carolina. This morning, actually, just a few minutes ago, I overheard the announcer on the NBC17 news say that I440, the circular interstate that wraps around Raleigh, will be renamed.
At the moment the naming convention is "the inner beltline" for the lane that moves clockwise, and "the outer beltline" for the lane that moves counter-clockwise. It makes sense logically, because there's no real distinct north. east, south, or west.
But apparently this convention is confusing people and so the road names will change to be I440 east and I440 west, a modification that'll apparently cost around 40 million dollars.
Although it makes sense, it'll be strange being on the southern half of I440 east which is actually moving west and vice versa.
Print This Post
Implementing short URLs using case-sensitive Routes with Zend Framework
Since short URLs are all the rage these days, I wanted to outfit one of my websites with its own short URL capability.
A simple way to accomplish this is to base62 encode a numeric identifier (the database table's primary key). In order to identify a URL as a short URL, it will be prefixed with an uppercase 'S'. So, a short URL would be something like this: http://mixoom.com/Snfup8.
With regular expressions it's simple to turn off and on case sensitivity using (?-i) and (?i) respectively. So ultimately the new route needed in order to accomplish mapping the short URL is the following:
$route = new Portal_Controller_Router_Route_Regex(
'(?-i)S([\w\d]+)',
array('controller' => 'photos',
'action' => 'shorturl'),
array('shortid' => 1)
);
Print This Post