Stories from BIND9 refactoring

Dealing with code that can drink legally

Bind9 code is 21 years old - it was written in times without all the modern buzz-words like test-driven development, QA and code quality. Having working on refactoring the code I want to guide the audience through the process of refactoring one particular function - query_find, showing the mistakes made on the way, cul-de-sacs entered, hours and days lost, for others to learn on my mistakes.