# How to teach computational thinking?

- Transfer
- Tutorial

*Stephen Wolfram's translation of the post, How to Teach Computational Thinking .*

Many thanks to Polina Sologub for help in translating and preparing the publication.

Many thanks to Polina Sologub for help in translating and preparing the publication.

## Content

- Computational Future

- What is Computational Thinking?

- Getting to know Wolfram Language

- And what about ...

- Basics

- Where can computational thinking fit in?

- What can children do?

- Led by children

- What is computing and programming?

- How will all this happen?

## Computational Future

Computational thinking will become the defining characteristic of the future, and that is why it is so important to teach it to children now. A lot of controversy has traditionally been going on around the formation of mathematical thinking in children, but this problem fades in comparison with the importance of teaching computational thinking. Of course, there are certain areas (we are talking about everyday life, and about various professions), which provide for the use of traditional mathematical thinking. But computational thinking will be needed everywhere; more than that: it will be the key to success in almost any career in the future.

Doctors, lawyers, teachers, farmers ... The future of all these professions is closely connected with computational thinking. This applies to any field of activity.

I noticed one interesting trend. Choose any area X - from archeology to zoology. There either already has a "computational X", or will appear soon.

Look at the computing examples from this article in Wolfram Open Cloud. ”

So how do we prepare today's children for this future? For 40 years I have been connected with the topic of computational thinking, and for the same amount of time I create technologies for it and apply them. Today I have a clear idea of what is required for the formation of computational thinking. The question is how to teach this to children. I think I now have a good answer to it: this is Wolfram Language . Wolfram Language has technologies that make it possible to teach computational thinking even to children.

I am personally very interested in this: for example, access to Wolfram | Alpha on the Internet has been free for several years. And now, after the launch of the Wolfram Open Cloud service , anyone can start learning about computational thinking with the Wolfram Programming Lab using the Wolfram Language anywhere . But this is only the beginning, and further I will talk about interesting new things that have now become possible.

## What is computational thinking?

Well, firstly, let's try to define what we mean by "

*computational thinking*." Its intellectual core consists in the systematic formulation of something with a sufficient degree of clarity (so that the computer can explain what needs to be done). Mathematical thinking is connected with the formulation of something in such a way that it can be solved mathematically (when possible). Computational thinking is much broader.

But how to "say" something to the computer? Need a language. Thanks to Wolfram Language, we can now directly communicate with computers about what interests us. Wolfram Language is knowledge-based: it knows what cities, or spices, or songs and photographs are; and he knows how to make calculations with them. And as soon as we have an idea that we can formulate computationally, then we can express it with the help of a language and (thanks to three decades of technology development) realize it as automated as possible.

Wolfram Language is a programming language. Therefore, when you write on it, you are programming. However, this is a

*new kind of programming.*. This is such a language in which you can directly realize computational thinking, and not just tell the computer step by step what low-level operations it should perform. This is such programming, with the help of which people (including children) realize their ideas.

Programming (and related education) traditionally consists in “telling” the computer what to do. But thanks to the technologies built into the Wolfram Language, you can work at a much higher level and focus on computational thinking, not just programming.

Of course, a number of software developers are needed in the world who can write low-level programs in languages like C ++, or Java, or JavaScript, and can work with details. But this number is very small compared to the number of people who should be able to think computationally.

Wolfram Language (especially in the form of Mathematica ) has been widely used in technical research and development around the world for more than a quarter century, and with its help a huge number of important inventions and discoveries were made. All these years, we gradually supplemented my initial vision of an integrated language in which every possible field of knowledge is built-in and automated. And the most interesting thing is that we actually did it for a wide range of areas - including for all disciplines that are traditionally taught in schools.

Seven years ago we released Wolfram | Alphathat children (and adults) use to answer questions. In Wolfram | Alpha, everyday English is used as input, and then complex calculations are made in Wolfram Language, followed by automatic generation of results pages. I think Wolfram | Alpha is a great illustration of what Wolfram Language can do. True, here we are talking about “quick” questions, which can be expressed in a few words.

What about more complicated questions? Normal English will not be enough here. In order to achieve a certain level of accuracy and get certain results, one could create a very complex and incomprehensible language. The good news is that there is an alternative:

*Wolfram Language, which was created in order to easily express complex things with its help*.

In order to start using Wolfram | Alpha, no skills are required. But if you want to go further, you need to learn how to formulate and structure. In other words, you need to learn computational thinking. And the main thing is that Wolfram Language is a language in which you can do something insofar as it has managed to surpass simple programming.

## Introducing Wolfram Language

What does the first acquaintance of children with Wolfram Language look like? To understand how to teach computational thinking, over the past few years I have spent quite a lot of time on Wolfram Language classes with children. Sometimes I worked with large groups, sometimes with small ones, and sometimes I just noticed a child at some adult event and ended up spending time with him, and not with adults. I worked with both high school students and high school students (11-14 years old).

If I deal with one child or with a small group, I always insist that the children enter the data themselves. Usually I start with something that everyone knows. For example, we want to calculate 2 + 2. Children enter this expression and see that, yes, the computer produces the result they know:

