When we move students on from block to text programming, we want to transfer the learning that they have made on block coding into text programming. When we are transferring learning we want to transfer knowledge from one context into another. In moving from one context to another we need to think in an analogical manner such that when we know how to solve a problem in one domain we can use it to help us solve a problem in another domain. The use of analogous examples helps learners see the deeper structure. We do this by seeking out deep structures and remove the surface structure of a problem. This approach is called expansive framing and we have expectation of future use in a different context. In contrast, bounded framing does not have utility beyond the current learning. Current learning needs to make connections to earlier contexts from which learners are expected to transfer in knowledge to the new context. Transfer of learning does not happen by itself; the teacher needs to make the connections explicit.
Students learn programming better when they start with
block-based programming (Grover, 2021) because block-based programming makes
the bar to entry in programming more accessible. But students often find it
difficult making the transition from block to text programming. There are lots
of reasons why students find text-based coding more difficult including the
need to memorise syntax and commands (Grover, 2021).
There are lots of approaches that we can take to help support students transfer their knowledge from block to text-based programming. Firstly, we can show the equivalent code written in a block language side-by-side with code written in a text language. This has been shown to improve transfer of learning (Dann et al). Showing same algorithm but coded in different languages forms a mental mapping between the two languages (Wagner et al). For example, we can see Scratch block code and the equivalent text-based Python code below.
print(“What is your
name?”)
name=input()
print (“hello”, name)
One activity could be to get the students to match the corresponding line of code in each of the languages. For instance, say in Scratch is the same as print in Python. Another task would be to give students a piece of code in one language and ask them to translate into another language. You could begin by asking student to covert from the text to block, and as they progress then can then convert from block to text. Such scaffolded activities will reduce the load on working memory. By taking this approach we are focusing the attention of the pupils onto the deep structure. In other words we are drawing attention to the underlaying programming concepts such as sequencing, input and output as in the example above. A natural step on from this is to get student to plan their code using Scratch before writing it in Python. There are also dual modality systems that allow code to be translated between text based and block languages that can be used in a similar way as we have demonstrated here with Scratch and Python.
Frame based editors are another way to bridge the transition
from from block to text programming. They
combine block and text based editors where operations are represented by
frames, with spaces to add values.
Similarly the use of prewritten reference statements in Micro
Python (Python for the Microbit) which is itself a text based language but statements
can be dragged into the editor in similar way as block programming and then modifying
the values. Such reference statements
mean that there is no need to remember the operations or syntax. The reference statements are like a cheat
sheet in the sidebar of the editor.
High level imperative programming languages possess the same concepts: variables, selection and iteration even if on the surface they look different.
Programming concepts are the deep learning, the idiosyncrasies
of the languages are the surface learning and represents the barrier learning. Programming
languages are concrete when we want abstract. By showing analogous situations
in multiple languages students can separate the programming concepts from the
language itself.
References
Dann et al, Mediated transfer Alice 3 to Java
Grover, 2021, Teaching and assessing for transfer from block-to-text programming in middle school computer science
Wagner et al, Using App Inventor in a K-12 Summer Camp
Comments
Post a Comment