Aug 30, 2011 10:50
How to make a peanut-butter and pickle sandwich:
1)Gather the bread, peanut-butter, pickles, a fork, and a knife.
2)Take two slices of bread out of the bag.
3)Open the peanut butter jar and use the knife to get some peanut butter out.
4)Spread the peanut butter on the bread.
5)Close the peanut-butter jar and put the knife away.
6)Open the pickle jar and use a fork to get some pickles out.
7)Put the pickles in between the p-buttered pieces of bread.
8)Close the pickle jar and put the fork away.
ABSTRACTING this complex algorithm means taking the specific and making them more general, leaving blanks to be filled in.
"bread, peanut-butter,pickles, a fork, and a knife" could be summarized as "ingredients and tools"
Steps 2,3,and 6 can be summarized as "use X tool to get X ingredient"
Steps 5 and 8 could be summarized as "put away X ingredient and X tool"
Steps 4 and 7 amount to "add X ingredient to Total"
Now we have a generalized set of instructions that can be applied to any sandwich, or most recipes even!
1) Gather Ingredients(X) and Tools(Y).
2)For Each Ingredient, use Y to get X and add X to Total.
3)For each Ingredient, put away X and Y.
I finally get it!!!