Programmation et fonctions exécutives

La programmation de type Scratch, avec ses blocs d’instructions à assembler comme des pièces de puzzle, est l’un des moyens les plus ludiques de solliciter les fonctions exécutives. Elles nous permettent de garder une consigne en tête, de résister à des distracteurs, de planifier une suite d’actions, de changer de stratégie quand la première ne fonctionne pas. Chez l’enfant, elles sont encore en construction, et elles le seront pendant de longues années puisque le cortex préfrontal où elles résident devient mature à 25 ans.

Grâce à la programmation, l’enfant découvre qu’une action en entraîne une autre et que l’ordre compte. Il doit retenir son plan pendant qu’il le construit (mémoire de travail). Il apprend à attendre avant de cliquer (inhibition). Et quand le résultat est faux, il cherche l’erreur et recommence (flexibilité).

En revanche, pour que l’expérience reste agréable et motivante, mieux vaut avancer par étapes. Au début, l’enfant peut simplement reproduire un modèle de programme pour atteindre un objectif. Il n’invente rien, mais il comprend que des instructions se suivent et que chacune a sa place, comme une recette en cuisine.

Ensuite, l’enfant connaît le résultat attendu, par exemple « le personnage doit atteindre la maison », mais c’est à lui de trouver les instructions et leur ordre. Il doit alors imaginer la route avant de la prendre, anticiper, ranger ses idées dans le bon ordre. C’est le moment où la planification se met vraiment en marche.

Enfin, l’enfant conçoit son propre jeu en respectant quelques contraintes, comme un personnage, un obstacle et un but à atteindre. Il élabore une stratégie, gère les imprévus, repère ce qui ne va pas et ajuste son programme. Tous les enfants n’iront pas jusque-là, et ce n’est pas un objectif à atteindre à tout prix.

L’écran est attractif, et c’est justement ce qui le rend utile pour capter l’attention. Mais cet attrait impose aussi de l’employer avec parcimonie. Des séances courtes, d’une vingtaine de minutes, accompagnées par un adulte qui pose des questions plutôt qu’il ne donne les réponses, suffisent largement.

Au fond, ce qui compte n’est pas que l’enfant devienne un petit informaticien, mais qu’il vive le plaisir de réfléchir, d’essayer, de se tromper et de réussir. Programmer, c’est apprendre à penser avant d’agir, et à persévérer quand ça ne marche pas du premier coup.

Margaux Gaudin

Programming with platforms such as Scratch, which use instruction blocks that can be assembled like puzzle pieces, is one of the most playful ways to stimulate executive functions. These skills enable us to keep instructions in mind, resist distractions, plan a sequence of actions, and change strategies when the first one doesn’t work. In children, these skills are still developing, and they will continue to do so for many years, as the prefrontal cortex, where these functions are primarily based, does not reach full maturity until around the age of 25.

Through programming, children discover that one action leads to another and that the order matters. They must remember their plan while building it (working memory). They learn to wait before clicking (inhibitory control). And when the result is incorrect, they look for the mistake and try again (cognitive flexibility).

However, to keep the experience enjoyable and motivating, it is best to progress step by step. At first, children can simply reproduce an existing program to achieve a specific goal. They are not creating anything themselves yet, but they begin to understand that instructions follow one another and that each one has its place, much like the steps in a recipe.

Next, children are given an expected outcome, for example, “the character must reach the house”, but they have to work out which instructions to use and in what order. They must visualise the route before taking it, anticipate what comes next, and organise their ideas in the right sequence. This is when planning skills really begin to come into play.

Finally, children can design their own game while following a few simple rules, such as including a character, an obstacle and a goal to reach. They develop a strategy, manage unexpected events, identify what isn’t working and adjust their program accordingly. Not every child will reach this stage, and it should never be treated as an essential goal.

Screens are attractive, which is precisely what makes them useful for capturing children’s attention. However, this also means they should be used in moderation. Short sessions of around 20 minutes, with an adult who asks questions rather than providing the answers, are more than enough.

Ultimately, what matters is not that children become little computer programmers, but that they experience the pleasure of thinking, trying, making mistakes and succeeding. Programming is about learning to think before acting and persevering when things don’t work out the first time.

Margaux Gaudin