How do you know what you know?

There is a phenomenon I think most coders discover early on in their careers. You struggle with a problem for some time, then decide that you are stuck and so will ask a colleague for their help. As the words come out of your mouth (or sometimes, a little before) a possible answer bursts full-formed into your mind.

This has been much-discussed elsewhere and has been called RubberDucking, Rubber Duck but I first knew it as Debugging by confession. The link above gives some theories as to how it might work, this post describes mine.

I think the effect is unrelated to speaking aloud, because I have noticed it before I have even opened my mouth. I think it has its roots in some brain machinery which we have around for social use.

Ever since humans have been social animals, part of our fitness for survival has rested on our ability to persuade others. This in turn, depends on our reputation.

Consequently, we are good at fact checking what we are about to tell someone else. We might choose to lie or joke, but doing so accidentaly would needlessly decrease our reputation for accuracy, reliability and honesty. This could hurt our ability to get what we want.

So I suggest that the benefits of rubberducking could be caused by the sub-conscious examination of data in preparation for telling it to someone else. Social brain machinery does a once-over and checks each thing we are about to say for how likely we think it is to be true. It is this check which helps us find the shaky assumption in our thinking which leads in a flash to the solution.

The check would involve thinking about how we know what we are about to say is true, i.e. it checks meta-information about the information ("how long have we known it?", "who told us?", "how reliable are they?", etc.)

Problem solving involves a creative balance between thinking about what we know and the reliablility of each piece of information. We can do this consciously, but rubberducking also allows us to bring in additional, sub-conscious, brain machinery and go further and faster than we otherwise could.

It helps if we know how we know what we know.