Python!

PythonLogoI’ve been meaning to try writing a useful complete program in Python for some time now, having read about it, and having spent some time figuring out what another programmer was doing in Python.

I finally got a good excuse this week. My wife had a large text file with some embedded information (prices in a “secret” but simple Ceasar cypher) that she needed to be decoded in order to upload it to an inventory service. Relatively easy regex stuff, which I could easily handle in C++ or even sed. But instead of spending an hour or so solving the problem that way, I chose to spend about 3 hours doing it in Python.

Now, if I had already been familiar with Python, it would have been maybe 20 minutes, but I spent the majority of the development time reading documentation and doing Bing searches for examples of various types of operations in Python.

My verdict: It was time well-spent. I now have a better grasp of the capabilities of Python, and it looks like a really fun language. As a long-time user of strongly-typed languages, though, the non-typed aspect of Python still bothers me a bit. I’m assured by veteran Pythoneers that I’ll get used to it.

On the plus side, it took about 15 lines of Python to do what would probably have taken about 100 lines of C++. Not too shabby. I can probably improve on that ratio with some experience.

Now I’m wondering how best to go about getting somebody to pay me to become a Python wizard.

Leave a Reply