jump to navigation

Friday Philosophy – When Things Feel Wrong October 28, 2011

Posted by mwidlake in Friday Philosophy, Perceptions.
Tags: , ,
trackback

I got pinged by someone else missing the Friday Philosophy today {BTW, Good news, the technical blogs start again on Monday}, so…

Take a look at the below. It is a rather pleasant spot of countryside on Sao Migel in the Azores, where the area in the foreground has been converted into a bit of a garden to take advantage of the natural beauty.

Nice, isn’t it? Sorry the sun is not shining, but there you go. This waterfall just across the road from a set of water mills and waterfalls at Achada, which is one of the tourist spots that features often in brochures for Sao Miguel. But look at the scene again. Does anything strike you as odd about that waterfall? I could not put my finger on what it was, I just knew it looked odd. (Graham, if you don’t spot this immediately you owe me a pint).

There was a path heading up the valley to one side of the waterfall, one of a network meandering through the gardens, and I went up it. After a short while there was a smaller path heading up the hill more directly. It looked maintained but too steep to be a “wandering around enjoying the scenary” path. So I went up that. At the top of this path was a structure, a concrete “block house” It hummed and it gurgled. There was another path heading back the way I came, towards the waterfall. I followed along it and I found the top of the waterfall…

Yes, the waterfall was a fake. It was coming out of this huge concrete trough fed by a large pipe which went back to the humming, gurgling concrete block house. Returning back down to the bottom of the waterfall I could put my finger on what was odd about that waterfall. There is a valley to the left. OK, that is not so odd, the water could be coming from high land to the right of the valley and draining into the valley at this point. Except there is another valley to the right of the waterfall as well. Both had small streams running through them. This waterfall could only be natural if there was a perfectly formed, shallow middle valley heading up to the hills between the other two valleys and the only point where the water could escape was at the confluence of the lower two valleys. There was also a lot more water coming down this waterfall than was coming down the two valleys.

What has this got to do with Oracle and databases? Well, have you ever been in the position where you look at the output from a system and it just does not “feel right”? I sometimes refer to something I call DBA Intuition. There is also Developer Intuition and there is certainly Tester Intuition. All are where you are not sure why but it just looks or feels wrong (or, you just get a feeling for what a problem is or what the solution might be, all I class as DBA intuition, but I digress).

As an example, you are tasked to look at one of those terrible BI-type reports that consist of two pages of SQL and they want to know why it takes so long to run. Before you dive into the code, you look at the result of the report and you just think “That seems like an awfully large number of people responding to that advertising campaign” or “I can’t believe 10 percent of our income comes from selling baby diapers”.

Usually when I have dug into the actual report or part of the system that feels wrong I find out one of two things. That I had no idea that part of that business really worked that way, or, that the report is utter garbage. Somewhere in that report there a missing table or a logic flaw {nested AND and OR statements are a good place to look}. This of course has the advantage that there is no need for me to tune the report until someone can tell me WHAT the report is supposed to be identifying.

DBA Intuition is, I think, basically a gut feeling you develop in response to experience. I suppose I have more “tuning intuition” these days, I look at how fast some SQL is coming back and the volume of data and I think “seems reasonable actually” or “something is very inefficient here”. I’ve noticed that good system testers have this intuitive knack of just asking the new system to do things in a way or order that does not match the original intention.

So, I encourage you to trust your intuition. If some part of the system feels wrong, go and root around in the system undergrowth; climb up to the top of the data waterfall {OK, I’ll stop with the bad IT metaphors) and see what you find.

Incidentally, after I found the pump house we walked the other way up the valley, following the pipe and the pleasant gardens. It took maybe 20 minutes but we found the "real source" of the fake waterfall, which was a very nice, natural waterfall sitting in the very bottom of a pleasant valley – just where a waterfall should be. It just took a little more effort to get to it. I'm sure there is some moral story in there but I'm damned if I can work it out :-)

About these ads

Comments»

1. jgarry - October 28, 2011

It’s a constant source of irritation for me. My dba radar goes off, but I’m just a user, so there’s nothing I can do about it. The daily one is the train status. There’s a website and an automated phone service (Amtrak Julie), apparently using the same data source. The most desired information for users is estimated arrival/departure times. “Julie lies” is the common comment among commuters, since it is wildly optimistic about how much time a late train can make up, especially since off-schedule trains have to pull aside and wait for other trains on the many single-tracked sections of this second-busiest sector in the US.

So this morning I hear on the news there is a fatal train accident near the beginning of the line. I log in to the website, and I see “estimated departure 30 minutes late” and “estimated arrival on time” – for a ~1 hour trip to my departure station. Half hour later, I see something like “departed 27 minutes late” and “estimated arrival on time.” I call Julie, get the same info, talk to a live agent, get the same info, tell her “that can’t possibly be correct, but I have to go now and rush to try to make it.” Fortunately I bit back my snarky comment about how if that train is on time, it will be immortalized in legend and song. She tells me to hold while she “checks something else” and eventually comes back and says “relax, you have 35-40 minutes.”

Most frustrating is I think I’ve seen questions from people working on this system on the forums but I still can’t get close enough to fix it.

There is also an informal work-around of people with friends and cellphones.

Metrolink, the commuter lines that share some lines and management in the area, has a twitter update of all the lines. When that started, one day I was on a stopped train, and several people’s phones went off with an update with what was wrong – before the conductor knew. I thought “aha! This twitter thing does have some legitimate use cases.” Unfortunately, since then it has gotten more useless, as in the end it is a manual system, with all that implies about data consistency and usability. One day, I posted something unrelated on Cary Millsap’s blog, and tweeted a suggestion to the train people. Later, I got a very ambiguous text message on my “smart” phone from someone at Metrolink with a name very similar to Cary’s, which led to confusion on my part, even months later, as the rarely used twitter text message feed got added to my contact list under that other name. Or something like that.

And I sometimes work on barcode systems, so retail stores can be torture.

2. Graham - November 1, 2011

Hi Martin,

you had me worried, before reading further down I was desperately thinking ‘what is Martin getting at? Other than the fact it looks man-made I haven’t a clue what he’s on about!’. I might get you a pint anyway just for including some geology in a blog (although it’s more physical geography tbh).

Anyway, I whole heartedly agree with the dba gut instinct (I’m not female so can’t claim intuition) feeling. Now more interestingly… when your gut instinct is wrong, how much time does it waste – and how does this fit in with the Battle Against Any Guess? I think it’s fair to say that the more experience you have the stronger the gut instinct is, and possibly the harder it is to get past on the rare occasions that it’s incorrect.

mwidlake - November 1, 2011

That’s a good point about when your gut instinct is wrong and how entrenched your idea can get. I’ll ponder on that…

I’d argue that DBA Intuition {I’m in touch with my feminine side – it’s the left one :-) } is not a guess as such and the first thing you should do is mentally asses if it fits in with what you are seeing and if there is a way you can disprove the idea. That would certainly convert it from a wild guess to a working possibility. Oddly enough, a lot of people don’t seem to get that trying to disprove an idea is usually simpler and more effective than trying to prove it.

3. Luis Marques - November 5, 2011

Ouch, surprising reference here to Azores. Been a DBA and Portuguese, i never visited Azores. Shame on me :(


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 166 other followers

%d bloggers like this: