Number crunching and buses!

A few days ago, Translink announced that they would be releasing their bus, train and seabus route information in a standard format. A list of every bus stop, route, time, etc might not seem overly exciting to most people, but I love datasets. Admittedly, I often don’t know exactly what to do with datasets, but that’s hardly the real issue here. Anyhow, this seemed like a promising thing for me to do and I downloaded it, unzipped it and spent a couple of hours prepping a Rails project to serve as a new home for it.

Roughly 500 routes, 8700 stops, 126000 trips and 3.4 million timepoints at those stops. Not a whopping amount of data, but enough to start having some fun. My initial plan was just to be able to plot the stops for a given route onto google maps. That’s done in it’s ugly glory at my stopfinder. If you want to search for a 1 or 2 digit route, put in the leading 0’s. Sorry, haven’t done that yet.

My next steps are going to be to publish a number of primitive operations on the data with results in JSON format. Things like ‘closest stop to lat,lon’, ‘how to get from stop x to stop y’, and other similar sorts of things. The idea being that if I can build up a suitable library of common operations on the dataset, any future ideas that do come to mind should be relatively easy to implement.

That and if anyone does want to do some data mining, well, this is an option. I’ll post any updates, formats and that sort of thing on this site as I work through it. In general, the services will be pretty much simply URL based and will return raw JSON. Nothing special, but fairly easy to parse and work with. I have a relatively irrational dislike of XML which I will probably get over at some point, but it will take someone making a very good argument.

Cyclocross, West Coast Style

Cyclocross is my favourite type of bike racing. Due to my general lack of fitness and catastrophically (for a bike racer) low hematocrit, it’s also a type of racing that I’m pretty unsuited for. But amateur racing is for fun and not glory, so we’re not going to focus on that.

Ottawa has a great series of races each fall and while I knew it was something special, I had hopes that Vancouver would offer a similar number of races. As it turns out, there are a bunch of races, unfortunately, 4 of the 6 in the Lower Mainland are on two weekends as opposed to spread out over the season. Alas.

On the plus side, it’s easier to pretend you are a Serious Bike Racer when you have back to back races, which was kind of cool for me.

Race 1: New Brighton Park

Tough, tough race – Google Earth

Start was paved and slightly downhill into a paved hairpin. Bunny hop up a curb and into a narrow, muddy climb. No need to run up this one. Some up and down twisties then a double barrier for running. Up over some more grass and into some very tight, massively off camber corners where speeds dropped to below walking. Couple more corners, then some deep sand, more grass, two very short steep climbs, if it had been wet, both would have been run-ups, but as it was, riding was possible. Down to more sand and a giant step, then a final climb onto the pavement again.

Tough for me mainly as there was effectively no place to recover. I’m a decent technical rider, but I need to have short sections to ease up for a bit and bring the heart rate under control for a bit. Otherwise, it’s a more pure form of suffering which does not bode well for me. This was the case here. The course was, despite some short punchy climbs, was relatively flat, so there were no extended downhills to ease up a bit. To use some retarded sport dude statement, I was deep in the hurt locker the entire race.

Placed near the back of the pack. On the lead lap though.

Race 2: Vanier Park

More my style and possibly one of the most fun courses I’ve ever raced on – Google Earth

The start on this one was across a flat, hard packed and very bumpy grass field. Quick dismount to get up 6ish stairs and back on to climb up alongside the Planetarium. Winding climb up through the trees, not too steep, but in some thickish grass so it was somewhat of a power climb. Off camber hairpin at the top to drop down to the main part of the course again. Over a bridge and then continue the descent through some fast sweeping corners. Deep gravel hairpin, then some more twisty grass stuff and a couple of barriers on a steep uphill. From there, into what was called the maze. 4 back to back tight hairpins, 2 very off camber. The last part of the course was a hard packed mud out and back and a fun steep downhill into a right/left/right before the finish line.

