Kent Beck, in More What, Less How, identified an unknown. But how will he move towards knowing? By exploring in 3X:
Explore/Expand/Extract. The rules of exploration are that it’s a numbers game. More experiments, more value. Try a little bit of a lot of things. One of those experiments will have dramatically more impact than anything to date. Follow up that.This speaks to me.
On Friday I picked up the latest build of a new service with a partially-implemented API. The ticket that produced it was for some internal plumbing and, after various smoke tests and other poking around, followed by a demo of my approach and findings to the team, and some fixes, I could have stopped looking at it.
But I thought enough functionality might be enabled that I could begin to navigate the API a little so I tried hand-rolling requests in Postman.
After some false starts and a couple of workarounds (for those unfinished pieces of the API) I was able to make the bare bones of a user journey.
Although I've often used Postman to generate curl snippets I don't recall doing it for Python so I thought I'd try it to see whether I could automate some of the tedious copy-pasting I'd been doing. It turned out to be easy.
Then it occurred to me that I could make a very cheap walker with a simple loop and randomness.
So I did!
Now I have a tiny hacky tool that works as a super-basic client of our API and also automates some exploration of it, helping me to see where there are still gaps on the server side.
This service essentially takes a JSON configuration file representing a state machine and exposes it for navigation through the API. As part of the conceptualisation for the service we wrote configuration files for various scenarios and visualised them as networks to show stakeholders.
I realised that I could use my tool to "rediscover" the state machine from the client side and so I added some code to record state transitions in a JSON format that I could visualise in the same way that we had done earlier.
Now I have another tool, one that can run against the nascent API identifying states which are reachable and I can compare that in a visual diff against the original state machine to look for missing functionality, bugs in the config, and so on.
I am not sure yet whether this is a long-term utility, or something to help find edge and corner cases as we build the API out, or just some nice learning for me about the config, service internals, and emerging API.
What I am sure about is that I've tried a bunch of small explorations, I've expanded some that looked interesting today, and I'll extract value from what I found, if and when it appears, tomorrow.
Images: https://flic.kr/p/S4E8d, https://flic.kr/p/6Diocj, https://flic.kr/p/6cqL5V
Comments
Post a Comment