"It started as a simple three-line shell script, but now it has grown into three hundred lines of bash that only works on that particular version of Ubuntu, and nobody wants to touch it anymore!"
As projects grow, they accumulate scripts. You know, the stuff around the edges of your main codebase, all the small pieces of code and other "glue" that somehow keeps your entire project from falling apart: Everything from small developer tools, code generators, version control wrappers, build system helpers, all the way to your packaging and release scripts.
This talk will introduce some techniques for writing, growing, and maintaining these utilities in Python. Python is the perfect language for these tasks: It keeps the simple stuff simple, and when stuff invariably grows more complex, it still keeps the code readable and maintainable (unlike most shell scripts). We will look at why this is, and how you can iteratively and naturally grow small python scripts into more complete programs (with unit tests!) that can easily be reused, either by importing them from other python scripts, or via a nice and self-documenting command-line interface.
Finally, we will also look at one or more case studies where these techniques have been used to regain maintainability over existing shell scripts, and then extend them with functionality that previously seemed impossible.
The talk will assume some familiarity with Python, and focus on specific techniques and modules from Python's rich standard library that I have found useful when building and maintaining these kinds of scripts in a large, embedded software project.