In the future, children will often experiment with some other basic arithmetic operations. It is very important that Wolfram Language allows them to enter and immediately see the result.

After that, I usually suggest that they try something that as a result will produce more numbers:

Often they ask if it is normal that such a long number is obtained, or if the computer crashes. I suggest trying other examples, and the children do calculations that instantly generate many pages of numbers. Such large numbers are very impressive for children. I think the fact is that this allows them to see that, yes, the computer can really calculate this (just think how long it will take you to get all these numbers) ...

After they performed some arithmetic operations from among the main ones, it was time to try some other functions. The most common function that I usually start with is

**Range**:

**Range**- a good function in the sense that it is uncomplicated, and at the same time very intuitive and allows you to quickly get the feeling that you can really make the computer do what you want. Function

**Range**is good also because it is easy to use to create something big. Often I suggest that they try to apply this function to [1000]. Then usually someone asks if it is possible to build a range of numbers from 1 to 10000. I suggest trying this.

I interact with each child or group of children in different ways. However, most often the next step is to visualize the list that we made:

If the children are familiar with mathematics, I suggest they try to get a list consisting of prime numbers :

And then - build a graph :

For children who think they don’t like math, instead of numbers I I use colors :

You can mix red and blue colors to get purple:

You can use the current image from the camera:

And find all the "borders" of the elements on it:

You can also come up with something more complicated with color: You

could go further in another direction by compiling a list of commonly used words in English (you can try to do the same with another language ):

If a child has linguistic abilities, we could try to choose some random words :

You can use the

**StringTake**function to take the first letter of each word:

Then using the

**WordСloud**function

**you**can make a cloud of the first letters of words and see the relative frequency of their occurrence:

Some children ask : "What about the first two letters?".

You can still talk for a while about how many words begin with “not-”, etc. You can go further and look at the translations of the words:

In fact, you can easily do a few hours just doing everything that I talked about so far. But let's look at some other examples. An important feature of Wolfram Language is that it contains a lot of real world data . Here is an example of making a collage from the flags of European countries , where the size of each flag is proportional to the current population of the country:

Since we talked about color, it’s interesting to see where in the color space the flags are (for example, not so many “pink countries”):

Wolfram Language allows you to not only carry out abstract calculations, but calculations based on real knowledge. It covers a huge range of areas: from traditional STEM areas to art, history, music, sports, literature, geography and so on. Children often like to do something with cards .

We could start from where we are (

**Here**function ). Or start from some kind of landmark. For example, here's a map with a circle of 100 miles radius around the Eiffel Tower:

Here are some more images:

What about the story? How can Wolfram Language interact with this area? In fact, Wolfram Language is full of historical knowledge . About countries (), or a movie (), or, for example, about words .

For example, a comparison of the use of the words “horse” and “car” in books over the past 300 years:

Try to do the same for country names, or inventions, or anything else.

You can go further in one of many directions. Here is one of them: symbolic graphics . Let's make a ball :

Children are always interested in doing something similar in 3D and twirling. You can also create 3D graphics, for example, like this one, which consists of 100 spheres painted in random colors :

Children of all ages like to create interactive material. Here's a simple “cyclops eye” that can be easily built in stages:

Sometimes, using the Wolfram Language, I create melodies. Here is a random sequence of musical notes :

There are many interesting directions. For the novice doctor, there is anatomy in 3D - you can take the geometry of the bone and print it in 3D. Etc.

## And what's about…

I would never seriously try to work with children (although I have four of my own) before starting my studies in computational thinking. So I did not know what to expect. The people around me constantly reminded me of difficult moments that could interfere with the implementation of what was planned. Firstly, they were skeptical that children could really work with source code in Wolfram Language; they thought they would just get confused in the syntax and stuff. And the second difficulty was that the children, in their opinion, would not be motivated to do anything with the code, if this does not lead to the creation of a game that can be played.

It’s nice to work with children, if only because if you give them a chance, they will very quickly let you know how to interact with them. So what happened next? None of the potential problems became real. But the reasons for this are quite interesting.

As for code entry, one thing needs to be understood:

*in the modern world, most middle-school children are used to using the keyboard*. Sometimes, when they start typing code, they have to first see where the [] or + keys are. But they have no fundamental problems with input. In addition, they are quite used to learning the exact rules (“i goes before e ...” in English spelling; the order of operations in mathematics, etc.). Thus, remembering a few rules like "

*functions use square brackets*"or"

*function names starting with a capital letter*"are not difficult. And, of course, Wolfram Language does not have all the exceptions to the rules that exist in a natural language.

I saw that automatic prompts (elements turn red if they are in the wrong place, various auto-completions are offered, etc.) are very important for children typing a code. The bottom line is that, despite the theoretical concerns of adults, real children seem to be easily given a set of syntactically correct code in Wolfram Language. In fact, I was amazed at how quickly many children “grasp” it. Seeing only a few examples, they immediately began to generalize. And most importantly, because the Wolfram Language is designed very sequentially, the generalizations they invented actually work. For me, as the creator of the language, this is a touching moment.

