In the same sense that studying English isn’t just about learning vocabulary words, studying computer science isn’t about learning programming languages. Programming is very abstract: it is a way of communicating with the computer. The language defines the scope of what you are able to create — some languages are designed for crunching numbers, others creating graphics, and everything in between.
Since children learn to code primarily through projects, the choice of which language to teach them is important. There are often a very large number of options and potentially many options that would work. However, if students are more interested in math than game design then that eliminates many options.
A student should have the right coding language at the right time. Therefore, it is occasionally necessary to transition from one programming language to another. This is particularly tricky when going from Scratch block-based coding to a typed programming language like Python.
Let’s find out why it is tricky and how our mentors support their students.
The Benefit of Starting with a block based language like Scratch
Block based languages don’t require typing like most programming languages. Instead, scripts are constructed by dragging small building blocks of code and stacking them together. Children with rudimentary typing abilities still have the opportunity to learn programming fundamentals with block based languages.
Scratch is one of the most popular block based languages. It allows students to build games and animations in a 2D world. It is tightly integrated with the on-screen graphics so that students can see the results of their program instantly. From day one, kids can create exciting games in Scratch. In traditional languages like Java and Python, more buildup is required before seeing the results of their effort.
If students are less interested in game development there are still many block based language options available. Code.org’s App Lab and MIT’s App Inventor both facilitate App development. Blockly and Snap are also popular options and provide access to some of the more complex coding concepts.
What’s to gain from eventually switching languages?
If block based languages exist, why is there a need to transition into a typed programming language like Python or Java? Though languages like Scratch have many benefits and are particularly great as a teaching tool, they also have limitations.
Drag-and-drop languages are very structured and rigid with what you are allowed to do. By comparison the possibilities in typed languages are almost limitless. These allow students to build things that are more complex and creative.
The freedom that a typed language gives to a programmer can initially seem overwhelming. What should you type? That’s why starting in Scratch greatly helps to ease the transition to a more powerful language like Python or Java. Students often have already internalized the patterns that are needed in a type language because they are enforced in drag and drop languages.
These languages abstract less of the inner workings of the computer away from the programmer and allow students to develop a much more in-depth knowledge of concepts. While one might be able to get away with only a tenuous understanding of a topic to use it to solve a problem in Scratch, this is not the case in a typed language. However, once the fundamentals are mastered, the programmer can use Java or Python to create anything they can imagine.
When is the right time to switch?
The trickiest part of all of this is knowing when a student is ready to transition from a block based language to a typed language. The timing of this transition varies from student to student as there is a fine line between perfectly challenging the student and getting them in over their head.
We start to transition away from Scratch once the student shows mastery of certain key concepts including conditionals, iteration, and functions. To demonstrate mastery, they must be able to independently apply a concept used in one situation to solve a problem in a completely different situation. This shows they understand the fundamental building blocks can be used in many different ways to achieve different results.
Generally, if we can continue to make Scratch challenging and produce new insights into the concepts, we will keep with the drag-and-drop programming. But at some point it will feel too restrictive and the student will need new challenges.
Age is another important factor when considering the transition. Generally speaking, younger students do not have as well developed abstract thinking skills making the visual output more important. Additionally, younger students often have not yet developed typing and spelling skills necessary for typed languages.
Sometimes we get to the point where students are asking to move to a typed language (even if they don’t know it). They complain about a lack of diverse data structures or object oriented programming structures (without that vocabulary) we then end up having to create repetitive code to create the behavior they want.
Building a base of early success
Whenever starting a new learning experience, it is important that the first experiences are positive. Once we’ve started with a typed programming language, it’s vitally important that a student experiences numerous quick wins to provide positive reinforcement that they can do it. In order to ensure this happens, we’ll temporarily regress the conceptual load of the projects compared to what they were doing in Scratch.
When we introduce new concepts in Java or Python, we relate the new ideas back to what they did in Scratch. As mentioned earlier, Scratch abstracts much of the implementation of the language away and typed languages are a great opportunity to “pull back the hood” to really get into the details.
While the visual nature of Scratch is amazing, the graphical nature of programming languages isn’t just limited to Scratch. One of our goals is to introduce the graphics libraries of typed languages as quickly as possible. This allows them to be challenged while being able to see the results of their efforts.
Processing is available in both Python and Java and is a great introduction to using a library that allows students to create colorful illustrations. There are also libraries that allow for game development similar to Scratch including Pygame in Python and Greenfoot in Java.
When is the time right for your son or daughter?
Breakout Mentors has made this transition with many students and continues to monitor the progress of the kids currently working in Scratch. Knowing exactly when to make the switch to a typed language is just one of the many reasons why you should not take a one-size-fits-all approach to coding education. In this case, a personal mentor is more valuable than the “perfect” curriculum. Please contact us if you are interested in learning more.
This article is by Austin Gandy, one of our exciting programming mentors. He is a junior at UC Berkeley studying Computer Science and has been a mentor for a year and a half.