Block-based programming: does it help students learn?
At the Raspberry Pi Foundation, we are continually inspired by young learners in our community: they embrace digital making and computing to build creative projects, supported by our resources, clubs, and volunteers. While creating their projects, they are learning the core programming skills that underlie digital making.
Over the years, many tools and environments have been developed to make programming more accessible to young people. Scratch is one example of a block-based programming environment for young learners, and it’s been shown to make programming more accessible to them; on our projects site we offer many step-by-step Scratch project resources.
But does block-based programming actually help learning? Does it increase motivation and support students? Where is the hard evidence? In our latest research seminar, we were delighted to hear from Dr David Weintrop, an Assistant Professor at the University of Maryland who has done research in this area for several years and published widely on the differences between block-based and text-based programming environments.
A variety of block-based programming environments
The first useful insight David shared was that we should avoid thinking about block-based programming as synonymous with the well-known Scratch environment. There are several other environments, with different affordances, that David referred to in his talk, such as Snap, Pencil Code, Blockly, and more.
Some of these, for example Pencil Code, offer a dual-modality (or hybrid) environment, where learners can write the same program in a text-based and a block-based programming environment side by side. Dual-modality environments provide this side-by-side approach based on the assumption that being able to match a text-based program to its block-based equivalent supports the development of understanding of program syntax in a text-based language.
As a tool for transitioning to text-based programming
Another aspect of the research around block-based programming focuses on its usefulness as a transition to a text-based language. David described a 15-week study he conducted in high schools in the USA to investigate differences in student learning caused by use of block-based, text-based, and hybrid (a mixture of both using a dual-modality platform) programming tools.
The 90 students in the study (14 to 16 years old) were divided into three groups, each with a different intervention but taught by the same teacher. In the first phase of the study (5 weeks), the groups were set the same tasks with the same learning objectives, but they used either block-based programming, text-based programming, or the hybrid environment.
After 5 weeks, students were given a test to assess learning outcomes, and they were asked questions about their attitudes to programming (specifically their perception of computing and their confidence). In the second phase (10 weeks), all the students were taught Java (a common language taught in the USA for end-of-school assessment), and then the test and attitudinal questions were repeated.
The results showed that at the 5-week point, the students who had used block-based programming scored higher in their learning outcome assessment, but at the final assessment after 15 weeks, all groups’ scores were roughly equivalent.
In terms of students’ perception of computing and confidence, the responses of the Blocks group were very positive at the 5-week point, while at the 15-week point, the responses were less positive. The responses from the Text group showed a gradual increase in positivity between the 5- and 15-week points. The Hybrid group’s responses weren’t as negative as those of the Text group at the 5-week point, and their positivity didn’t decrease like the Blocks group’s did.
Taking both methods of assessment into account, the Hybrid group showed the best results in the study. The gains associated with the block-based introduction to programming did not translate to those students being further ahead when learning Java, but starting with block-based programming also did not hamper students’ transition to text-based programming.
David completed his talk by recommending dual-modality environments (such as Pencil Code) for teaching programming, as used by the Hybrid group in his study.
More research is needed
The seminar audience raised many questions about David’s study, for example whether the actual teaching (pedagogy) may have differed for the three groups, and whether the results are not just due to the specific tools or environments that were used. This is definitely an area for further research.
It seems that students may benefit from different tools at different times, which is why a dual-modality environment can be very useful. Of course, competence in programming takes a long time to develop, so there is room on the research agenda for longitudinal studies that monitor students’ progress over many months and even years. Such studies could take into account both the teaching approach and the programming environment in order to determine what factors impact a deep understanding of programming concepts, and students’ desire to carry on with their programming journey.
Next up in our series
If you missed the seminar, you can find David’s presentation slides and a recording of his talk on our seminars page.
Our next free online seminar takes place on Tuesday 5 January at 17:00–18:00 BST / 12:00–13:00 EDT / 9:00–10:00 PDT / 18:00–19:00 CEST. We’ll welcome Peter Kemp and Billy Wong, who are going to share insights from their research on computing education for underrepresented groups. To join this free online seminar, simply sign up with your name and email address.
Once you’ve signed up, we’ll email you the seminar meeting link and instructions for joining. If you attended David’s seminar, the link remains the same.
The January seminar will be the first one in our series focusing on diversity and inclusion in computing education, which we’re co-hosting with the Royal Academy for Engineering. We hope to see you there!
Don’t forget that programming under software development isn’t necessarily all about coding, there is a modelling element too, which is closer to a block based, diagrammatic process. I’m not suggesting that UML and pseudo code are like Scratch etc, but it has its place.
Seems like diagramming English sentences to me. Just as useful, which means not useful at all. But I took to programming, almost intuitively, so perhaps others learn differently and having a long way around is helpful?
One thing I’ve discovered over the decades is that children vary. What works for one will not for another. That is probably why the hybrid is successful. It has multiple paths.
There’s a vast difference between learning ‘programming concepts’ and computational thinking. I wish the RPF had embraced Forth instead of Python, it’s a far, far more syntonic language. Doctrine is the mind-killer. See http://www.scidata.ca/?p=895
FORTH is a good, instructional language, but RPN logic might not be a good first introduction. Python teaches logic, flow, and structure. It is pretty good with object organization, but not automatic. It’s also interpreted, instead of compiled. Shame Pascal has fallen out of favor.
While I’m here, blocks and wires are excellent for modeling, and design. It does fall short in terms of teaching how to make the computer work. In other words, what goes on inside the blocks.
Looking at that graph, my takeaway is that at the end, it doesn’t matter that much. But it does occur to me that if you have difficulties in the beginning and quit, you don’t get to the end.
My understanding of the graph is that students in the Blocks and Hybrid groups had declining sense of accomplishment between the 5 week and 15 week assessment, while the Text group had a continuing upward trend in positivity and sense of accomplishment.
After 15 weeks they are both about the same, but that’s still pretty short term from a career point of view as well as any type of strategic educational initiative. If the trends continue, students in the Text group may continue to feel that they are thriving while students in the other two groups could become even more frustrated.
On the other hand, I may have misunderstood the whole study.
Dubious interpretation of the data… The hybrid group’s score fell the most in the second phase, and was worst overall at the end.
Yet the author believes the hybrid approach is best?
I learnt multi-threaded programming with block-based programming in my 30s and would recommend it to all.
I’ve been programming since circa 2001. Up until 2011 this was all for test automation or websites and I had no concept of multi-threaded programming. I’d looked at it but couldn’t grasp the concepts. What I needed was something that reduced the programming aspect while increasing the learning. Enter LEGO (R) Mindstorm.
I discovered in Mindstorm that you can run multiple parallel threads. I quickly learnt, for example to have a thread always running on a loop turning the wheels, injecting velocity as a variable from a separate process. The wheels remained “turning” even when stationary, ie: velocity=0. What an advantage! I could set up wheel control and others on threads, fire, loop and forget.
I quickly took what I learnt and wrote a multi-threaded program in Python for an early MagPi. While the code looks clunky to me today it served me well. It’s a program I still use now, several years later, to speed test each new Pi that is released.
I spent years using text and committing it to memory. When I tried Scratch a few years ago, the hardest part was finding the blocks in the menu that I needed (and trial and error to try blocks). It takes a little time, but eventually you get fast at finding the necessary blocks. I recently wrote an app using MIT’s free app maker and it’s based on Scratch. After several days of looking at the examples and finding YouTube videos for more advanced stuff, it worked out. I realize blocks and text have their roles, both in style of learning and how the software for a gadget it set up.
“The 90 students in the study (14 to 16 years old) were divided into three groups, each with a different intervention but taught by the same teacher.”
What does “intervention” mean here ? Educationalists love to use long words to hide behind !
I wonder how the transition from Scratch to Java was taught, or how OOP was explained (if it was). Scratch simplicity hides the “grown up” principles lurking in the background. Sprites are Objects, variables are class properties, blocks of code are methods and running those blocks is multi-threading. The broadcast tools are signals between threads. Defining new blocks is “sub-routines”. Setting up the stage almost becomes the GUI layout (but not quite).
Plinta Alba Archives
Thank you for any other informative web site.
Where else may just I get that kind of information written in such an ideal approach?
I have a venture that I am just now running on, and I’ve been at the look out
for such information.
Hi ? they link to this cool page in the blog which has instructions for lots of projects: https://projects.raspberrypi.org/en
Working with my 8 year old son on Micro:bit projects, he finds the block based style easier, which is hardly surprising. However the standard Micro:bit environment is hybrid, so he can see the correlation between the blocks and the code. He agrees that the code is a much faster way of writing, once you know it, but initially the blocks are much easier. However, they are really slow to find and position, and sometimes the easiest (only?) way to make a slight change to a code structure is to delete the whole section and rebuild it, whereas editing the code is trivial if you know it.