Freitas, Tiago CarvalhoNeto, Alvaro CostaPereira, Maria JoãoHenriques, Pedro Rangel2026-03-182026-03-182025Freitas, Tiago Carvalho; Neto, Alvaro Costa; Pereira, Maria João; Henriques, Pedro Rangel (2025). Goliath and the cognitive load theory. Journal of Computer Languages. ISSN 2665-9182. 85, p. 1-15. DOI: 10.1016/2025.1013722665-9182http://hdl.handle.net/10198/36134A successful teaching effort is usually dependant on several factors. From the right environment, to a precisely worded exercise statement, it rests on the teacher’s shoulders the concoction of the most effective learning assets to their students. A significant part of this process lies on practise: students commonly solidify their knowledge by solving exercises. Creating new programming exercises, specially in high-demand environments such as large classrooms, is a repetitive and error-prone process, specially when stacked with other typical affairs that educators are required to attend to. Goliath, one of the two main contributions of this article, is a template-based, Artificial Intelligence (AI) supported exercise generator, that aims to facilitate the creation of exercise repositories. By using a Domain-Specific Language (DSL) to define exercise templates, combined with the automatic generation of different exercise types, educators can use Goliath’s features to improve their exercise repositories, both in size and variety. This systematic approach allows for greater control and automatisation than using a Large Language Model (LLM) directly, as the exercises’ main components can be pre-defined and pre-configured via their templates. Goliath, which is available online for free access, has been tested and its usability assessed. Combined with these functionalities, the content of the exercises themselves, the manner in which they are presented, and how they are rated for difficulty should also be considered in high regard when designing programming exercises. The Cognitive Load Theory (CLT) provides a conceptual foundation to understand problem-solving mechanisms that are commonly found in several aspects and situations of daily life, such as solving programming exercises. This foundation has been explored and systematically structured to construct the second main contribution of this article: guides to create exercise templates in Goliath founded on the Cognitive Load Theory, aiming to improve both teaching and learning computer programming.engComputer programming educationArtificial intelligenceDomain-specific languagesProgramming exercisesCognitive load theoryGoliath and the cognitive load theoryjournal article10.1016/2025.101372