When you screw up … make it positive for your users

Yesterday I was caught up in an interesting SNAFU at my local Supermarket.  All of the checkout registers shut down, thus making it impossible to pay for groceries.  Later on Twitter, the company apologized as we discovered it was actually a nationwide outage!



News of the outage spread like wildfire through the media:







TL;DR – people were forced to abandon their shopping trolleys and had to leave the stores. 

Needless to say, consumers vented loudly and forcefully at Woolworths, and the negative press naturally struck a chord with the general public, because we all feel empathy for the parent in front of the television cameras lamenting their inability to feed their family that night.  (For the record, my boys had meat balls and salad last night that we made with the leftovers we had in the fridge Smile)

In a perfect world, IT system updates should never cause pain for the users of those IT systems, but no matter how careful the testing and planning, I think it is reasonable to assert that we can never eliminate totally the chances of a major problem during an upgrade, our aim is always to shrink the probability to a close to zero as possible.

That brings me to the point of this post – and this perhaps slightly controversial stance.  I don’t think IT outages really matter that much from the perspective of the customer. For example, a while back Amazon had a huge outage here in Australia due to storms in Sydney.  Delta Airlines had a big outage in late 2016.  But last time I checked, people are still flying Delta and still buying stuff they didn’t need from Amazon Smile. Customers will forgive an outage but only if you prioritize their needs over yours during the crisis.  People are still ripping into Woolworths today because a Twitter apology doesn’t really get consumers any closer to taking groceries home. 

So this is what I would have done if I was Woolworths…. Make an announcement in each store that the store needs to close unexpectedly and customers to take your trolley to the nearest checkout (even though I know that the checkout’s are not working).  At that point, simply let people take what they have accumulated so far in their trolleys for no charge.  The news articles above already mentioned that the stores had security staff on hand to assist with closing the stores – so there is protection against a “looting mentality” being created.  Yes, there will be still be some negative press for those customers that could not get into the stores once they closed, but I contend that ultimately this would have turned into a positive result for Woolworths.  Yes you take a hit on the bottom line for yesterdays revenue, but the media attention becomes the mums and dads walking out of the stores smiling about the free shop they just got, rather than swearing they’ll never shop at Woolworths again.

Outages don’t matter.  Meeting the customer need is what matters.

Don’t get me wrong – I’m not claiming that any and every company I have ever worked for, or worked with, has a glowing record of understanding how to meet customer needs during times of crisis.  My point is that it should be something to always strive for – when you inflict pain on your customers due to the information technology solutions you build, then do your best to own the problem, and bust a gut trying to make the experience as bearable as possible for your customers, or even a win for them. 

Whether you turn bad into good, or bad into worse, rest assured your customers will remember you for it.


Some members of the Oracle community got well and truly into the April Fools Day spirit this year.

There were plenty of very earnest looking blog posts about a new 18c function – “TO_DOG_YEAR”.  You can read their posts here


They even enlisted the help of the team here at AskTOM where they posed a question looking for more details here.

But naturally, it was important to get as many puns and hints into our answer as possible – did you spot them all ? Smile



2017–what grabbed your attention

Here are the blog posts that you hit on most this year.  Thanks for supporting the blog, and always, there will be more content next year !

Buffer cache hit ratio–blast from the past

I was perusing some old content during a hard drive “spring clean” the other day, and I found an old gem from way back in 2001.  A time when the database community were trying to dispel the myth that all database performance issues could be tracked back to,  and solved via, the database buffer cache hit ratio.  Thankfully, much of that folklore has now passed into the realm of fiction, but I remember at the time, as a means of showing how silly some of the claims were, I published a routine that would generate any buffer cache hit ratio you desired.  It just simply ran a query to burn through logical I/O’s (and burn a whole in your CPU!) until the required number of operations bumped up the buffer cache hit ratio to whatever number you liked Smile 

Less performance, more work done…. all to get a nice summary number.

The kinds of statistics that the database collects, and what each one represents has changed over the years and versions of Oracle, but I figured I’d present the routine in original form as a nostalgic reminder that statistics without an understanding behind them are as good as no statistics at all.

Enjoy !

create or replace
procedure choose_a_hit_ratio(p_ratio number default 99,p_show_only boolean default false) is
  v_phy                number;
  v_db                 number;
  v_con                number;
  v_count              number;
  v_additional_congets number;
  v_hit number;
  procedure show_hit is
    select p.value, d.value, c.value
    into v_phy, v_db, v_con
      ( select value from v$sysstat where name = 'physical reads' ) p,
      ( select value from v$sysstat where name = 'db block gets' ) d,
      ( select value from v$sysstat where name = 'consistent gets' ) c;
    v_hit := 1-(v_phy/(v_db+v_con));
    dbms_output.put_line('Current ratio is: '||round(v_hit*100,5));
