16/01/2017

When Excel is better than machine learning?

Home


Title: Ruins of a castle in southern Poland, Source: own resources, Authors: Agnieszka and Michał Komorowscy

I can bet that some of you think that I'm crazy because I'm saying such blasphemies! Surely everyone knows that Excel is not for real developers ;) If you think so, I'll tell you a short story.

I think that it happened more than 1 ago. My former colleague asked me for help. He didn't know how to solve a task that came down to the transportation problem. We have N factories and M mines/producers. Each factory needs and each mine can provide particular amount of resources. We have to transport these resources from mines to factories. What is obvious it costs money and this cost depends on the distance between factories and mines. We have to find such an allocation that will minimize this cost.

His team was thinking about using machine learning techniques, more precisely about genetic algorithms. Well, probably it'll be an interesting and time consuming task. But why to reinvent the wheel again? It's a well-known problem that can be solved using linear programming. And it so happens, that Excel has the linear programming module. I've even already written an article on this topic. If you don't want to use Excel, you can download Microsoft Solver Foundation which is actually used by Excel under the hood. Probably I saved them a few hundreds of hours. Unfortunately, I didn't managed to monetize these consultations ;(.

I know more stories like that. Many years ago my friend has a problem with her computer i.e. the laud speakers didn't work. I started with checking the device manger, running some tests, updating drivers... to finally found out that the speakers were accidentally disconnected from the computer!

More up to date example. I was working with the system that uses a concept of historical tables. I mean that whenever any entity was modified in this system the original records were saved to corresponding historical tables for audit purposes etc. At some point we observed that some historical records were missing. We analysed logs, then we checked changes in the code and in the stored procedure. We also asked for a copy of a database from the production in order to reproduce a problem locally. All these things took time. At the end it turned out that in the production someone disabled a trigger responsible for inserting data into historical tables.

To sum up. It doesn't matter if you designing/developing a new solution or if you are trying to fix a bug. You should always start with the basic things even if they seem to be ridiculous. Does it remind you something! Of course I'm talking about Keep it simple stupid rule. As you can see this rule works everywhere.  

1 comments:

Unknown said...

Michał masz OGROMNY plus i zapewne wdzięczność kolegów za pomoc - za free ;))

Post a Comment