Credit: Getty Images
Block-based programming is increasingly the way that learners are being introduced to the practice of programming and the field of computer science more broadly. Led by the success of environments like Scratch (see the figure appearing later in this column) and initiatives like Code.org's Hour of Code, block-based programming is now an established part of the computer science education landscape. While not a recent innovation (for example, LogoBlocks has been around since the mid-1990s), the last decade has seen a blossoming of new toys, games, programming environments, and curricula that incorporate block-based programming features. Given this growing presence, it is important that we as a community look critically at the block-based programming modality to understand its affordances, drawbacks, and identify how best to use it as a means to welcome people into the discipline of computer science and support them as they grow and learn.
Block-based programming has a number of key features that make it distinct from conventional text-based programming and other visual programming approaches. Block-based programming uses a programming-primitive-as-puzzle-piece metaphor as a means of providing visual cues to the user as to how and where commands may be used. Figure 1b shows a block-based program written in Scratch. Block-based programming environments have been designed for children as young as five years old but most environments are designed for kids ages eight to 16. Writing a program in a block-based environment takes the form of dragging-and-dropping programming instructions together. If two instructions cannot be joined to produce a valid statement, then the environment prevents them from snapping together. In this way, block-based programming environments can prevent syntax errors while still retaining the practice of authoring programs by assembling statements one-by-one.
No entries found