Scaffold the transition to real code

Although tools like Scratch have become very popular and have been very successful in introducing programming to a new (and often very young) audience, there has been some literature that suggests that some students struggle to transition to "real" (i.e. text-based) code after becoming proficient with blocks. Additionally, students who have prior experience can also struggle to map the blocks onto their existing mental models. These tools are also very heavily visually oriented, which risks alienating students whose preferred learning style leans towards other media1.

When abstraction can be a step too far

NoobLab uses Google Blockly to provide drag and droppable blocks for program composition. One advantage of Blockly - and by extension, NoobLab - is that it is a layer on top of real, text-based code. As students drag their blocks into place they are in fact building programs containing the usual blocks of code such as IF statements, WHILE and FOR loops, functions and so on. This is in contrast to many other environments that use the block metaphor, where the blocks themselves are the top level.

As students work on a NoobLab exercise, their actions with the blocks are mirrored in a Code Preview pane so that they can see the "real" code underneath the blocks. As they manipulate the blocks, they come to realise they are in fact manipulating the code. They can cognitively map the "blocks" within the textual code to the visual representation - enhancing their understanding of how the components of a program and the fundamental programming constructs interlink. This is something that block-only platforms such as Scratch omit, resulting in difficulties when students transition to text-based code as a result of Scratch constructs not directly mapping onto the new language.

Blocks can be used in conjunction with Python, Javascript or our own lightweight Banana language.


1

  • Parker and I. Mitchell, "Effective methods for learning: a study in visualization," Journal of Computing Sciences in Colleges, vol. 22, no. 2, pp. 176-182, Dec. 2006.
  • C. A. Shaffer, M. L. Cooper, A. J. D. Alon, M. Akbar, M. Stewart, S. Ponce, and S. H. Edwards, "Algorithm Visualization: The State of the Field," Trans. Comput. Educ., vol. 10, no. 3, pp. 9:1-9:22, Aug. 2010.
  • D. J. Malan and H. H. Leitner, "Scratch for budding computer scientists," in Proceedings of the 38th SIGCSE technical symposium on Computer science education, New York, NY, USA, 2007, pp. 223-227.