From the experience of creating a programming circle for children

The appearance of the mug


The background of this circle began two years ago. By that time, I had been working as a tutor of computer science and programming for several years, mostly computer science students programmed in Pascal, it is more common in schools.
And in the fall of 2011, I had an unusual student: a child in the 4th grade really wanted to do programming, and after learning that I was teaching Delphi, his mother and I agreed that we would try to teach on it. The child turned out to be very gifted, and we had very good and fruitful activities. And many ideas appeared only due to his constant interest in programming.

By that time, I was working in a robotics club at the Youth Palace of the Sverdlovsk Region. And I had the idea to organize such a programming circle with us. To create this circle, first of all, it was necessary to determine several things:
  • what age are we counting on. The fact is that I studied psychology a lot (I graduated from the psychology faculty of Ural State Pedagogical University), and I know that logical thinking begins to develop (and develops most well) from the youngest adolescence. And programming lessons will be most valuable for adolescents in terms of development. First of all, this is the development of the ability to keep large amounts of information in one’s head, and the logical connections between them. So, the age was determined at least 11 years and older (recommended age 13-15 years);
  • Learning objectives for programming (especially considering the age of children). The first goal, as described above, is developing. The second goal is to interest and familiarize children with this activity. That is why (forgive me, supporters of traditional teaching, requiring first to learn in a regular language, and then in an object-oriented one), there was a clear understanding that it was programs with a graphical interface that would be interesting to children. So we move on to the third aspect:
  • in which environment we are programming. Lazarus was chosen as such an environment. First, the Pascal syntax is much simpler for children, so I decided to abandon the same C #. Delphi had to be abandoned, because a regional-level institution cannot afford to deliver pirated software, and most likely there would be no money to buy software for a new circle. Therefore, the free Lazarus was chosen



The next question is how we will build classes. Undoubtedly, in the first lessons, it is necessary to give the main material: to teach children to navigate in the “object - properties - events” model, to explain participation in this operating system, and to understand what variables are and how they are related to computer memory. At first, I thought whether it was worth explaining in the first lessons (as they usually do when teaching object languages) the structure of the library of components, the mechanisms of encapsulation, polymorphism, etc. - but in the end I decided that at the initial stage this is an extra overload, and most likely the children simply will not understand. Therefore, we are not even talking about this, we are not using the concept of “component” so that children do not get confused, instead the term “object” is used. That is, the course is of course simplified, but it’s more understandable and interesting for children. I think it will not do much damage. After all, the school teaches in mathematics that it is impossible to extract the root of minus one. And then the children come to the institute, and calmly study complex numbers, and it seems that this does not cause big problems with misunderstanding. So here I think it’s worth simplifying some things, making everything as simple and straightforward as possible. Well, the next important aspect: each topic should be supported by programming. If in the first lesson only theory is read (as is often done in OOP institute courses), then in the second lesson there will be half as many children. And finally, the programs that we do should be interesting to children. Therefore, the main course is mini-games, joke programs, virtual encyclopedias, etc. So here I think it’s worth simplifying some things, making everything as simple and straightforward as possible. Well, the next important aspect: each topic should be supported by programming. If in the first lesson only theory is read (as is often done in OOP institute courses), then in the second lesson there will be half as many children. And finally, the programs that we do should be interesting to children. Therefore, the main course is mini-games, joke programs, virtual encyclopedias, etc. So here I think it’s worth simplifying some things, making everything as simple and straightforward as possible. Well, the next important aspect: each topic should be supported by programming. If in the first lesson only theory is read (as is often done in OOP institute courses), then in the second lesson there will be half as many children. And finally, the programs that we do should be interesting to children. Therefore, the main course is mini-games, joke programs, virtual encyclopedias, etc. which we do should be interesting to children. Therefore, the main course is mini-games, joke programs, virtual encyclopedias, etc. which we do should be interesting to children. Therefore, the main course is mini-games, joke programs, virtual encyclopedias, etc.
After we have learned the basics, we move on to training in laboratory work.

Occupation


Of course you can’t write all the topics completely, but what we teach in the first lessons, I think it’s worth writing to understand how we study (one lesson takes 45 minutes):

Lesson 1. Hello world!

General theory: Why do we need an OS, its structure. How the graphical OS works. What is WinAPI? The principle of operation of cross-platform applications. Objects, properties, events. Lazarus interface: what is where, where to get new objects, where to look at properties, how to work with the form of visual design.
New objects: Form, Label.
New properties: Caption, Font, Color
Task: Create a program with the inscription "Hello world!". Change the fonts of the inscription, the background of the window. Learning to save the draft program.

Lesson 2. Events.

