Computational thinking, and with it coding and programming, are problem-solving skills. Therefore, when children learn to code or program in schools, they do not only develop digital skills, but often learn to solve problems too. In fact, they learn how to articulate and clarify their thoughts and plans, generate a clear sequence of commands (the code) and test their hypotheses. These are processes that can stimulate the development of other cognitive and metacognitive skills. Based on the results of three studies Barbara Arfé will explain why learning to code from the beginning of elementary school can be a powerful boost for the development of children's cognitive functions.