Monday, 4 February 2008

Exiting a Bus

I'll probably go back and write about previous IPTPYA episodes, but here's a fresh one for today.

The procedure for exitting a bus is rather complicated (I'll write more about other experiences later). But today all the stupidity of Vancouver mustered itself into one lady in a spectacular manifestation of misfiring neurons. Today we got to ride an older bus. These buses don't have advanced door opening technology like a pushbar (which, if repeatededly and violently shaken will eventually trigger the door opening switch normally triggered by a single push), no, these buses have a large 30 point font in clear yellow on black letters on both doors at eye level that reads: "STEP DOWN ON TOP STEP TO OPEN DOORS".

Let's dissect that. STEP DOWN. As opposed to stepping up, or sideways, or backwards, or remaining immobile, clearly indicates a step in a downward direction is required. But required for what? ON TOP STEP. Ohh, now as a reasonable person, I interpret this to mean that I need to step onto a step, as opposed to standing in the aisle waiting for something to happen through telepathy. TO OPEN DOORS. Ahhhh, so all this only applies if I actually want to open the doors. So what I'm getting out of this is standing in place probably won't open the doors. I need to move my footsies somewhere.

So, the bus stops and the lady is standing in the aisle directly infront of the door. As a bonus, the big green light above the door turns on, indicating that the doors will open on command. And two big white lights also turn on, illuminating the 30 point yellow on black font. Or rather, would have illuminated them if it wasn't the middle of the day with a clear sky. She stands there, staring at the door for a second, then leans forward, skillfully avoiding losing her balance and grabs the door handle (which is actually a handrail after the doors swing open), and starts violently shaking it. Nothing happens. Now, this is actually an impressive gymnastic feat. There are two large downward steps between the aisle and the door, to lean forward and grab the door without losing balance and accidentally stepping on the TOP STEP would take a lot of skill. I doubt I could do it without practicing. Over time the shaking becomes more violent until it climaxes when the green light turns off and the bus starts moving. Then the yelling starts. "Bah Doos! BAH DOOS! BAH DOOS! BAH DOOS!". (Translated in to English, that's "Back Doors", I think.)

I'm surprised the driver could even hear her over the racket of the engine and the violent door shaking which upon climaxing showed no signs of relenting. The driver stops the bus.. the magic green light and two white lights go on.. again.. and the driver yells back "You have to step down on the top step".

Pause. Pause. Violent door shaking. Complete foot immobility. BAH DOOS! BAH DOOS! At long last the three chimes sound indicating that all the doors are about to open, and the driver manually opens them. She storms off the bus in a huff. The kicker is she had a monthly bus pass dangling from her neck validated for the past several months, she's clearly a regular customer of the transit system, but apparently not a regular customer of logical thought processes. I guess we should thank her ineptitude for holding all of us up for a good minute of entertainment.

So to recap, when your attempting to exit a bus, the aisle is an IPTPYA.

Inappropriate Places to Park Your Assstronomically unintelligent keister

What is IPTPYA? Inappropriate Places To Park Your Ass. I live in Vancouver, and while I'm sure every city has its fair share of idiots, they seem to congregate around Universities. Vancouver has two of these institutions. I'm not just talking about students either, I'm talking about people, in general, who have somehow manged to avoid being eliminated by natural selection while simultaneously demonstrating they have only evolved enough logic and common sense to triumph over the turnip table of the local produce store in a battle of the wits.

One subtype of these people are my pet peeve. I'm a person that likes to get where I'm going without being held up for no good reason. I don't speed or drive dangerously when in my car, and I don't bump into people or shove I'm walking/running, and if there's a traffic jam, whatever, I'm fine with that. But it's the people who impede traffic (either vehicle or people traffic), the ones that are completely clueless to their surroundings, that don't even notice they're creating an impassible obstruction, and that can't fire the 3 required neurons to figure it all out, that really annoy me.

"I am constantly amazed by the lack of common sense and general awareness in University students". I started using this phrase back in undergrad. I noticed many of my fellow students didn't seem to be "all there" mentally. Just little things like on a perfectly flat section of street on a clear day: look left, look right, look left again, then step out on a quest to cross the street directly infront of the bus that is no more than 20 meters away. Oh, but then, hearing the horn and screeching brakes, look at the bus, and then stop. Deer in headlights. Do i keep crossing or do I go back? I know, I'll just stay here for a few seconds and think about it. IPTPYA.

These are their stories as witnessed by me.

Sunday, 3 February 2008

Making Drupal exist in a subdirectory

I have a confession: I am a bit of a neat freak when it comes to my files. Clutter annoys me almost as much as compressed files that extract themselves into the current working directory.
I set out on a quest today, to upgrade Drupal AND to make it happily exist in a subdirectory on my server, BUT, to make it appear that it exists in the root directory.

Actually just that turned out to be easy, Drupal even provides a guide that conveniently assumes you don't have any other content in your directory. I mean, you've got Drupal, why would you want a /photos directory that's not "inside" Drupal? Or a /files directory that Drupal doesn't manage? Stop being silly.

It turns out, though, that what I wanted was also quite easy, but piecing together the bits and cutting the cruft took excessively long.  But that's a typcial computery solution: A simple solution and a long and winding road to find it.

So, let's begin.

  1. Put Drupal in a subdirectory. Mine is called drupal-5.7

  2. Add a .htaccess to the root of the website to rewrite incoming requests to Drupal:
    RewriteEngine on
    RewriteRule ^$ drupal-5.7/index.php [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ drupal-5.7/$1 [L]

    Now, I'm not a .htaccess expert, so I may be slightly wrong in how exactly this works. The first RewriteRule directs the server to redirect all requests for "/" to Drupal's index.php, so drupal is what you see when you just type the base URL. The .htaccess inside the drupal directory can further rewrite this.
    The two rewrite conditions are for the next rule, !-f and !-d mean that only do this next rewrite if the file(or directory) doesn't already exist. I have /photos on my server that I don't want rewritten to /drupal-5.7/photos/
    The final rule simply appends the prefix drupal-5.7/ to the request, and sends it off. Drupal further rewrites this when Tidy URLs are used.

  3. Delete /index.php, we don't want the server to find it.

  4. Make sure you don't already have any existing files/directories that are inside the Drupal install. For example, I already use a /files directory, so does Drupal, so I renamed Drupal's to 'dfiles', and changed the config accordingly (Administration -> File System).

Cake. It all works as far as I can tell.