Thursday, 11 December 2008


I need to document this.  Why do most help manuals and HOWTOs read like the author assumes the reader is an expert, and knows what he or she is doing?  I had a professor like that once in undergrad; he taught his course as though we all had already mastered the content.  We learned nothing.

I couldn't help thinking of him while trying to setup VPN access to UBC.  "It's easy, even in Linux" the HOWTO claims, but it is scarcely more than: 1. Setup VPN.  2. Add routes.  3. Done.  Steps 1 and 2 could use a few sub-points.

Sunday, 30 March 2008

Bridging Media

I haven't posted anything hackishery in a while, so here we go.. Yesterday I attended Bridging Media, my super sekret invite was secured through a friend of mine, Erica, who happened to be co-running the event. A very successful event. Hats off to Erica and the whole organizing crew! I'd signup for another one in a heartbeat.

Sunday, 16 March 2008

Exiting a Bus - Episode 4 - A New Dope

I just don't understand the logical processes used by some people. Further, I don't understand how these people have avoided being eliminated from our society through some sort of accident of their own causing. But whatever.

Let's set the scene: It's a nice quiet day, I'm on a bus coming home from campus, the bus is rather empty. It's an extended "accordion" bus, 60 feet long, and plenty of seats available.

DING stop request, nothing unusual. I'm sitting at the front left of the bus, in the first set of seats facing forward, just minding my own business. The bus pulls up to the stop, stops, and opens the front doors just incase anyone at the stop wants to get on, but no one does. Then comes the "hiss" of the compressed air opening one of the rear doors, judging by the volume, the middle doors, evidentially someone is getting off, another successful bus stop. Those doors will hiss again in 5 seconds and we'll be on our way.

But before that happens, the excitement starts. About 2 seconds before the doors close, an asian lady (why is it always asian?) probably early 40s, sitting in the closest seat to the front of the bus (shown in blue in the diagram below), gets up and starts walking towards the back of the bus. I'm in the first set of forward facing seats so she quickly passes out of my vision. I just assumed she was going for an empty pair of forward facing seats.

Apparently Not.

It takes a good 10 seconds to walk the length of one of these buses. The doors have closed for a good 5 seconds and the driver is already pulling out into traffic. And then we hear it. "WAIT STOP I WANT TO GET OFF, DOORS DOORS!".

How to Exit A Bus

Naturally, we all turn around to see what the ruckus is about. Yup, it's that same lady. She walked from the front of the bus to the rear, and then attempted to exit by the rear doors. I admire her strictly obeying all those signs that say "Please Exit by the Rear Doors". But .. maybe a little common sense next time? Please? So let's review.. When sitting at the closest seat to the front of the bus, the only appropriate exit to use is the one furthest from you.

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.