As an tutor for introductory CS classes, I often come across students that have a very rigid understanding of a programming language up to what they have been taught so far. This most often manifests itself when they ask the question I can do that? I thought that.... I've most often seen this when showing students that branching and looping statements can be nested. It has even occurred when dealing with parenthesis and order of operations in mathematical expressions. As a concrete example, in Python many containers allow access via brackets:# dictionariesfoo = dict()foo[a] = 10foo[a]# dequesbar = deque('asdf')bar[0]# and many more...These students usually repeatedly struggle with this every time a new construct is introduced, as they fail to see how certain concepts from one part of the language extend to the other parts. In this case, it is that brackets are used for accessing elements.In short, how can I influence the student's thinking process from This language only allows me to do this into Can this language do this?, and help them expand upon what they have already seen and understood?
How can I help students develop intuition about a programming language?
undergraduate;syntax
I think this is a structure of knowledge problem. I suspect the disconnect is that you have organized your knowledge in a way your students haven't. You understand that strings, lists, dicts, and deques are all something called containers. You also understand that all containers can be accessed with []. Therefore, it's straightforward to consider that [] could be applied to any new container you come across.But do your students understand this organization of types in terms of containers? I bet they don't yet. They are still thinking about each type as an individual entity, disconnected from others.Experts' knowledge is organized much more effectively than novices' that's what it means to be an expert. (Cite: Relevant section from How People Learn, summary from Cal State Northridge)On the other hand, novices' understanding is tightly tied to shallow features like syntax. It will take a while for them to see the deeper organizational features. You can help your students become more like experts by explicitly helping them organize their knowledge. If it's not overwhelming for the students, teach them what a container is and what all containers have in common. More generally, connect concepts together to help support students' development of those expert-level connections. Good luck!