This last week, I have been participating in the Electronic Resources & Librarians conference. Not surprisingly, several of the sessions did have me thinking of this program and the cross-over between the fields of librarianship, computer engineering, and education!
Hopefully, the last few weeks of blog posts have been convincing about the overall benefits of teaching students to code and use computational thinking skills. This week, my focus is on choosing the right kind of coding (block-based or text-based) for students, and the pros and cons of each. The fact of the matter is that this is not a one-size-fits-all type of lesson.
Pros and Cons of Block-based Coding
One of the pros to teaching block-based coding is that it is very visual and easy for students to grasp. In my research, I encountered a particular population that could benefit from learning block-based coding: individuals with ASD or other developmental disabilities. Although the sample size of the study performed by Knight, Wright, Wilson and Hooper (2019) was small, including only three individuals, they selected these individuals based on very strict criteria. These students were diagnosed with ASD, non-verbal communication, and challenging behavior including violence and aggression. Most importantly, though, they were identified as already having an interest in robots and technology. The findings of this study suggested that while these students may in most cases become frustrated when encountering tasks with errors, they were engaged and more inclined to try with block-based coding since it was more motivating for them.
The pros of using block-based coding are not limited to being engaging to students with ASD. Block-based coding can also be used to introduce students to using computational thinking skills without introducing the complication of learning a text-based language before they are ready. One study used pre-tests and post-tests to observe the positive perceptions and actual benefits of teaching visual programming (Saez-Lopez, Roman-Gonzalez & Vasquez-Cano, 2016). The benefits included student motivation, enthusiasm and commitment, as well as improved learning of programming concepts, logic and other computational practices.
The cons of block-based coding are pretty simple – it can be limited by available block commands and while it teaches students the foundations of coding, it doesn’t teach them how to actually write the code itself, in whichever chosen language they choose. In that way, it is twice-limited. Some studies show that it may also introduce and reinforce bad coding habits (Price & Price-Mohr, 2018).
Pros and Cons of Text-based Coding
One of the pros of text-based coding is that it can still be a visual or graphical programming environment (Price & Price-Mohr, 2018). It also helps students learn the syntax and structure of their programming language, in this case, Java. While it may also help teach students the foundations of coding, it also introduces many different elements at the same time. However, it can also be taught “unplugged” which may help students focus on the foundations and syntax without taking on the entirety of coding all at once.
One of the cons of text-based coding, also approached by Price and Price-Mohr (2018) is that it is very structured and students may have a harder time implementing their codes.
![]() |
| "The Questioning Roboto" by Matt Hutchinson is licensed under CC BY 2.0 |
How to Approach Skill Levels
Based on my research, it makes sense to me that students could potentially start with block-based coding and move to text-based coding in small increments, perhaps starting with unplugged assignments and moving to more complicated assignments as their confidence builds. This would allow them to experience the “fun” of coding with block-based coding to build their enthusiasm and motivation, and then lead them to the skills that they are more likely to need in the workforce. There are studies, contradictory to what Price and Price-Mohr suggested, that show students who learn block-based programming first do not experience differences in achievement when learning Java compared to students who did not learn block-based programming first (Weintrop & Wilensky, 2019). In fact, there are programs mentioned by Weintrop and Wilensky, like Pencil Code, that allow students to switch back and forth between block-based coding and text-based coding. This could be extremely valuable for students who are building confidence with text-based coding as they transition from block-based.
In the end, my research did lead me to the conclusion that there is no right answer! In my personal opinion, however, I think starting with block-based coding could be very useful for bringing in populations who might have an interest but are discouraged by errors. Then, it is easy enough for a teacher to help students transition at a pace they are comfortable with.
References
Knight, V. F., Wright, J., Wilson, K., & Hooper, A. (2019). Teaching digital, block-based coding of robots to high school students with autism spectrum disorder and challenging behavior. Journal of Autism & Developmental Disorders, 49(8). https://doi.org/10.1007/s10803-019-04033-w
Price, C. B., & Price-Mohr, R. M. (2018). An evaluation of primary school children coding using a text-based language (Java). Computers in School, 35(4), 284-301.
Saez-Lopez, J.-M., Roman-Gonzalez, M., & Vazquez-Cano, E. (2016). Visual programming languages integrated across the curriculum in elementary school: A two year case studying using “Scratch” in five schools. Computers & Education, 97, 129-141. https://doi.org/10.1016/j.compedu.2016.03.003
Weintrop, D., & Wilensky, U. (2019). Transitioning from introductory block-based and text-based environments to professional programming languages in high school computer science classrooms. Computers & Education, 142. https://doi.org/10.1016/j.compedu.2019.103646

No comments:
Post a Comment