OK, children can enter the Wolfram Language code. But what do they want? Many children enjoy playing computer games, and adults often think that they will like to create them. However, according to my observations, this is not so. For most children, the most important thing in Wolfram Language is that they can immediately do something real with it. They can enter the code, and the computer will immediately do what they want. They can create images, sounds or texts. They can do art. They can do science. They can explore languages. They can analyze Pokémon (yes, Wolfram Language has big Pokémon data built in ). And, if they really want to, they can make games .

If you ask children what they might be interested in in programming, before they get to know Wolfram Language, the most common answer is “games.” But as soon as they learn about the possibilities of Wolfram Language, they stop talking about games and want to do something “real” instead.

## The basics

Despite its thirty-year history, Wolfram Language has only recently reached a level where it is possible to quickly and convincingly demonstrate to children what computational thinking is. It is important that this is not only the language and the knowledge contained in it; it is also an environment. Wolfram Document

Conceptthat we invented almost 30 years ago is a good way to interact with the language for both children and adults. A Wolfram document is primarily an interactive document that freely mixes codes, results, graphics, text and everything else. You can perform calculations, type code and get results directly in the document. Results can be dynamic with their own automatically generated user interfaces. And you can write and read explanations or instructions directly in the document. It took several decades to bring the documents to mind. But now we have an extremely effective environment in which it is convenient to work and think (and, of course, to study computational thinking).

For many years, documents and Wolfram Language were only available as desktop software. Now they have also become available in the cloud directly from your mobile device. This means that any child can simply open a browser and immediately start interacting with Wolfram Language, creating or editing any document or code.

To make this possible, a large technology stack is required . To build it, it took many years of my life. It was very nice to see how, over the years, the most wonderful things have been created with the help of our technologies. And I am very glad that with its help it becomes possible to spread computational thinking among future generations.

When we created Wolfram | Alpha , I decided to make it free on the Internet around the world. And it was great to see that a lot of people (and especially children) use it daily. When the technology was ready, I also decided to give free access to the entire Wolfram Language in our Wolfram Open Cloud and set it up so that children (and adults) could learn computational thinking there.

Wolfram | Alpha is set up so that anyone can ask her questions in spoken English. This is a good way to support education . However, if you want to delve into the study of computational thinking, you will have to go beyond the boundaries of familiar English. And here Wolfram Language comes to the rescue.

So where do you get started with Wolfram Language? There are probably many answers to this question, which, among other things, depend on the characteristics of the environment and the resources that are available to different children. I want to believe that personally I did a good job with the children in our Wolfram summer camp for high school students: I saw very good results obtained through personal mentoring of each child.

It is also important to have self-service solutions. My contribution to this is a book (see the article on Habré ), which is called an

*Elementary Introduction to the Wolfram Language*. This is a book about computational thinking. Its study does not imply any prior knowledge of programming, or, for example, mathematics. But in the process of storytelling, readers get to the point where they can write real programs.

The book is available online for free . There are also exercises. I originally intended to write a book for high school and above. It all ended with the fact that quite a few high school students (11 and older) came who enthusiastically studied it.

A free online course based on my book will be available soon, and quite a few more courses are under development.

Oh well. When a child opens a browser to learn computational thinking and Wolfram Language, in which direction should he move? A few months ago, we launched the Wolfram Programming Lab . The free version is in Wolfram Open Cloud (there’s not even a login needed until you want to save your work).

The Wolfram Programming Lab has two main branches. The first is a set of Explorations , each of which is a document with code that you can edit and run. The document then suggests options for moving on to do your own research.

Explorations give you a taste for Wolfram Language and computational thinking. In a way, this is similar to immersion-based language learning:

*you start with the code that “fluent speakers” could write and interact with it*.

But the Wolfram Programming Lab also has a second branch: an interactive version of my book that allows people to move step by step, starting with a very simple one and gradually creating more and more complex code.

You can use the Wolfram Programming Lab in full, both through the browser and through the cloud. However, there is also a version for desktop PCs that runs on any standard computer. If you have a raspberry pi, which means you already have the desktop version of Wolfram Programming Lab , which comes bundled directly with the operating system, including special functions for receiving data from sensors connected to the Raspberry Pi.

I wanted to make sure that the Wolfram Programming Lab is suitable for any child anywhere in the world, regardless of whether it is included in the educational environment. What exactly benefits the children is access to people with whom they can work together on something. We plan to create a framework to support this, which includes, among other things, the Wolfram community . Wolfram programming labcan easily fit into the existing educational structure (not least with the help of Wolfram Language) to create an analytical system designed for performance analysis.

It is worth noting that one of the important features of the Wolfram Cloud infrastructure is that it allows everyone (students and teachers) to publish the results of their research on the Internet.

We are at the very beginning of the development of the Wolfram Programming Lab and continue to work on its improvement. Some time ago I had a chance to talk with children at a school in Korea, and I asked if they thought they could learn the Wolfram Language. One child replied that the only difficulty was reading function names in English.

It made me think. And as a result, we entered code signatures in various languages. You still enter the Wolfram Language code using standard function names, but you get an instant explanation in your own language (by the way, some versions of my book will be available in different languages).

## Where can computational thinking fit in?

So, I talked a bit about the teaching of computational thinking. But how does computational thinking fit into a standard curriculum? Easy!

