Blog Aggregator - Amardeep Sidhu

  • Tags

  • Archives

  • Meta

  •  

    April 2008
    M T W T F S S
    « Mar   May »
     123456
    78910111213
    14151617181920
    21222324252627
    282930  

Archive for April 6th, 2008

06 Apr

Messed-Up App of the Day

Greetings from London Gatwick Airport. Messed-up app of the day: National Express self-service ticketing kiosk, London Heathrow Airport, Terminal 5.

I’m connecting through London on my way home. Unfortunately, my connection requires a bus ride from Heathrow (LHR) to Gatwick (LGW). Not my favorite, but I’ve done it before and survived. Bus is run by National Express. It’s a £19 ticket; apparently only £17 if you’re doing the BA/AA ugly connection thing I’m doing. I don’t remember having to pay that myself before, but today I’m glad I did.

One way to buy your ticket is through one of the self-service ticket machines outside baggage claim. Here’s approximately how that went:

Machine: Where will you be going?

Me: London Gatwick.

Then the machine I was doing business with popped a widget that showed the number of qualifying journeys the machine had found so far. It’s one of those “watch the number change really fast” fields. I watched it count through 10, and then 50, and then 100 (jaw drop), and then eventually 500, until finally, about a minute later, the counter reached roughly 2,000. Finally, it said, “2,000 qualifying journeys found”, or something to that effect.

Then it showed me the first half dozen or so of those “qualifying journeys.”

  • 11:10 Heathrow to Gatwick
  • 11:20 Heathrow to Gatwick
  • 11:30 Heathrow to Gatwick

It was 10:55 at the time. I chose 11:10.

“Brilliant.”

Let me summarize. This thing computes the schedule for each of the next 2,000 bus rides you might want to take. You only look at six of them. The cost to you for all this information you don’t look at is (N+1)*60 seconds of your time, where N is the number of people ahead of you in the queue for this machine. If there are six or more people ahead of you in your queue, then you’re probably going to miss the next bus.

I don’t know whether it’s an Oracle application behind this or not. It doesn’t matter. It’s stupid either way.

There’s a simple solution. Begin by asking approximately when the user wants his bus ride. The default value should be “now.” I don’t know what percentage of people would ever want to change that value, but I doubt I ever would. Then instead of returning 2,000 qualifying journeys sorted by departure time, return only journeys whose departure time is within ±1 hour of his choice. Of course, list only those departure times that occur in the future.

SQL like this would do it:

select   departure_time, origin, destination, ...from     whatever1, whatever2, …where    origin = :here         and destination = :there         and departure_time between :your_time - 1/24 and :your_time + 1/24         and departure_time > sysdateorder by 1

Okay, that’s functionally dirty because what happens if someone specifies a :your_time value of 3am, and there are no buses scheduled anywhere within 2am-4am?

Then be clever and use analytic functions to find the 10 rows that have departure_time that are closest to :your_time. Be a developer.

The functional difference we’re trying to achieve is to stop burning computing and communication resources producing 1,990 rows that nobody wants to see anyway. The benefit? Reduction of human suffering in situations wherein frustrated people who are trying to make their connections are missing buses because a machine that takes their money is spending time making calculations nobody needs.

06 Apr

Automating Wordpress 2.5 upgrade

I recently upgraded my blog to Wordpress 2.5. The manual process is real cumbersome. Today I came across few plugins which help in almost automating the upgrade stuff.
Wordpress Automatic upgrade: As per description this plugin first takes backup and then upgrades. I didn’t try this one, though.
Instant Upgrade: I upgraded one of my blog using […]

06 Apr

Gtalk with Winamp 5.531

If you use Gtalk and Winamp simultaneously and tried to set the currently playing track as your status, you might have been faced by Gtalk hanging. I also struggled with this for 2 weeks until  I did a bit of googling and got a link which gives a trick to get rid of the problem.
The […]

© 2008 Blog Aggregator - Amardeep Sidhu | Entries (RSS) and Comments (RSS)

Powered by Wordpress, design by Web4 Sudoku, based on Pinkline by GPS Gazette