Last week, inspired from a meeting, I started tossing together a little python program to solve a problem. It wasn’t perfect. It was warty. But I think I have something worthwhile now. Or, at least useful for me – It gives you what you want, and writes to a log when something goes wrong.
What I really want to do here, is just take a moment to sing the praises of learning by reading code. Heading into this little project, I had a basic idea of what I wanted to do, and I knew something like this could be done given Tim’s project. I knew that I wanted to make a this a module, and set it up on PyPI, but I had really know idea how to do so. But! I knew of somebody who did, and is quite proflic in my mind. Ed making his code available on Github (and using very open licenses) made it possible for me to learn how to build the structure for a Python module, the structure for writing tests, and using argparse/optparse correctly.
So, here is to learning by reading code!