You might think that computational thinking somehow relates only to STEM education, but it is not. Computational thinking applies to the entire curriculum . This is a sociological study. And languages. And the music. And art. Sport. In each of these areas, there is much that can be done through computation and computational thinking. And most importantly, all this is available for children. Wolfram Language provides the work of all internal processes, so you can focus on computational thinking without focusing on them.

One way to achieve this is to redefine what “mathematical” education is (which was achieved as part of the Computer Based Math initiative ). Another approach involves inserting computational thinking directly into any other area of the curriculum. I noticed that in practice (especially among primary school teachers), those teachers who are enthusiastic about teaching computational thinking often do not have technical training. It’s like with the current generation of children: you don’t need to be a techie to understand programming and computational thinking.

In the past, to learn low-level computer languages like C ++ and Java, you really had to think like an engineer. Wolfram Language has a completely different story. Of course, for someone who wants to know the language well, you need to learn many things. However, it is necessary to study general computational thinking, and not the engineering details of computer systems.

So how can computational thinking be built into a school curriculum? I constantly hear that teachers barely have time to teach the necessary program in a limited time. How can I add something else to this? However, I begin to understand one surprising thing: the addition of computational thinking to the educational program actually entails the simplification of the educational process and the reduction of the time spent on it, despite the fact that the volume of the studied is growing.

How can it be? The bottom line is that computational thinking is a kind of foundation that facilitates the understanding of many phenomena. When you formulate something computationally, everyone can try and see clearly how it works.

Here is the story of many years ago, when the Wolfram Language - in the form of Mathematica- first used for training in computing. Very often, students have difficulty understanding concepts and functions. And so the professors told me that they began to notice that when the students found out about the possibility of performing calculations using the Mathematica system, none of the students were confused by the function. And the reason is that they learned about these functions through computer thinking - observing them explicitly, and not hearing about them abstractly, as is the case with standard teaching methods.

In particular, in recent decades, in published textbooks on almost any subject, there has been a tendency to explain something formally; as a result of the explanation I had to look in publications. But, one way or another, with the advent of MathWorld and Wikipediaa more direct presentation style has become commonplace, and is taken for granted by today's students. For me, the use of computational thinking in each field of knowledge is a kind of continuation of this trend:

*that which could only be discussed indirectly and theoretically can now be shown directly and explicitly through calculations*.

Imagine that you are talking about different language families. You can simply take some words and use

**WordTranslation**to translate them into hundreds of other languages. You can make a dendrogram to show how the forms of these words are clustered in different languages, and you can discover the languages of the Indo-European family.

You could talk about styles in art (see translation on Habré " Proportions in art. Is there anything better than the golden ratio? Researching over 1,000,000 old and modern paintings ") and use the many images of famous paintings that are built into Wolfram Language Then you could compare the use of colors in different paintings, and perhaps draw a graph showing how the color palette changes over time and with the advent of new styles.

You could talk about the economies of different countries, or you could immediately create your own infographics to see how best to present important material. You could talk about history, or you could use data from historical mapsin Wolfram Language to compare the conquests of Alexander of Macedon and Julius Caesar. Or you could make graphs for each of the US presidents, indicating the composition of the administration for each of them, and compare them through economic or cultural indicators.

Or, for example, you study English grammar. Wolfram Language helps you with this by automatically creating sentence diagrams. You can also let students try using their own rules to generate sentences. What about spelling? Can computational thinking help in this? I'm not sure. You can, of course, take all the common English words and experiment with different rules ... This can be interesting for detecting exceptions (for example, whether “u” always follows “q”: using Wolfram Language is very easy to find out).

You can conduct an interesting exercise: to analyze the various parts of the standard curriculum for various subjects and ask yourself the question: "is it possible to simplify the learning process by applying computational thinking?" I found that if a person really asks about the essence of some part of the curriculum, the answer will be yes.

Over time, the list of such examples will become more and more. In the past with math, the results were pretty disappointing: there were few working examples. Of course, there are concepts like exponential growth that appear in a bunch of places, but over time, everyone understands that the examples in the books on computing have not changed since the 1700s. And in the case of programming, the picture is not much better: the Fibonacci sequence is where you can find a lot. But with knowledge-based programming in Wolfram Language, the picture is completely different, because the language is directly connected to data and calculations that are relevant to the essence of each direction.

How should the teaching of computational thinking be organized? Do you need such lessons? At college level, that would be nice. In fact, computational thinking may very well become the most important subject for many students. Less obvious is how best to do with the high school curriculum; and although I'm certainly not an expert, I still think that computational thinking is best taught through many different modules in different classes.

What investments are needed so that students can engage in computational thinking? With the currently available technologies - extremely small. With Wolfram | Alpha, none. With Explorations in Wolfram Language, they are close to zero. By setting the code in a free input form in Wolfram Language, you need to know quite a bit to get started.

It is worth noting that computational thinking is unique in its breadth of application within the framework of the curriculum. Everyone would like that what is taught in some lessons to be applied in others; but this does not happen often. I have already mentioned the difficulties associated with the study of traditional mathematics. The situation is slightly better with the letter. But in most cases, some kind of intelligent bunkers are formed that do not intersect with each other. Using computational thinking, you can build connections between them. For example, the visualization technique will be the same for both economic indicators and sports results. Etc.

