Peter Marklund

Peter Marklund's Home

Wed Sep 30 2020 12:15:35 GMT+0000 (Coordinated Universal Time)

Learning From Your Bugs

Today I fixed a bug in a Python API that I have been working on lately. It occurred to me that instead of just fixing the bug I should reflect on why it happened. The bug was in a function called set_model_defaults. In this API, the name of a model is usually inferred from the filename (this is the default name) but the name can also be specified explicitly as an attribute in the model itself (and this should then override the default name). The bug was that the overriding of the default name didn't work. I had two reflections on why this happened: At my last project at Aftonbladet we did Post Mortem follow up meetings with action points after each production incident. I think that is a great practice. Here are some reflections that I had lately around the causes of bugs: Henrik Warne has an excellent blog post also called Learning From Your Bugs and it is part of the inspiration for this post.