Narrative exploration of code
Saturday, June 19th, 2010I’ve noticed that a lot of frameworks and libraries don’t have narrative documentation. Instead, they only have a description of each module without a story to go with them.
This post will outline a possible strategy to develop narrative understanding of software libraries.
Exploratory programming is creating prototypes and experimenting with them to develop a deeper understanding of the problem domain and requirements.
Exploratory programming for understanding libraries will be based partially on exploratory testing methodologies. As such, there are several tools that can be used from the testing world:
- Functional testing
- Scenario testing
- Focus/Defocus
Functional testing — in this context — means surveying each module, class or method and experimenting with it in a manner consistent with its documentation. The point is to learn what the software is doing. This can sometimes be difficult when you don’t know what exactly a class does or what you’re looking for, but it can give you a handle on the search space
Scenario testing — in this context — means creating scenarios of use and trying to use the library to meet them. This is generally more challenging than functional testing, but allows you to learn more rapidly about the software then just looking at the manual
Focus/defocus — Focusing on details is sometimes important, but remember to focus on the big picture. Switch between these modes if you get stuck, try something new, do something unexpected.
That’s it for now.