## What can children do?

Every day, many scientists and technologists use the Wolfram Language for complex computing. And now, children can easily use the Wolfram Language. And I'm not talking about some kind of simplified toy version. I'm talking about the same Wolfram Language that professionals use (and, yes, the same as with the English language, in which there are obscure words that children usually don’t use, there are also obscure features in Wolfram Language that children also usually do not use).

But why is this possible? Thanks to the automation that we have created over the past thirty years. My goal is to automate as much as possible so that people who use the Wolfram Language (whether they are professionals or high school students) set the task using computational thinking, and then the language does the rest.

In the past, separate systems have always been created for children and professionals. But thanks to automation, they merged into one. In other areas, this happened earlier: for example, in video editing. Where previously there were simple systems for amateurs and complex ones for professionals, now there are unified systems for everyone: from children to the creators of the most expensive films in the world.

It is probably the most difficult to achieve in the areas of computational thinking and programming, but now it is finally achieved.

In accordance with many standard curriculum subjects in which children go to school, what they can do is just the pale shadows of what professionals do. But when it comes to computational thinking, they have in their hands the same tools as professionals, so that they are on an equal footing.

Children spend a lot of effort to get one answer in mathematics or, for example, in chemistry. If children write an essay, they should write down every word. But a different story arises with computational thinking. After the child understands how to formulate something and write it in the Wolfram Language, the language takes on the construction of a large and complex result.

The student may have some idea of the growth and decline of empires of the past, and may understand how to formulate the idea from the point of view of time series of geographical zones of countries that do not exist today. And, as soon as he draws up this idea in the Wolfram Language, he becomes the owner of complex tables and infographics and anything else through which he can then draw conclusions.

What can children learn by describing something in Wolfram? First of all, to computational thinking. This is a really new way of thinking. But he has a certain resemblance to other things that children do. As classes in mathematics, for example, they form a certain accuracy and clarity of thinking. This, like writing, is a fundamentally creative activity. Well-written Wolfram Language code, like good text, is accurate and elegant, and easy to read and understand. But, unlike regular text, not only people are the target audience for it: the code also targets computers.

When students have problems in mathematics, or chemistry, or in anything else, the only way to determine if they have the correct answer is to "look it up in a book." But a completely different story is happening with Wolfram Language. Because children themselves can say whether they are on the right track.

The whole process of creating the code is a little different from everything that children usually do. First, the code is developed, and then debugged. Debugging is a very interesting intellectual exercise. Since Wolfram Language is a symbolic language, any piece of its code can work on its own.

But debugging is ultimately about understanding and solving problems. What's really cool about Wolfram Language is the instant feedback. You changed something: helped? Or do you need to go deeper into the code again to figure out something else?

Part of the debugging is only getting the piece of code needed to create something. But the other part is understanding whether you created the right thing. For example, why are there so many characters in Shakespeare’s plays who seem to have no contact with anyone? Let's look at how we define the term “contact”. Does this really make sense? Is there a better definition?

Computational thinking is just about that. It is not so much about programming as about what should be programmed;

*about the problem of formulating and translating into computational form*. And today, with Wolfram Language, we have all the conditions for turning what has been formulated into something real existing.

## Led by children

When I show children examples of computational thinking and the Wolfram Language, I try to find out what children are interested in. By art? Or science? A story? Or video games? Than? I try to come up with an example that lies in their area of interest. And then we launch it. And as a result, we get some kind of image or visualization. And then the children look at the result and think it over, based on what they already know. And then they almost always start asking questions. "How does this apply to this?"; “What about doing it instead?”, Etc. And this is really good. Because when children ask questions, you understand that they are seriously engaged; they think about what is happening.

Most subjects taught at school are rather tightly limited. Although you can ask questions, they are more reminiscent of “tech support”: help me understand this existing function. They are not like "let's talk about something new." Several times I held sessions with the children at which they asked me about something. An interesting experience. Someone will surely ask a question that can be easily answered in college-level physics. Answering another may require graduate level knowledge. And then a question will be asked, which, I know, is not easy to answer even with the latest research. Or maybe the one to which I know the answer, but only because only last month I had a chance to talk about it with a world expert who himself recently figured out on this issue. Before that, how I applied this “ask me something” format, I did not know how hard it is when children freely ask questions. But now I understand why most teachers have no choice but to make traditional school subjects much more severely limited.

However, using Wolfram Language as a tool, much can be done. Because with Wolfram Language, the teacher does not need to know the whole answer to the question: he just needs to be able to formulate the question in a computational way, and Wolfram Language will help to calculate the answer. Of course, in order to write code in the Wolfram Language, the teacher needs to master certain skills. But it is really interesting and useful to get answers to questions together.