-- First we work out the ratio in the normal fashion

  if p_ratio/100  99.9999999 then
    dbms_output.put_line('Sorry - I cannot help you');
  end if;
-- Flipping the formula we can work out how many more consistent gets
-- we need to increase the hit ratio
  v_additional_congets := trunc(v_phy/(1-p_ratio/100)-v_db - v_con);

  dbms_output.put_line('Another '||v_additional_congets||' consistent gets needed...');

  if p_show_only then return; end if;
-- Create a simple table to hold 200 rows in a single block
    execute immediate 'drop table dummy';
    when others then null;

  execute immediate 'create table dummy (n primary key) organization index as '||
                    'select rownum n from all_objects where rownum  prior n
      start with n = 1 )
    where rownum  exec choose_a_hit_ratio(85,true);
Current ratio is: 82.30833
Another 29385 consistent gets needed...

PL/SQL procedure successfully completed.

SQL> exec choose_a_hit_ratio(85);
Current ratio is: 82.30833
Another 29385 consistent gets needed...
Current ratio is: 86.24548

PL/SQL procedure successfully completed.

SQL> exec choose_a_hit_ratio(90,true);
Current ratio is: 86.24731
Another 79053 consistent gets needed...

PL/SQL procedure successfully completed.

SQL> exec choose_a_hit_ratio(90);
Current ratio is: 86.24731
Another 79053 consistent gets needed...
Current ratio is: 90.5702

PL/SQL procedure successfully completed.

SQL> exec choose_a_hit_ratio(98,true);
Current ratio is: 90.5709
Another 1141299 consistent gets needed...

PL/SQL procedure successfully completed.

SQL> exec choose_a_hit_ratio(98);
Current ratio is: 90.5709
Another 1141299 consistent gets needed...
Current ratio is: 98.02386

PL/SQL procedure successfully completed.

The devastating death PC emoji of doom

So there I am.  Sitting at Perth airport.  My flight from Perth to Sydney, the first leg on my trip to OpenWorld 2017 is delayed.  Of course, delays are not unusual and do not normally bother me.  Because I can just flip open my laptop, knock off a few AskTOM questions while I wait.

But not this time.  I press the Power button and I get this:

Image result for windows 10 collectin memory dump

That is the first time I’ve ever seen that on my nice Dell XPS 13 laptop, but I figure “No big drama.  Probably just some sleep glitch” and let the machine reboot.

That is when the real fun started.  As it is restarting I get a similar screen (which I can’t screen dump…because the laptop isn’t booting!) saying the machine cannot boot.

Now I’m starting to be concerned.  Because I’m a few days out from 6 conference talks at the biggest Oracle conference of the year.  The laptop then goes into a “Cannot boot, so we’ll reboot” cycle which I don’t seem to be able to escape from, and then boarding call comes out over the public address system at the airport.


So I have to do a forced power off on the laptop, jump on the plane…and now sit there in a cold sweat for 5 hours while I fly to Sydney (because I’m now too scared to tackle this issue without a power supply).

I arrive in Sydney and renew the battle.  I power it up, and the laptop says “I cannot boot”, but this time says … “Would I like to repair the startup?”.  Why it has changed I have no idea, but I give it a shot.  After a lot of progress bars, and messages about how long this might take, the laptop finally displays the normal login screen.

Phew !!!!!!!!!

But all is not totally right.  If I sleep or shutdown the laptop, then on boot up, the first message I get is a sad emoji BSOD like the one above, after which it reboots again and then appears fine.

So … here I am, at the hotel with a working laptop… and zero confidence in it.  Grrrrrr.

Not the best start to the week 😦

Top Ten Travel hints and Tips

Well, let me be honest right at the top here.  These are not travel hints Smile  These will not help you in any way.

This is me having a whine and a rant about a minority of people that I occasionally encounter when travelling.

Yes, this can probably be best described as me and my first world problems, but I need to expunge these so that next time I travel, I don’t lose my head, and stuff some poor unsuspecting innocent passenger“under the seat in front of me or in the overhead locker” Smile

So sit back, relax and enjoy Connor’s “Travel Tips” Smile  (possibly NSFW)

1) Boarding pass

The term “boarding pass” stems from the Latin derivation: “The pass you need to present in order to board the bloody plane!”

So you know what ? At some stage, there is going to be a person who wants to see your boarding pass.  Incredible eh ?  And do you know where this happens ?  In every freakin’ airport !  We don’t need to suffer while you present a bemused expression to the security person asking for boarding pass, whilst you say “Oh….do I need my boarding pass ?  Let me hunt for it in the bottom of my bag for 15 minutes”.  On a recent flight, I even saw someone launch into a debate with the ground staff about why they have to present their pass!  Seriously ?  Were you trying out for the school debating team ?  Just keep it in your pocket or in your hand, and you’re done.  Easy !