General Theory: Repetition about the OS. Objects, properties, events. Again, remember where is which window in the Lazarus interface and what it means. From design to programming. Automatic creation of event handling procedures. What is a procedure, its structure.
New objects: Button.
New Properties: BorderStyle, AlphaBlend, AlphaBlendValue
New Events: OnClick
Task: Add to the program “Hello World!” two buttons: “Close” and “Repaint”. We write event processing for them. (The “Recolor” button changes the background color and font color). Experimenting with BorderStyle and transparency.

Lesson 3. Escaping button.

General Theory: Drawing an Object. Object coordinates: absolute and relative. Random number generator.
New properties: Height, Width, Top, Left
New events: OnMouseMove
Task: The program consists of a window, in the center of which there is a button with the inscription "Press me." When you hover, the button runs away to a random place. Additionally, the task: to make the program work correctly when the user resizes the window (that is, change the random argument, for example, instead of the specific number indicating the height of the form, set the Form1.Height property).

Lesson 4. Calculator.

General Theory: How RAM Works. What is a memory cell. Variables: how to correctly ask the OS for a cell in memory: come up with a name, determine the type, determine the size. Types of numeric variables: Byte, Integer, double. How to declare variables correctly (write the var section in the procedure). The difference between the number and the text. IntToStr and StrToInt Functions.
New objects: Edit.
New Properties: Edit.Text
Task: Calculator program. Two Edit to enter numbers. Four buttons: +, -, *, /. And Label to output the result.

Lesson 4. Branching.

General Theory: A Situation of Choice. The If statement, and its construction. Proper use of operation brackets. The correct structure of the program, or why indentation is needed. Full and incomplete branching. Nested branching. Comments on the code, how to do what are needed.
Task: Refine the calculator. Make the “Compare” button, when you press the button, the response displays which number is greater. An additional task: to make the program work correctly: when two numbers are equal, I deduce that they are equal.

Lesson 5. Guessing.

General Theory: Repeat If. Learning how to work with a multi-line Memo text box.
New objects: Memo.
New Properties: Memo.Lines
Task: Add to the program “Hello World!” two buttons: “Close” and “Repaint”. We write event processing for them. (The “Recolor” button changes the background color and font color). Experimenting with BorderStyle and transparency.
The program consists of a window for entering a number, an OK button, a "Guess" button and a multi-line field. The computer makes a number from 1 to 100. The user guesses this value by entering numbers in the input field. After entering the number, the computer displays a prompt in Memo: for example, the number 10 is prompted, the user entered 20, the computer displays: "My number is less!". An additional task: to finalize the program so that the user selects a range of hidden numbers.

Of course, the whole theory is explained in a language that the child understands as much as possible. If we consider the object model, then we open different programs, look for the same objects in them, children look for what is different in these objects (to understand what properties are). If we study memory, then we present it in the form of a cabinet with cells (at this time on the board there is a presentation in which the cabinet is drawn), etc. The main thing is that everything should be as clear as possible.

We keep notebooks, but write to a minimum: from these classes we recorded the structure of accessing the property of an object from the program, the structure of randomness, and the If structure. Also in our notebook there are three separate dictionaries: for objects, for properties, and for events. There we also write briefly, for example, Color - color.

What is now, and our plans.


I have one group in my circle, this year 9 people. These are mainly grades 5-7. There is one third-grader (came from robotics), a ninth-grader, and 1 person from grade 11.
By programming ability - in principle, as in ordinary college groups: several people have good abilities, the rest are average. By age, the 11th grader is the best programmer (well, that’s understandable), and at the same level there are three boys from the 7th grade.
I thought that it would be the hardest thing for a boy from the third grade (he came because he couldn’t go to robotics in time, but he didn’t want to quit classes), but it turned out that he was quite in time.

The plans are to try to expand the horizon. In addition to this group, I have had several students in the robotics group, and one of the examples that I want to try to do in projects by the end of the year is an external device with interaction via the COM port. That is, on the computer we write a program that interacts with the COM port, and on Arduino we collect the device itself, which is controlled / exchanges data with the computer. This, of course, is only in the plans so far, and I still do not know how it will go - but this is one of those things that I want to strive for.

Also in the plans to write on the basis of presentations for classes and laboratory work a book - a programming tutorial for children.

Wishes, or why this article is written.



Firstly, I have a big request: if you know programs that may interest children (especially mini-games), and at the same time these programs are easy to write, I will be glad if you write to me about them. At one time, I shoveled a bunch of textbooks and programming forums to look for suitable curricula, and I still think they are not as many as I would like in my collection.

And secondly, if anyone wants to organize such a group (for example, at the nearest school), I will be glad to share my experience.

Also popular now: