Joy of writing utilities

July 21, 2009

Every now and then I get to a point where I need to do some repetitious and most likely boring task.
This point usually leads to 3 possible options

  1. I Google for a utility that saves me the time for doing the task automatically.

  2. I can’t find any workaround, while banging my head, I slowly do the exhausting task.

  3. I write a small utility that does the task for me.

Although option 1 is usually the fastest way to overcome the hideous task, writing the utility by myself is much more satisfying.

Furthermore, it usually leads to the following scenario (in case it works of course)

  1. I used the newly created tool to finish the horrible task.

  2. I’m filled with childish satisfaction feeling of “this is so cool” and “this saves me so much time” (even if writing the tool took more that it would have to do the actual task).

  3. After the euphoric thrill is over, I start to ponder if this tool could be useful for someone else.

  4. I refactor the code, fix all the “quick-code smells”.

  5. I continue my pondering (recognize a pattern perhaps?), what more could this tool do?

  6. I add the “so needed” features (usually to fast, which get’s me to need to do step 4 again).

  7. Now comes the crucial point:
    Will I stop repeating 5,6,4 and be satisfied?
    If no, then the tool will never be shared/published, at some point I’ll have to focus on something else, and I’ll probably forget to come back and finish the tool.
    If yes, I’ll continue to 8.

  8. I’ll start wasting time on creating some kind of documentation and sample
    (which BTW is nowadays so much easier thanks to Github)

  9. Another crucial point like 7 will occur, and as before, if it doesn’t get out in a reasonable timeframe, it might be forgotten.
    Writing the documentation and sample might trigger some point 5 style pondering, thus adding the possibility to reenter some heavy pondering->repeating writing/refactoring loop action.

After this tedious routine is done, the by far most exciting moment is to see someone actually use the tool and perhaps even see them get the point 2 feeling.

There was a period when I was in Customer Support, that I encountered lots of “utililicous” opportunities that could need tools to solve problems, both for customers and for the supporters.
The result was a line of a dozen or so utilities, some of them even used sometimes! :)

Anyhuze, this post is a prelude to YAUIHTW which I’ll write about shortly.


comments powered by Disqus