I often did what might be called "living experiments." I take a topic (either the one suggested by the audience, or the one that just occurred to me), and then I study this topic in real time using the Wolfram Language, and see what I can learn about her. Every year, this is becoming easier, as opportunities and the level of automation in Wolfram Language are growing. And it is with a living experiment that we open our Wolfram summer school. Within about an hour, we create a document that can become a reserve for the article. This is a pretty nervous affair. But almost always it works well. Most people don’t understand: in just an hour you can make a discovery from scratch worthy of publication. Wolfram Language makes this possible. It is clear that all my life I have been gaining experience in the field of computational thinking and making discoveries; however, for those with decent knowledge of computational thinking and the Wolfram Language, making a convincing living experiment will prove to be quite an easy task.

When I was a kid, I never liked textbook exercises. I always thought that it was not too interesting to do what was done by many people before me. And so I always tried to think about various things in which I could see something that no one had seen before. Now that we have Wolfram Language, it has become much easier. Not every child has the same motivational structure as I did. But many people get satisfaction from the fact that they are able to do something of their own, and not just repeat many times done to them. With Wolfram Cloud, you can easily share what you have done and, for example, create your own website or application that you can show to friends or the whole world.

So where are such discoveries that can be made by children? Everywhere! Even in such a well-developed field as mathematics, there is an infinite field for experiments where discoveries can be made. There is a slight additional hurdle in science: the need to work with evidence. Of course, a lot of data is built right into the Wolfram Language. And getting more data is easier than ever. Maybe someone uses a camera or microphone, or sensors connected via a Raspberry Pi or Arduino , or whatever.

What about humanitarian areas? This again requires data. But, again, Wolfram Language has many images of famous works of art, texts of books, historical information about countries, and so on. And in today's world, it’s easy to find detailed data on the Internet and import it into Wolfram Language. It is amazing how easy it has become in our time, for example, to search on the Internet even little-known documents of many centuries ago (this helped me a lot in my hobby - studying history ).

Computational thinking is an area that really lends itself to project learning. Every year to the beginning of our summer programshundreds of ideas for projects suitable for children are already swarming in my head. With a little help, children themselves can come up with even more. At our summer programs, mostly children work on projects on their own, but they are often grouped together to work on a specific project. As a rule, we have a specific goal for each of the projects: to make a demonstration, or application, description, and, possibly, to place it in the Wolfram community (the review and publication process also serves educational purposes).

And, of course, even when a specific project has already been done before, the next time the result will be different. A simple example: writing code is a creative process, and different people will write it in different ways. And, if the project involves working with visualization or user interfaces, different people can be creative and have different approaches to it.

Creativity is, of course, good. But in practice, much in education resembles a production line when many students do the same thing. Mathematics has a good feature: when people perform exercises, they get certain answers that are easy to verify (well, at least up to the questions of equivalence of algebraic expressions, for the correct understanding of which our entire stack of mathematical technologies is necessary). When writing an essay, we, in principle, have no choice but to give them to real people for testing (yes, you can do something by processing natural language and machine learning, but the essence of the essay is still interacting with people).

When someone writes a piece of code, this, like writing an essay, is a creative act. But now you are doing what needs to be transferred to the computer. Then it makes sense to let the computer read it and evaluate it. This is still a non-trivial task. This requires high technology; however, using the symbolic character of the Wolfram Language, as well as some automated proofs and machine learning, you can really put this into practice. For example, this allowed us to post on the Internet automatically generated exercise variations from my book

*Elementary Introduction*.

Looking at the final code written by students, you can at some level evaluate what is happening. Despite the fact that there are an infinite number of possible programs, you can evaluate which ones are the right ones, and even determine which ones satisfy certain performance criteria. But you can go much further. Because unlike mathematics, where students ponder a decision using a draft, in coding every step in the process of writing a program is usually done on a computer, and every keystroke is fixed. I myself have long been an enthusiast of personal analytics, and from time to time I write small analyzes of those processes that are involved in writing and debugging programs. However, there are excellent opportunities for this in the field of education: first of all, it is about creating educational analytics (for which the Wolfram Language and Wolfram Cloud are ideal), and then to create ways for each student to individually adapt to the real behavior and educational process.

As a result, we want to get an accurate mathematical model of each student. And with modern machine learning technologiesthat are in the Wolfram Language, I think we have everything we need for this. And then we would start modeling various situations: for example, what would happen if a student said one or the other (this is necessary to determine how to explain the material or what kind of exercise to give).

With the help of mathematics, this type of personalization is quite easy to implement using simple heuristics. When it comes to coding and computational thinking, the problem becomes more complex. However, computational thinking and complex intrasystem computing will help to do something really good.

The question of how to find out how well someone understood something specific is always relevant. Using a good computational model for each student would provide a complex answer to this question. But in some places you still have to think over various kinds of exercises or tests.

One of the main types of exercises (which is

*elementary*in my book ) is “write a piece of code to get X”. However, there are others. One of them is to “simplify a given piece of code,” or: “find situations in which this function does not work.” Of course, there are exercises like “what does this piece of code do?” But in a way, they seem silly: in the end, you can just run the code.

I think it might be useful for people to do something “like a computer”. This helps to understand what computing is and how this calculation process works. However, the emphasis should be on teaching people what they themselves will do. Technology and automation will only spread. There is no point in teaching people to do computer work; you need to teach them how to use a computer as a tool.

