The first thing I come up with is:
Give Pisa chanceThis slight variation on the well-known punchline is a plausible sentence but to make it work as a joke I need a context that can produce it. I'm working backwards from a result to look for some setup in which it is coherent:
Did you know that casinos are illegal in some parts of Italy? Apparently a bunch of gamblers held a candlelit protest overnight.
They were singing "All we are saying is give Pisa chance."This is also a testing pattern. When you're looking at responses from a system, a useful approach to finding potential issues can be:
- I've got X.
- By changing X a little I can get Y.
- Y is plausible.
- Y would be bad.
- What context could give me Y?
Anyone here own a cat?So, you know what the punch line is going to be, what context might give a laugh here? He goes for:
Any students in tonight?
Is anyone in the audience an aromatherapist?Which is not only funny, but also a (comedy) rule of three.
Meanwhile, back in the kitchen, I am busy applying another pattern - I think of it loosely as the Spooner - where you can look for the funny by permuting some aspect(s) of multiple elements. For example switching the initial sounds of peace and chance:
Give cheeser pantsSmall beer, perhaps. No obviously gut-busting laughs here, I'll grant you. But you could imagine contexts in which you could set these some of these up as jokes, although I will say that if you search for "cheetahs pants" as I did, looking for clues to such a context, you get a lot of photos of leopard skin leggings. Which - fashion naif that I am - violated both my expectations and my eyes.
Give cheetahs pants
Give cheaters pants
Give cheetah's pants
But that's testing too: generate ideas and choosing to use them or not (at the moment). Sometimes rote generation by some formula like this is productive and sometimes not so much. As it happens, I decide to try to stretch this line further (like some of those leggings) and end up with:
Give peaches pantsWhich I found an amusing idea (this was the point my wife came to ask what had happened to her coffee) although probably a step too far in terms of plausibility... but I later found this picture:
To relate this back to testing with a specific example: imagine you have some functionality that accepts a couple of arguments. You might ask yourself questions like these:
- what happens if the arguments are given in the wrong position?
- does the structure, naming, usage etc of this functionality make it likely that users will mix up the arguments?
- how would someone spot that they had made this kind of mistake?
Images: Kotaku.com, The Crunchy Carrot
Comments
test1 = "hello", "conrad", 1 , FALSE
test2 = "conrad", "hello", FALSE, 1
Would both pass the case for the function prototype:
Greeting ([string]anouncement , [string]recipient, [integer]repeatTimes, [bool]broadcastTweet)
But would produce a passing result even though the parameters are randomly ill placed. I'm no fan of fuzzing, but I'm warming to it as a away of understanding ways of breaking APIs in a useful fashion by first feeding them data that "kinda" fits a mould. A bit like the rhyme:
Give peas a chance = verb+noun+verb and/or optional conjunction ?
Post a Comment