The nice thing about this course, aside from the lack of places where running was required, was that there were places to recover. The relatively long downhill beside the Planetarium allowed for a few seconds of respite, which I need badly in a ‘cross race. It showed. I finished just behind someone who was nearly 3 minutes ahead of me at New Brighton. I was 2:30 behind the winner at Vanier and more like 6:00 behind the winner at New Brighton. Ended up 14th out of about 40, so not terrible I suppose.

What did I learn here? Not much. I don’t do well in road races that have lots of climbs as I am not terribly good at them. That said, climbing in a ‘cross race seems to be good for me. It means there will be recovery time later. Still, was well above the halfway through the field point at Vanier, so I’m taking that as a good sign.

Quality is Job One

Uh, yeah.

So it is, but actually stating that, or anything along those lines? Way to kill the team, boss! (See Peopleware)

That said, quality assurance, quality control, QA, call it what you want, but it’s one of the more misunderstood aspects to software development. Oh sure, everyone knows that they need to do more QA or better QA, but lip service is about all that is ever paid towards it. I am notably not including in my ‘everyone’ those who feel that QA can be completely automated. You guys are wrong and I’m going to leave it at that. You also may think you don’t need to do it, see this article for some classic arguments against that fallacy.

I’m not going to go into depth about QA, how to do it, best practices or anything along those lines as I’m fairly unqualified. That said, I’m not really qualified to talk about anything, but that doesn’t really stop me.

QA is a processes, not a task

This particular fail case is something I’ve seen in multiple organizations now. The most obvious symptom of this is when management has decreed that there is a block of a few hours set aside to ‘do QA’ on an application with a few hundred known use cases. Another obvious indicator is when other employees are volunteered to do a few hours of QA on top of their normal job. Think you’re going to get good results from that?

The root cause of this failure is simply not understanding how QA works, so let’s walk through it a bit. In a very broad sense, the general list of tasks for QA is something like this:

1. Go through the basic cases

2. Go through the corner cases

3. Go through obscure, known failure cases

4. Exploratory testing

5. Automating 1, 2 and 3.

So, how does this fit into a day of work? Let’s find out:

First off, we’re going to go through the basic use cases for the application. Then, there is a pile of corner cases that are pretty valid that need to be checked out. Then it’s time to check all the really obscure, but horribly embarrassing failures that have been seen before. From there we can finally…What? You changed the code? Okay, first off, we’re going to go through the basic use cases for the application…

Interruption here! “Silly tester,” says the savvy developer, “You only need to re-test the parts of the system that were changed.” Nice theory, but wrong in many, many ways. Simply put, if this was the case, testing outside of developers would never be needed. That generally goes well.

Back to the task at hand, do the basic cases, do the corner caWHAT? Changed again? Basic cases…

The real job of QA starts at step 4, which we haven’t even seen yet. Exploratory testing is finding the embarrassing defects before they get out into the wild. A good tester at this phase is going to break your application in ways you haven’t even dreamed of. In ways that only 0.1% of your users would ever try to do. Of course, if 0.1% of your users do it, and you get 10k uniques per day? That’s 10 people per day that are going to hit this embarrassing bug that how could you possible let into the wild and I’m taking my business elsewhere right now as I obviously cannot trust you with my data. And if one of those has a blog? Heh. Have fun with that.

So the epic fail with having 16 hours scheduled in to test your quarter million lines of code application? If you’ve got bug fixing going on at the same time, any of your competent testers will never get past step 1. Any testers that listen to the savvy developer, or worse, are the savvy developer will miss basic cases and you deploy with fundamental breaks.

The purpose of QA is not to have someone say, “Wonderful developer, your application is perfect!” If I hear that from a tester, I assume the person isn’t doing their job very well. QA should hurt your feelings. Assumptions you made should be laid bare and justified or thrown out if incorrect. This is often the last line of defense before your customers see your application, take it seriously.