Sunday, January 18, 2009

Trade-offs

Possibly due to studying economics in college, I tend to see every decision as a trade-off. The absolute right decision in one situation may be absolutely the wrong decision in another, depending on the relative values of what is gained and what is lost.

Many times, a good answer arises to a question or problem, and we just go with it. It's a good answer, after all.

Still, I often like to review the other possible answers, even if we feel in our gut that they're obvious losers. If nothing else, it gives me peace of mind that I went through the due diligence. Even better, sometimes I learn additional aspects of what I'm trying to do by understanding the shortcomings of the other options. And then, of course, occasionally one of the "loser" options emerges as superior.

As I started my Python mini-project, I ran immediately into a decision: use 2.6.1, or 3.0? 3.0 is a major upgrade in the language, some of which is not backwards compatible. I hate to learn something that I know is going to be outdated, so I favored 3.0.

But, I decided to spend about an hour evaluating which version to go with. This was before I even knew any Python. Mainly, I got an assessment about the trade-offs.

First, I came to realize that, rather like a product owner on an agile project, I wanted to get functional value out of it quickly. If there was still time afterward, I could go back and learn more about the language (later iterations?), or improve the code.

Second, I realized I would likely want to use some library extensions to save time. Almost none of these have been ported to 3.0 yet. While there is a 2to3 migration tool, it is pretty primitive, and seems to only exist (as of this writing) for unix or linux, which I don't have access to right now. I also didn't want to risk having to spend time trying to figure out why a library wasn't working. Although that is a useful way to learn the language, in this particular mini-project, it would conflict with my first priority.

I found it somewhat painful, but despite my personal biases, I decided to roll with 2.6.1. I was willing to trade away being up to date for less development time (or just reducing the risk of greater time).

No comments:

Post a Comment