2) Security check

There’s also going to be some people who want to X-ray your stuff.  Do you know where this happens ?  In every freakin’ airport !  And that huge placard that just about hit you on the head as you entered the security checkpoint said something along the lines of:

  • Take out your laptop
  • Empty your pockets

or we can take that down to real simple terms…. Metal and electrical stuff – bad.  Human body – good. Pretty….simple….concept.

But that’s ok, you can just ignore all that, because nothing makes a security officer feel more complete, than watching that bag of yours go though the X-ray machine 4 times, each time with one less electronic device in it, combined with your silly grin and shrug of the shoulders…. And they’ll ever happier when you follow that up with you carrying your wallet, phone, pocket knife, kitchen utensils, meccano set, your complete IKEA Applaro outdoor furniture setting, and a Milwaukee ride-on lawn mower, all stuffed in your jeans pockets, so that body scanner sounds more like Tchaikovsky’s Dance of the Sugar Plum fairy.

3) Boarding the plane

A few budget airlines have a policy where the seats are no allocated, you simply take what is available as you enter plane.

But the huge majority of airlines offer an incredible, amazingly sophisticated service for you as a passenger.

It’s called …. AN ALLOCATED SEAT.

You’re going to get one.  Incredible isn’t it ?!?!  Whether you like it or not… there is a seat on that plane that is waiting for you… JUST FOR YOU!  It doesn’t matter if you are the first person on the plane, or the last person on the plane, you are going to get that seat.  Because we’ve all seen the unholy hell of a nightmare that results when a passenger does not arrive for their seat after they’ve checked in.  Staff run around in a total panic like headless chickens yelling out “MR SMITH !!! URGENTLY PAGING MR SMITH!!!!”.  Every airline employee involved with that airline’s imminent departure is thoroughly invested in getting you to the your seat so the plane can leave, and they can see the back of you and go grab a coffee.

Do you know what this means ?  It means that when the boarding announcement is made, you do not have to charge the gate like the Orc army in the Lord of the Rings.  Do you know why airlines board the plane in a particular order ?  So they get can the damn plane into the air and on it’s way! That is sortta a prerequisite of travelling by plane to a destination – at some stage the plane has to get into the air for this to work ! You are not trying to storm a battlefront, or escape a stampede of bison, or get a limited edition of the AskTom commemorative sticker Smile.

So surprise surprise … if you wait for your boarding zone to be called, you will actually get to your destination faster.  And as a bonus, we can all get away faster.

4) Carry on

There is probably some unique set of circumstances out there, or some incredibly rare set of events put in motion, that means on this particular day, on this particular flight:

  • you are emigrating to another country never to return, AND
  • the aircraft is doing an emergency shipment of food to a stranded herd of Nepalese mountain goats, and hence the cargo hold is full of hay.

but unless both of those conditions are true, then sorry, you do not need to bring a metric tonne of belongings spread across 34 bags into the cabin.  If you don’t carry so much junk with you, you’re also less likely to needing riot gear to rush the door (see 3 above) worrying that you won’t be able to find storage space for those 34 bags you’re lugging.  And if you had listened to me in #1, you’d have your boarding pass in one hand, and only one hand left for carry-on luggage.  That’s ample!

5) Your seat

“Wow, I walked onto the plane, and every row number was just in a random order throughout the plane”

… said no passenger on any airline ever.

It’s pretty simple.  The numbers start low and get higher.  It’s a lot like …. hmm… what’s the term I’m looking for …. oh yeah, counting! Smile  Don’t get me wrong – we’ve all done the “walk mistake” or “sit mistake” where we end up 1 row adjacent to where we should have gone.  No problems with that – it’s easy to fix.  But how on earth did you get down to row 64 when your boarding pass said “Row 17”.  What happened in that long slow walk down the plane where you missed the numbers 18 through 63 ?  I reckon I know why you missed those numbers – you were looking for storage bins to put your 34 carryon bags, plus the IKEA Applaro outdoor furniture setting that’s in your back pocket (which would be uncomfortable to sit on for the flight) Smile

Now, if you’re going to take me to task on this one and tell me that things might be more complicated on an A380 because of it’s multi-deck system, then I’m still not budging.  See #3 above.  When the boarding call announcements are made, the ground staff will tell you which door to take to the plane.  But you might have missed that during your Ussain Bolt impersonation trying to be the first person on the plane Smile

(Caveat: If the standard decimal Hindu-Arabic number system is not native to your language…you get a leave pass for this one)

6) The loo (toilet, rest room)

