Wikipedia, set the stage:
"Code-switching is a term in linguistics referring to alternation between two or more languages, dialects, or language registers in a single conversation, stretch of discourse, or utterance between people who have more than one language in common."
Yesterday, I spent some time with a bilingual five-year-old. She is used to speaking Chinese with her parents and English with most everyone else. I speak a little (very little) Chinese, so I decided to try an experiment -- or rather, I kind of realized it was an experiment while I was doing it. We were playing a game in which she'd hold up a number of fingers and ask me how many. Usually I'd answer in English, but every once in a while I'd answer in Chinese. Throughout the day, she was very reluctant to speak Chinese to me (and even to my wife, who, although she's a native English speaker, is ethnically Chinese). I think the only word she said was "dui" (correct) when I guessed a number in Chinese.
In other communication situations, she'd frequently whisper to her parents in Chinese rather than directly address us, though she always addressed us in English.
The question is: why? Was she taught to only speak Chinese to her parents? Is she sophisticated enough to realize that I am not fluent in Chinese, or does she simply believe that I'm white and therefore wouldn't be able to understand her? Is codeswitching a skill that has to be learned and has she not learned it yet? This seems a most plausible answer.
The most interesting moment, I thought, was when she said "I have to ask my ba--my dad first." She started to say baba -- Chinese for "dad" -- but repaired it, perhaps because she suddenly remembered who she was talking to, or which code she was supposed to be using. I suspect that in her mind, codes should not be mixed. I wonder when/if this will change...