What is PECS

PECS explained

Guowei Lv

2 minute read

You: Master, I heard this PECS in the JAVA world. But I’m deeply puzzled by it.

Master: Do you know what it stands for?

You: Producer Extends Consumer Super?

Master: In order to understand it, you shall stop thinking about what these words mean, it’s not helpful at all. Just follow my questions.

You: Yes, Master. Please start.

Master: There are plants, then there are fruits, then there are apples and pears. They form a hierarchy.

You: Apples and pears are fruits, and all fruits are also plants. Right?

Master: Correct.

You: I think there are also plants other than fruits, like grass?

Master: You are right. Keep that in mind for now.

You: …

ROUND 1

Master: (Pointing at a basket on the table) What is this?

You: A basket.

Master: Correct. Simply a basket. No more no less.

You: …

Master: Pay attention to my words now carefully. I tell you now that this is a fruit basket.

You: OK, so it has fruits in it then. What fruits I wonder?

Master: Asorted fruits, not important.

You: …

Master: Now I tell you that all fruits are edible.

You: …

Master: Answer me. Do you think you can take anything from the basket with you eyes closed, and eat it?

You: Yes, I can.

Master: Now let’s change the setting. If I now tell you that this is a plant basket. Do you think you can still do the above task?

You: No, I may get grass, which is not tasty I guess.

Master: …

ROUND 2

Master: (Still pointing at the basket) Now I tell you this is a fruit basket.

You: …

Master: Suppose you have an apple, are you feeling comfortable putting it in the basket?

You: Totally.

Master: Suppose you have an pear instead, are you feeling comfortable putting it in the basket?

You: Sure.

Master: OK. Now I tell you that this is not a fruits basket, but a plant basket. Are you now feeling comfortable putting you apple or pear in it?

You: Yes, I am. Apples and pears are also plants anyway.

Master: You are right. Now let’s again change the setting. I tell you now that this is a apples basket. And you have a pear in your hand. Are you feeling comfortable putting it in the basket?

You: … Not sure I want to put a pear into a basket that is full of apples.

Master: OK. We are done here.

You: (feeling enlightened)

THE END

comments powered by Disqus