There’s plenty of ridiculous research studies performed each year, so perhaps somewhere, in some remote corner of our planet, there is a study being conducted to see in how many ways in a confined space a male can pee and deliberately not hit the target.

An aircraft is not one of the places…. Ugh.

7) Your phone

I think I side with the majority here, in that I’m pretty confident that using mobile phone is not going to cause any problems to the plane.

But … unless I work as an electronics/avionics engineer for that airline I’m flying on, that is not my decision to make.  It’s not yours either.

So when the announcement to turn off or flight mode your phone is made – try this technique:  Stop using your damn phone.

Because even if there is only a 0.001% chance of your phone usage causing an issue on the plane, there is no way that you “Poking” or “Liking” your cousin’s new gluten-free sugar-free chocolate chip muffin recipe on Facebook even comes close to taking even that infinitesimal risk.  When they’re crawling through the wreckage of the plane to find your remains, that’s not so great a eulogy to have read out at your funeral: “Yes, John did bring the plane down with his phone by messing up its navigation, but at least he enjoyed cousin Susie’s Paleo muffins”

8) The seat belt sign

I’ve travelled a lot.  Like most people, I’m not a fan of turbulence, but there are some times when I am literally appealing to a higher power for sudden, unexpected, near catastrophic turbulence to hit the plane – even if we’re still on the ground!  It’s when we’re about to take off, or we’re about to land, because someone has decided it’s time to get out of their seat and and embark upon a voyage of exploration throughout the entire cabin.  You can see their mindset – “I paid for my ticket. Why should I have to abide by the instructions of the flight attendant?”. If they just could take their over-inflated sense of self-importance offline for a few minutes, they’d probably realise that that trip to the galley area to demand an apple juice, (because hey, apple juice is much more critical than the tasks that flight attendants are currently doing in preparation for take off) could probably wait for a few minutes until the seat belt sign is switched off.  Which it will be for 99% of the flight!

The other day, I was in a plane that was seriously 20 seconds from touching down, and some joker gets up and makes his way to the toilet.  They had been locked by the flight attendants because …. we’re busy landing the bloody plane!  But that’s lets face it, if a seat belt sign hasn’t deterred the passenger, then nothing as simple as a locked door is going to stop him either.  So he’s standing there trying to break down the door like a SWAT team doing a drug raid, whilst the poor flight attendant has to put her safety at risk to get this numpty to the sit the hell back down.

9) The baggage carousel

As well as SpaceX and cross-continental transport tunnels, Elon Musk has already invested billions of dollars into baggage carousels at airports. Baggage carousels are incredibly hi-tech pieces of equipment.  There is a series of highly sophisticated Bluetooth devices that scan every single passenger as they approach via the entrance hall – devices that measure each passenger’s exact distance from their shoes to the carousel down to the nearest millimetre.  These measurements are sent wirelessly to the luggage delivery staff who then proceed to deliver the suitcases in exactly the order of proximity of passengers to the carousel.  The closer you stand, the faster your bag will come out.

I don’t have any concrete evidence of Elon’s involvement in baggage carousels – but surely that must be the case, because what other reason could there be for people to jam themselves around the thing like sardines in a can, making it impossible for anyone to see or even pick up their bag. Oh, and here’s a great idea – grab that airport luggage trolley and jam it right up against the carousel as well.  Heaven knows, if you packed 34 items of carry-on, you probably have an aircraft carrier plus a 4-storey building jammed into your suitcase.  No way you’ll be able to lift that more than a couple of inches.

Pro tip:  Standing just 1 meter back from the carousel lets everyone easily see and grab their bags.  And there’s no Bluetooth either, or Elon Musk for that matter.  He’s got more important stuff to do than watch you make a fool of yourself around a baggage carousel. Smile

10 ) Your airline staff

This is perhaps the motivation for this entire post.  On a few flights recently, I’ve seen the flight attendants over stretched in their duties because they are spending so much time trying to get passengers to do what passengers are meant to be doing without explicit instruction.  Or even worse, people being just plain rude to them.  Man, that gets me wound up.  So wound up it makes me want to blog about it Smile

Whatever your profession, nothing is more insulting than someone coming up to you and basically announcing “Whatever task you are doing is not as important as you catering to my most trivial of needs right now”.  It’s disrespectful and demeaning.  At the end of my work day, I feel best when I look back at the day and think “I achieved a lot today”.  More and more nowadays, when I’m a plane sitting within eyeshot of a flight attendants, when the plane lands I don’t see a look of job satisfaction; I see “Thank heavens, these rude and ignorant people will be getting off this damn plane so I won’t have to deal with them again”.  That’s a really sad reflection on us as passengers.

So there’s my “travel tips” for you.  Happy flying Smile