I heard arguments about teaching children how to do arithmetic without calculators, in the style of "what if you were on a desert island without a calculator?" Now I hear the same reasoning regarding teaching children how to program. But, uh, if you ended up on a desert island without a computer, why would you write code?

What exactly needs to be taught? Computational thinking is really about thinking. It is about structuring an idea and formulating it in such a way that it can then be transferred to a computer, which can then do interesting things.

Of course, there are facts and ideas that are worth knowing. Some of them relate to the abstract computing process. Some are about how to systematize the world around us. How is color determined? How are points on the earth determined? How can glyphs be represented in various human languages? Etc. A few years ago, we made a poster on the history of the systematic presentation of data . Its content would constitute a full course.

The main goal is to get to the point where you can translate what interests you into a computational form.

Often we are talking about the "invention of the algorithm." How to compare the growth of the Roman Empire with the spread of the Mongols? How to calculate it correctly? How to display? Can one say there are really big craters near the poles of the moon? How can a crater be identified in a picture?

This is an analogue of such things that underlie development in almost all areas (“computational X”). And there are people who learn to be successful in these kinds of things. Within our company, many of the problems of the “invent an algorithm” level are solved every day - and this makes up most of the work on Wolfram Language and Wolfram | Alpha.

The invention of an algorithm or heuristic is, first of all, about understanding what we want. With some effort, you can invent as much as possible abstract exercises, but what is much more useful are issues related to the outside world.

The answer to any question will depend on our view of the structure of the world. From the point of view of education, it is good that questions of computational thinking intersect with other areas of knowledge. Thanks to this, general thinking develops, which is incredibly valuable in almost any field of activity.

## What is computing and programming?

A lot has been said about learning how to write code in recent years. Of course, writing code is not the same as computational thinking. This is a bit like typing versus essay writing. To write an essay you will need (somehow manually or using a computer) to somehow fix the text - but this is not the intellectual core of your activity. So how do you teach code writing?

In Wolfram Language, a person must be able to formulate ideas and transform them into code. In some simple examples (which will gradually become more and more), you can simply indicate what you want in English. But usually they still write directly to Wolfram Language. And this means that at some level we are dealing with programming.

However, this is a higher level of programming than the one most programmers are used to. And that is precisely why it is now available to a much wider circle of people, and therefore it makes sense to introduce it into the education system.

But how does all this relate to learning "traditional" programming? There are currently two types of programming instruction: what could be called the “high school level” and the “primary school level”. Today, the “high school version” is C ++ and Java. I was somewhat shocked by the fact that even among children studying in schools with a technical bias, it is very rare to find those who have at least some serious knowledge of programming at school.

But even when children learn “programming,” say, in high school, what do they actually learn? This is usually a lot of syntactic details, as well as loops and variables. As a person who had been thinking about computing for most of his life, I was disappointed. Of course, these concepts are part of low-level programming languages. But in what we now broadly understand by computing, as well as in computational thinking, they are secondary at best.

What is important? Probably the most important principle is that everything (text, images, networks, user interfaces, etc.) can be represented in computational form. The concepts of functions and lists also play an important role (as is the concept of universal computing).

The problem is that what is currently being taught has a weak relation not only to computational thinking, but even to programming. Conditions, loops, and variables were central to the first computer languages in the 1960s. In modern computer languages like C ++ and Java, there are much more convenient ways to manage large amounts of code. But their basic computational structure is surprisingly similar to that in the languages of the 1960s. And in fact, children (who usually write small pieces of code) deal with the calculations of the 1960s. (although with the participation of mechanisms designed for large code bases, which makes it more complicated).

Wolfram Language is truly a modern language. Its use would not have been justified in the 1960s: computers were not large enough and fast, and there was nothing like modern cloud systems designed to maintain a large knowledge base (although in fact, even in the early 1960s there were such languages like LISP and APL, which were based on higher-level ideas reminiscent of Wolfram Language, but their use became possible only after several decades).

What about loops and variables? Well, they all exist in Wolfram Language. They are simply not the main principles of language. For example, in my book An

*Elementary Introduction to Wolfram Language*I talked about assigning values to variables only from chapter 38, after discussing the deployment of complex applications on the Internet.

For example, you want to make a table of the first 10 squares of numbers. Using Wolfram Language would be very simple:

But in C, for example, it would look rude:

A person who is far from programming may ask: "What the hell is all this necessary for?" But instead of saying directly what we want, he tells the computer exactly what he should do in a low-level language. We tell him to allocate memory to store the integer value of n. We say that you need to start with n = 1, and then increase n until it reaches the value 10. And then in each case we tell the computer that it should draw a square (in fairness, I note that in more modern in languages like Python or JavaScript, some of these features are a thing of the past, but in this example we are still dealing with loops and variables).

Next: the important point is that loops and variables are just details of a particular implementation of a low-level language. Some find it easier for children to understand what happens when there are explicit loops and variables. According to my observations, this is not true. Maybe something has changed over the years, as people have come closer to computing ideas in their daily lives. So now talking with children about the details of cycles and variables means only complicating their understanding of the concept of computing.

