Often times as developers who understand what computers can do is really limitless, we seek to automate everything. The holy grail is being able to sit at where everything is accomplishable with a simple double-click. Often times automation, however wonderful or geek drool inspiring, is not cost effective.
Once a month we have to update sales tax rates in our system. We have a program that does the update but needs two vital pieces of information which are supplied to us a few days before the end of the month via an email. These two pieces of information are a download file location and a password. We enter the two pieces of information as command line args to the program and off we go. The whole process takes about a minute.
While running the update today there was a brief discussion about how we could possibly automate the whole process. Ideas floated around like reading the email and parsing the text for the download location and the password. In order to do this we'd have to write an program which:
- Can connect to our Exchange server or a mailbox on our system
- Scan the inbox for the particular message you are looking for
- Parse out the two pieces of information from the email
- Launch the original program passing in the two pieces of information we just gathered
Let's say for a moment that you're a good programmer. I mean ayende good. How long does it take you to write this? An hour? Two? Ten? A week (40)? Let's be real aggressive developers here with over-inflated sense of skill for a moment and say we can do this and have it production ready in an hour. If it takes us a minute to run by hand, then it will take us 5 years to get a return on the investment we put into the project. If we're more down to earth and estimate the project takes 10 hours, we will absolutely never see a return on that time spent because your application which needs the tax information will be rewritten, trashed, or abandoned long before the 50 years it would take to start seeing a return. I was glad to hear it when my fellow developers came to this conclusion as well. Automation is great to a point when it saves time. Any effort beyond that is hard to justify and could be seen as wasteful.
05-28-2009 9:05 PM