📜 ⬆️ ⬇️

From the experience of creating a programming circle for children

The appearance of the mug


The background of this group began two years ago. By that time I had been working as a tutor for computer science and programming for several years, mostly computer science students were programming in Pascal, it is more common in schools.
And in the fall of 2011, I had an unusual student: a child in 4th grade really wanted to do programming, and after learning that I was teaching Delphi, we and his mom 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 emerged only because of his constant interest in programming.

By that time I was working in the robotics circle 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:



The next question is how we will build classes. Undoubtedly, at the first lessons it is necessary to give the main material: to teach children to orient themselves in the object-properties-events model, explain the participation of the operating system in this, and understanding what variables are and how they relate to computer memory. At first I thought whether it was worth explaining at the first classes (as they usually do when teaching object languages) the structure of the library of components, 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 don’t even talk about it, we don’t use the concept of “component” so that children don’t get confused, instead of it the term “object”. That is, the course is of course simplified, but it’s clearer and more interesting for children. I think it will not cause much damage. After all, in school they teach in mathematics that it is impossible to extract the root from the minus one. And then the children come to the institute, and quietly study complex numbers, and it seems that this does not cause major problems with incomprehension. So here I think it is worth simplifying some things, making everything as simple and understandable as possible. Well, the next important aspect: each topic must be supported by programming. If at the first lesson you read only theory (as is often done in the OOP institute courses), then at the second lesson children will come already 2 times less. And finally, the programs that we do should be interesting for children. Therefore, in the course mainly mini-games, jokes, virtual encyclopedias, etc.
After we have studied the basics, we proceed to the training in laboratory work.
')

Holding class


Of course, you can’t write all the topics completely, but what we learn in the first classes I think you should write to understand how we learn (one lesson takes 45 minutes):

Session 1. Hello world!

General theory: What is the OS for, its structure. How does the graphic OS. What is WinAPI. The principle 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 words "Hello world!". Change the fonts of the inscription, the background window. We learn how to save the draft program.

Lesson 2. Events.

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

Lesson 3: Runaway Button.

General theory: Object drawing. The coordinates of the object: 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 is a button with the inscription “Press me”. When you hover the cursor, the button runs away to a random place. Additionally, the task is to make the program work correctly when the user changes the window size (that is, change the random argument, for example, instead of setting a specific number indicating the height of the form, set the property Form1.Height).

Lesson 4. Calculator.

General theory: How RAM works. What is a memory cell. Variables: how to properly 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 (we write the var section in the procedure). The difference between number and text. IntToStr and StrToInt functions.
New objects: Edit.
New Properties: Edit.Text
Task: Calculator. Two Edit to enter numbers. Four buttons: +, -, *, /. And Label to display the result.

Lesson 4. Branching.

General theory: The situation of choice. If operator, and its constructions. Proper use of operational brackets. The correct structure of the program, or what are the indentation. Complete and incomplete branching. Nested branching. Comments on the code, how to do what you need.
Task: To finalize the calculator. Make the button "Compare", when you press the button in response, it displays which number is greater. An additional task: to make the program work correctly: if two numbers were equal, it deduced that they were equal.

Lesson 5. Guessing.

General theory: If repetition. Learning how to work with the Memo multiline text field.
New objects: Memo.
New Properties: Memo.Lines
Task: Add two buttons to the “Hello world!” Program: “Close” and “Repaint”. We write event handling for them. (The "Repaint" button changes the background color and font color). We experiment with BorderStyle and transparency.
The program consists of a window for inputting 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 gives a hint in Memo: for example, the number 10 is made, the user entered 20, the computer shows: "My number is less!". Additional task: to modify the program so that the user selects a range of suggested numbers.

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

We keep notebooks, but we write as little as possible: from these studies, we recorded the structure of addressing the property of an object from the program, the structure of the random house, and the structure of If. We also have three dictionaries in the notebook: for objects, for properties, and for events. There we also write briefly, for example Color - color.

What is now, and our plans.


In the circle I have one group, this year 9 people. Basically it is 5-7 classes. There is one third-grader (came from robotics), a ninth grader, and 1 person from 11th grade.
According to the ability to program - in principle, as in normal college groups: a few people have good abilities, the rest are average. By age, the 11th grader is best programmed (well, it is understandable), and at the same level there are three boys from the 7th grade.
I thought it would be harder for the boy from the third grade (he came because he couldn’t go to robotics by the time, but he didn’t want to give up classes), but it turned out that he was doing quite well.

The plans - to try to expand the horizon. I have several students engaged in / engaged in besides this circle in the circle of robotics, 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 through a COM port. That is, on the computer we write a program that interacts with the COM port, and on the Arduino we collect the device itself, which is controlled / communicates with the computer. Of course, this is only in the plans so far, and I still don’t know how it will go - but this is one of those things I want to strive for.

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

Wishes, or for what this article is written.



First of all, 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. I once shoveled a bunch of textbooks and programming forums to look for suitable training programs, and it seems to me that there are still not as many of them as I would like in my collection.

And secondly, if someone wants to organize such a circle (for example, in the nearest school), I will be happy to share my experience.

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


All Articles