Do I need to get acquainted with loops and variables? Definitely. They are part of the whole history of computing and computational thinking. Just getting to know them is not a priority. And by the way, if you are going to tell someone about performing calculations with images, networks, or anything else, you should know that few people are interested in concepts such as loops.

One of the important features of Wolfram Language is that it combines a large number of different computational paradigms: functional programming, procedural, symbolic. And machine learning, and so on. So when people get to know Wolfram Language, they immediately come across a wide range of computational ideas that are conveniently and consistently packaged together.

And what happens when a person who has learned to program in Wolfram Language wants to do low-level programming in C ++ or Java? I saw this: it was charming. These people do not face any difficulties and easily grasp exactly how to code in low-level languages; at the same time, they constantly exclaim that they are doing strange things, and say that it does not work: “Oh God, I need to allocate memory on my own!”; or: “wow! There is a limit on the size of an integer. ” Etc.

Switching from Wolfram Language to low-level languages is easy. The return trip can be more difficult. It often happens that it is easier to teach computational thinking to children who do not know anything about programming: they quickly grasp the main ideas, and they do not need to be weaned from the fact that everything should turn into cycles and variables.

When I began to ponder the idea of teaching computational thinking and the Wolfram Language to children, I assumed that the course would be designed for high school students. However, I found out that children of 11 and 12 years old were involved in this book. So Wolfram Programming Lab and so on is suitable for children from 11-12 years old.

What about young children? In the modern world, they all use computers or smartphones and are faced with all sorts of computing activities. Maybe they are editing a video. Maybe collect something in the game. And all these activities are precursors of computational thinking.

Back in the 1960s, a bold experiment with Logo was started. I was told that the original idea was to build 50 "microcosms" where children could experiment using a computer. In the beginning, a turtle moved around the screen, which for half a century turned into an orange cat. Unfortunately, the remaining 49 microcosms were never built. And, despite the fact that the turtle (or cat) turned out to be pretty cute (and impressive for the 1960s), from the point of view of modern understanding and computational experience, this idea looks very narrow.

However, many children in this elementary school study this cat only 1 hour a year. Previously, this made obvious sense: to show the children that they can control the computer as they see fit. However, the proliferation of other ways children use computing makes this much less significant. So learning about cycles and variables in elementary school really seems a little strange these days.

I suspect that there are much more effective ways to teach the ideas of computational thinking at an early age using all the technologies and all the automation that we possess. One of the features of this kind of systems (we are talking about Scratch - the red cat) is that their programs are assembled from blocks, rather than typed. As a rule, programs are linear in structure. But blocks are needed for two reasons. First, they avoid the need for any explicit syntax (instead, just “does the block fit or not?”). And secondly, the presence of a stack of possible blocks on the side of the screen, says that this can work.

And, even more important: all this tuning is done by a small number of blocks, in fact - the microworld. Wolfram Language has over 5,000 built-in functions, and turning them into blocks will not only be huge, but also worthless. The point is to choose from all these possible functions several (50?) Microcosms, each of which would include only a small set of functions, selected so that various interesting things could be done with them.

With the help of our modern technologies, these microworlds can easily include image computation, or understanding of a natural language, or machine learning, and, most importantly, they can be immediately connected with the real world. And I suspect that by incorporating some of the inventions from the 1960s. we will be able to more fully reveal to children the basic ideas and principles of computational thinking.

## How will this all happen?

The process of raising children in line with computational thinking is just beginning. I am very pleased that with the help of Wolfram Language and its related systems, we will finally get the tools with which the main technological problems will be solved. But many other questions remain: structural and organizational.

I try to do my best: I mean my

*book*, as well as the recently created Wolfram Programming Lab and Wolfram Open Cloud . But these are just the first steps. A lot of books and courses are needed for different groups of people. It is necessary to determine the activities of online and offline communities. Students need to be informed of new opportunities. And still need to train teachers.

We are currently developing several projects: a finished course based on the

*Elementary Introduction*; Wolfram Challenges website with coding and computational thinking tasks; a more structured mentoring program for individual students working on projects; franchise of the summer camp Wolfram , and so on. Some of the above are part of Wolfram Research ; Some projects are part of the Wolfram Foundation . We are considering a non-profit initiative to support education in the field of computational thinking. We even thought about creating a school centered around computational thinking, not least to show how this could be realized.

But what makes me most happy is the fact that other people and other organizations are also starting to move forward in this direction. There are intra-school and extra-curricular programs, summer programs. In different countries.

Our own resources are rather small. To train humanity in computational thinking, the involvement of many people and organizations is necessary. Thanks to three decades of work, we have the necessary technology. But now we must ensure their availability for children.

Computational thinking can be successfully taught to a wide range of people, regardless of their material resources. And due to the fact that this is a new phenomenon, countries or regions with a more complex educational system or more advanced technological capabilities cannot have significant advantages over others.

Sooner or later, the majority of the world's population will be able to interact with computers (see translation on Habr “ How to speak with artificial intelligence? ”) Using the code in the same way as it can now read and write. But now we are at the very beginning of this path. I am glad that I am contributing to the development of technology. And I look forward to progress in this area in the coming years.

**Try the calculation examples from this blog in Wolfram Open Cloud**