📜 ⬆️ ⬇️

Choose between visual and textual programming for kids.

Recently came across an interesting English article written by Tracy Gardner from TechAgeKids. In her, she shares interesting thoughts about programming by children in text and visual languages. She cites interesting observations that coincide with my experience in the development of children in programming. I present to you the translation of this article .



Choose between visual and textual programming for kids.


It is said that children should start with visual programming languages, such as Scratch, and then move to textual ones, such as Python or JavaScript. I find this to be ridiculous, especially considering that for most of my career I worked on creating visual languages ​​that would make software development more accessible to those adults who have subject knowledge, but not programming experience. I also spent a lot of time developing software using visual languages ​​(often including text fragments).


This article provides all the details. Immediately summarize for parents who are interested in whether their child needs to switch to text-based languages:



Why do we teach children to program?


First of all, let's take a look at why we teach children programming. Some kids will become programmers in the future. Others will take jobs that require, among other things, elementary programming skills. The rest should be taught programming just to better understand the world in which they live, to be able to control it.


What do we teach children?


When teaching younger children, my goal is not to give them professional skills. I try to teach them two main things:


  1. Give the skill of creating projects that are useful / interesting / entertain children now.
  2. To transfer knowledge of computational thinking that will allow them to do things that are useful / interesting / will be entertained / will bring profit in the future.

When you teach adolescents who are interested in programming, robotics, etc., training in relevant skills is put in the head. You can use the same approach to educate capable young children, especially when those have parents who are ready to help children use known programming languages, but far fewer parents who are motivated to help with children's programming languages.


What are visual and textual languages?


It is easier to define textual programming languages. These languages ​​are entered from the keyboard and stored as text files.


A graphic or visual language typically uses drag and drop rather than input. It may contain icons or text labels on blocks and elements. GUI elements such as dialogs and drop-down selection menus are often used.


Popular children's languages ​​are Blockly and block-like.


As a rule, when people talk about textual languages, they refer to programming languages ​​such as Python, Lua, and JavaScript, which are “real” programming languages ​​used by professional software developers.


Interestingly, there are also children's textual programming languages, for example, the Logo (Logo) and Sniff (not block-like, namely text), which can be considered as a step between visual and textual languages.


Convenience learning and memorization


One of the important features of visual languages ​​is that children do not have to remember the list of commands or the complex syntax that surrounds them. This is too much data for children learning a new programming language.


Many professional software developers spend dozens of hours weekly programming in the same language. This means that adults can remember a lot about syntax and API and, when they need it, they are instantly available.


Children, as a rule, are in other circumstances. Many children will write code only during the weekly 45-minute lesson, so that they can never achieve mastery and will be forced to constantly repeat commands.


My youngest son loves using SAM Labs electronic components and inventing original things.



It may take several weeks between work sessions at SAM Labs, but he can still instantly remember how to put the blocks together in a visual editor. I am sure that if he used a text language to achieve the same result, it would be much more difficult to find where he stopped. In fact, for solving more complex problems, SAM Labs really uses text programming, and when I help my son, I have time to forget the nuances of the language between sessions. (The faster SAM Labs can realize most of the capabilities in the visual layer, the better).


Of course, a convenient programming environment can facilitate learning and memorizing the syntax of text languages. A good IDE (integrated development environment) helps a lot with this. But the versatility of a typical programming language makes it difficult to provide a language in the same accessible form as Scratch or block-like languages.


Syntax errors


Syntax errors are a huge problem for children and adults. Who wants to spend days counting brackets, correcting typos, or looking for a missing colon that should definitely be somewhere?


Yes, good editors can help you detect these errors, but even the best editors do not allow you to make a syntax error and not correct it. In Scratch, you work directly with the concept of programming instead of breaking it up into separate task fragments. (It is sometimes disappointing if, for example, you want to swap repetitions in an infinite loop. But this is just a job, it is not difficult to make it. - The difficulty is to simplify the solution obtained.)


Children often do not have access to excellent tools, and ultimately find themselves in a situation where they have to contend with syntax errors. I found that CodeCombat is a great way to introduce children to text programming and various IDEs, but this platform is not a universal programming environment.


There are projects aimed at transferring the benefits of visual editing to a text-based programming environment for children (for example, frame-based editing ).


Icons against text


Some visual languages ​​rely on pictorial characters or icons, for example, LEGO Mindstorms uses pictogram-based notation in its software.


For young children who still cannot read the code, images are often used. If children have learned to read, in order to adequately compete with text labels, the icon-based system must be very well developed. If a child has to make his way from image to word to understand what he has seen, you only create additional difficulties for him.


Languages ​​such as Scratch and Blockley use text labels on relocatable visuals. My experience shows that for children who can read, this is the best working option.


Visual doesn't mean “simplified to zero”


Professional software developers often assume that languages ​​such as Scratch are the next “simplified” version of programming.


But it's not quite like that. What Scratch really does is to remove the extra details that really only prevent children from quickly moving from the idea to the start of the code.


Instead of spending days and finding that a colon is missing at the end of a line, children can spend more time thinking about the logic of their project. They really spend more time on computational thinking and less on making the computer happy.




Scratch can be as hard as you need. You can draw fractal trees in it and solve complex synchronization problems.


I covered this topic in more detail in the article “ Scratch - the wrong approach to computer programming, isn't it ?” (The author’s article in English).


Linearity vs. Alternatives


One of the features of textual languages ​​is that they are linear in nature. Text languages ​​do not very well show links between different parts of the code (although, of course, these links are there and must be traversed by the parser).


Visual languages ​​typically support a non-linear structure. Modern programming, especially game development, hardware, and the Internet of things, often work on an event basis and run at the same time. Code is not a book, it is not executed sequentially from beginning to end.


In Scratch, I can arrange the code to move the sprite as follows:



This leads directly to the actual movement of the sprite. In a text language, you would need to place the teams in a random order, and you would lose additional information.


I learned Sonic Pi, a text-based language for making music, and I was discouraged by the difficulty of creating a linear code that should work simultaneously.


Scratch has a function to create code layout in 2D space, so if you write music for several instruments that sound simultaneously, you can simply lay out the code sections horizontally or place them in different sprites that will be executed simultaneously automatically. For Scratch, concurrency is a natural concept.



However, Scratch is still mostly linear. It can be difficult to understand patterns of behavior that depend on one transmitting sprite message, and several others that receive it.


The Wonder workshop used a different approach to the Wonder language for Dash & Dot robots. It uses multithreading. Threads are usually used to describe business processes in the exact (and sometimes executable) way. State blocks are often used in control systems. This is a useful tool for describing the behavior of systems that behave differently depending on the current state.


A very interesting approach to programming in Minecraft, they use a mixture of text commands and visual blocks in 3D space. The code is actually part of the world, and for many children, Minecraft is as real as the real world around. (Think of the Internet of Things and more!)


(I have not even touched on the teaching of children to artificial intelligence and the basics of machine learning, which require different styles of language. Let's talk more about this in the future.)


Visual doesn't mean “slow”


Adults who spend little time with children learning to program in visual languages ​​often assume that programming in a visual language is slow. Slowness is felt by an adult who compares the speed of code development in a visual environment with his speed of typing code in a text medium.


But only a few children can type quickly, so looking at their attempts to write text code is really hard. (Yes, they have to learn how to type, but this is a topic for another conversation.) They also make a lot of typos: orthovisual errors, extra spaces.


In addition, most of the time spent on programming is thought time. Thoughts about what you want to achieve from the application and what code to use for this purpose, take more hours than the procedure of entering commands.


What about touch screens?


For many modern children, the first experience with a computer becomes a phone or a tablet with a touch screen. Visual languages ​​are very easy to translate into a touch interface. Most young children work much faster with the drag and drop interface on the tablet, rather than using the keyboard and mouse or the trackpad. And for most teens, the phone is always at hand.


There are many applications such as Scratch Junior or Pocket Code that effectively use the touch interface to allow the “generation of smartphones and tablets” to write code.


Microsoft has created a touchscreen development language focused on phones and tablets. It is a text language, but in fact it reduces the proportion of typing through the use of clicks. This idea is definitely worth exploring.


Apple is launching the Swift Playground app, which will teach children to write in the Swift language using all the multitouch features on the iPad.


Children often create visual programs.


Children often create visual applications and games. Visual languages ​​often have a very close connection between the end result and the language used to achieve it.


For example, in Scratch you can click on the sprite to change your code. This direct connection reduces cognitive overload when developing a visual application.


In Minecraft, the code is really embedded in the environment. Flow control is achieved using Redstone gaming dust.


Children and the visual environment


Most children prefer the visual environment, because it brings them more fun. Work in it feels less difficult. Text-based medium may seem rather dry to children. Companies like Tech Rocket are trying to make text programming more interesting - just look at their free Python tutorial.


Heavier is not better


A child who is good at making games on Scratch can be very disappointed with the transition to an environment where creating such games is much more difficult. It is not “grown-up” to do more work than is necessary.


Sometimes you have to make it difficult to compromise for the sake of greater flexibility. But I think that in other cases, professional software development languages ​​and IDEs have much to learn from Scratch and similar languages.


What about mixing visual and textual basics?


There is a tendency to offer children tools that allow you to create the same code from blocks and text commands. In this case, it is the text code that is considered the “real” programming language.


For example, this is offered in Code.org and CodeKingdoms and the Microsoft micro: bit (bit block editor).


My 9-year-old son is currently learning how to program Minecraft mods with Java and a block editor from Code Kingdoms .


A good enough approach, because a son can partially apply knowledge of text languages ​​in a visual environment.


What about children's versions of languages?


The programming language Ready allows children and teens to write games in an environment that runs on top of the Unity game engine.


This is an interesting approach that will eliminate one of the main complaints about languages ​​such as Scratch - ultimately you can create an application that can be run outside of Scratch or presented on the App Store.


Adults also use visual languages.


Visual languages ​​can be more effective than textual languages, if they are used to solve one-time tasks or non-programmers who have subject knowledge.


Programming is increasingly part of everyday life. IFTTT (if so, then) is a very popular service that allows people to automate their lives. He uses a visual editor to create rules. You do not have to learn complex syntax to use IFTTT, you just use your own editor. Is this really programming? Well, the approach assumes that you have to write code to do everything differently. He is what more people need to program their lives without having to learn a complex language.


Game engines often at lower levels of detail combine visual editors with text code.


Software developers are always looking for ways to enable less technically focused business users to be included in software solutions. These users usually understand (and define) the business processes in an organization: they determine the details of the operation of a bank account or the calculation of discounts. They should be able to accurately specify the desired behavior so that the computer can execute the code, but they don’t want to worry about things like library syntax errors and converting integer types to string, so you can add them to the list.


There is also a practice to offer adult non-specialists to use visual languages, allowing them to quickly get to work. For example, this article contains many examples of visual programming on the Internet of things. For many people, programming is a means to an end, not an end in itself! If block-based environments make programming more accessible to more people, this is fantastic.


Perhaps many children who learn to program today will later use visual rather than textual languages ​​in their work and hobbies.


Some kids love text programming.


Some children from a very early age sincerely love text programming. Of course, you should not stop them, on the contrary, there is every reason to encourage.


Many young children can write HTML & CSS and learn Python, JavaScript, or Lua. And for some, the temptation to write Minecraft mods will lead to learning Java. Today, the above languages ​​are the best tools for solving various problems. And some children just want to learn how to program to raise academic performance.


All these are important aspects. I myself was one of those children! (Only in my days were the Spectrum Basic and C languages ​​on the Amiga.)


But this does not mean that all small children must learn a text language or that text languages ​​are “better.”


Summary


Text programming is not a priority in teaching preschoolers and children of primary school age.


Programming in Scratch and other visual languages ​​can not only serve as a stepping stone for further study of Python and Java. Studying Scratch is useful in itself, and some children will continue to use the visual environment, but already an “adult” one.


The goal of the training is to provide children with digital design skills and professional knowledge that can be applied regardless of the programming language.


Of course, some children will become software developers and will have to learn the languages ​​that are used in commercial development. But they will have to learn the text language because it is the right tool for developing their project; because they are interested and / or it will benefit their professional skills. And you need to switch to these languages ​​when they improve enough typing skills. Until then, visual programming languages ​​will be more useful.


I would prefer to teach a child to program in Scratch so that he could enthusiastically create fantastic projects, rather than forcing the same child to deal with the syntax in a text editor. After all, so he learns more about computational thinking and will have a better understanding of the world of technology around.


Additional information for parents. I know about the winter city camp in which children will program on Scratch and create their projects to solve a real case. It takes place in the center of Moscow on January 4-6, 2017. If it is interesting and useful for you, please see the details here .


')

Source: https://habr.com/ru/post/400495/


All Articles