I don't think the data's right. The program worked too fast



  • A co-worker was furiously clicking between two spreadsheets for some time.  I asked him what was going on, and he told me that his boss asked him to compare the products listings in our database to the database of a few vendors - to ensure that all of our products were listed in the vendor DBs. This is a task which has to be done regularly, a couple times a month in some cases.  Since these vendors have deadlines for submitting updates/corrections, he had to work very fast.

    With a few thousands entries, and needing to compare four or so unique ID numbers across the spreadsheets, this task would naturally take him several days of utter tedium to complete, and the final list of missing products would be filled with errors.

    I took 15 minutes and wrote a quick program that would do the comparisons and print out a report listing all the products and related data that the vendor didn't have records of.

    The program took about 1 second to spit out the reports for the different vendors, and he was very happy about not developing carpal tunnel.

    Not long after he forwarded the report to his boss, he got a reply.  "The data on the report doesn't look right.  There are too many missing products listed - there were never that many before.  The program works too quickly, it's probably not working right.  With important things like this, it's best to do it yourself".

    After having taken a look at the report and the spreadsheets, doing manual comparisons, it was clear the the report was 100% accurate.  The likely reason that these reports were always so short before was because the person who was previously responsible for doing the comparisons  didn't actually do them - he'd just find a few missing products and stop, so that he didn't have to go through the whole spreadsheets.  It was slacking off like that which got the previous guy fired.

    His boss couldn't be persuaded to trust the program that "worked too fast".  So, he now runs the report and sits back for a few days before forwarding it to his superior.

    Maybe the next time I program something I'll put a couple hundred billion NOPs in there to make the results more accurate.



  •  Maybe you should put a sleep() in the loop, then every time you improve the script (version 1 to version 2) just lower the wait time. Hey, progress!



  • Great idea on making a tool to automate it.  I don't know if it will help with your specific problem but WinMerge has a plug-in that compares excel spreadsheets.  You could visually show the diff to his boss.

    I introduced it to the testers that work here a few years ago.  They would spend countless hours comparing thousands of records on a regular basis to validate expected vs actual results.



  • @KrakenLover said:

    a few thousands entries, and needing to compare four or so unique ID numbers across the spreadsheets

    <snip>

    he now runs the report and sits back for a few days before forwarding it to his superior.

    Did he at least buy you pizza or something? By my calculations you improved his life by about 500000%



  •  Give it a few speed up loops



  • sleep(10 + abs(20 * appversion.major - 3 * appversion.minor))



  • @KrakenLover said:

    His boss couldn't be persuaded to trust the program that "worked too fast".  So, he now runs the report and sits back for a few days before forwarding it to his superior.
     

    Oh man. I remember talking to a staff member in a bookshop, who said that when he looked up the system to see if a book was in stock the answers came up in around a second, but he'd pause an extra 5-10 seconds when dealing with elderly customers, because they didn't believe the answer could be right if it came up too quickly. But that was over twenty years ago, in the days when you had to be spectacularly geeky to have even heard of Microsoft Windows, let alone the Internet, and plenty of offices still had typewriters.

    The boss's attitude is the not the sort of thing I'd expect of anyone from a developed country who was still capable of dressing and feeding themselves.


Log in to reply