Start Submission Become a Reviewer

Reading: “I am Magic!”: Pupils’ Engagement when Designing in Learning Programming


A- A+
Alt. Display


“I am Magic!”: Pupils’ Engagement when Designing in Learning Programming


Maria Sparf

Linköping University, SE
X close


Within a theoretical framework grounded in design for learning, this article presents a research project about pupils’ engagement during programming education. In a design-theoretical perspective, everyone who is somehow engaged in a learning process is a designer. The results show that how pupils design their learning when programming is related to different types of engagement. By analysing pupils’ engagement when programming, the study contribute to an insight how behavioural, emotional, and cognitive engagement can be identified and understood. The study was carried out during programming lessons adapted for novice learners (age group 7–15), visiting Swedish science centres (SCs) as a part of their school day. SCs had experience of programming education and was used as complement to education at school ahead of the implementation of programming as a mandatory subject in Swedish compulsory schools.
How to Cite: Sparf, M. (2021). “I am Magic!”: Pupils’ Engagement when Designing in Learning Programming. Designs for Learning, 13(1), 35–43. DOI:
  Published on 13 Sep 2021
 Accepted on 24 Jun 2021            Submitted on 30 Sep 2020


Children and youth of today are growing up in a society where the boundaries between the physical and digital worlds are becoming increasingly blurred (Mannila, 2017). Digital technology is visible everywhere in the society and in schools there is a need to meet the digitalisation in a constructive way. In order to increase pupils’ digital competence, programming has been emphasized as a pedagogical tool. This has led to a support of programming education from an early age in compulsory school (e.g. Asad et al., 2016; Casey et al., 2018). In the recently revised Swedish compulsory school curriculum, digital tools are mentioned across the syllabus, whereas programming are pointed out as content in the school subjects mathematics and technology at all grade levels (Regeringskansliet, 2017). At the time of this study, Swedish science centres (SCs) already had experience of programming education by conducting programming courses. This was used as a complement to education at compulsory school in connection with the implementation of the revised curriculum. Lessons at SCs therefore form the basis for the data collection for this study.

In a design-theoretical perspective, everyone who is somehow engaged in a learning process is a designer (Kress & Selander, 2012). Learning takes place in different ways in different environments (Kress & Selander, 2012; Selander & Kress, 2017) and design can be expressed both in terms of planning something new and as a process. There is thus a relationship between the work of teacher and pupils as designers (Levinsen & Sørensen, 2019). The planning for external conditions, design for learning, affects how individuals design their own learning, design in learning (Selander & Kress, 2017). This means that learning design as a process is also affected by the type of engagement the pupil has in the specific learning situation. The process includes different ways of participating, trying, and modelling. Pupils design their own learning depending on how they perceive specific situations and what choices they make. From a pedagogical point of view, it therefore becomes useful to examine what it is in a learning situation that engages, instead of afterwards solely examine how much someone has learned (Chang et al., 2017). By analysing pupils’ engagement during programming lessons, we thus get an understanding what the process looks like when pupils design in their learning.

Engagement is a way to make learning meaningful to the individual (Selander & Rostvall, 2010). In the present study, it is considered that engagement is a meta-construction consisting of behavioural, emotional, and cognitive engagement (Fredricks & McColskey, 2012). In this way, knowledge can be obtained about how the pupils are, and remain, engaged in the tasks they are faced with. An important aspect is that pupils can participate and engage actively in the specific learning context (Cochran et al., 2017). Some studies indicate that there is a correlation between pupils’ perceived engagement and their performance (e.g. Halverson & Graham, 2019; Hymers & Newton, 2019). Teachers often want to see direct signs of pupils’ engagement during lessons, as this is considered a sign that pupils are learning (Abrahamsson et al., 2019). The importance of engagement has been documented in both formal natural science teaching settings (Chang et al., 2017; Hymers & Newton, 2019) and informal contexts (Melander Bowden, 2019). This suggests that it will be useful to study the role of engagement in different learning activities and contexts, including programming education.

To contribute knowledge about how pupils design their learning in programming, the purpose of this study is to investigate pupils’ engagement during programming lessons.

In response to the aim, the following research question has been raised:

How do various types of engagement become visible during programming lessons at science centres?

In the article, based on the results from the analysis, it is discussed how behavioural, emotional, and cognitive engagement are related to how pupils design in their learning process.

Digital competence and programming

Worldwide, increasing demands are being placed on digital competence (e.g. Godhe, 2019; Siddiq, 2018). The Swedish National Agency for Education specifies four aspects of digital competence: understanding the effects of digitalisation on society, being able to handle and understand digital tools and media, having a critical and responsible approach, and being able to solve problems and translate ideas into action (Skolverket, 2017). It is the last of these four aspects that focuses on programming, as problem-solving relates to programming within technology and mathematics (Godhe, 2019). However, digital technology and digital competence do not automatically lead to higher engagement in learning. Pupils require digital technology to lead to something more than learning ‘state-of-the-art’ technology (Olofsson et al., 2018). Since the digital development is moving at a rapid pace, there is much to do to encourage pupils’ creative potential and to engage them in different types of learning experiences (Ceratto-Pargman et al., 2012). For that reason, it is useful to give pupils opportunities to become engaged, by talking about the learning content and why it should be learned (Cochran et al., 2017).

Casey et al. (2018) are some of those who have explored the possibility of encouraging pupils to understand programming. By letting 235 pupils try out programming robots and writing code, they show that this is something that engages. They argue that this is particularly important for the future of pupils who do not have access to technical equipment or come from underserved backgrounds. Shim et al. (2017) claim based on their research in programming education that positive attitudes to programming often remain stable when the programming tools have high usability and are perceived as entertaining. Chang et al. (2017) show that pupils’ self-confidence can increase by understanding how codes are constructed when programming in visual programming environments. In the long run, this can encourage them to be much more involved in the topic. However, pupils who work with programming often show both positive and negative emotional engagement (Lindberg & Laine, 2018). This can be understood, for example, by pupils’ verbal interactions (Falcão et al., 2017). A study of primary school pupils’ attitudes to programming shows that the pupils who were engaged from the beginning also wanted to continue with programming in other contexts (Asad et al., 2016). Kong et al. (2018) shows that if pupils are not interested in the programming activities offered, it becomes more difficult to influence their sense of meaningfulness and their self-efficacy regarding programming.

Previous studies show that learning engagement and educational outcomes are connected (e.g. Cochran et al., 2017; Halverson & Graham, 2019; Hymers & Newton, 2019). Engagement should be promoted since there is a correlation between pupils’ perceived engagement and their performance. As pupils’ engagement is not always visible in different digital learning environments (Kjällander, 2011), there is a risk that their entire learning processes will not be noticed. Pupils’ engagement can be encouraged by using different types of teaching strategies (Hymers & Newton, 2019). Therefore, it is essential to plan for a learning design that uses learning technologies that support engagement (Bergdahl et al., 2018).

Theoretical framework

The theoretical framework, design for learning, provides an opportunity to facilitate the understanding of learning in various environments and situations (Leijon & Lindstrand, 2012). In this study, the concept of design is used theoretically and analytically to primarily interpret the pupils’ own design in learning during the programming lessons. By studying how pupils in different situations invest their engagement and direct their attention, we can thus get clues to their learning process (Leijon & Lindstrand, 2012). The focus will then be on design as a process (Levinsen & Sørensen, 2019).

The use of engagement as concept can be considered somewhat controversial as social semiotics and design for learning primarily refers to the (closely related) concept of interest (see for example Jewitt, 2017; Selander, 2017). However, Kress (2015) argues that an interest can control how someone directs their engagement. Therefore engagement, which is always situated, nevertheless becomes relevant to study in specific learning situations.

Both teachers and researchers use the concept of engagement as a predictor for learning (e.g. Abrahamsson et al., 2019; Isiaq & Jamil, 2018). However, there are still some discrepancies in how engagement is identified and defined. Halverson and Graham’s (2019) review of current engagement research describes engagement with varying indicators. Notably, emotional/affective, and behavioural engagement are recurring types of engagement in most publications. Fredricks and McColskey (2012) define three types of engagement: behavioural, emotional, and cognitive engagement. Using a meta-construction, they describe engagement to understand how different types of engagement interact with each other. The following table illustrates relevant indicators for the different types of engagement (Table 1).

Table 1

Indicators of engagement.

Type of engagement Indicators of engagement

Behavioural involvement in academic, social, or other activities; following rules; following classroom norms; absence of disruptive conduct
Emotional positive and negative reactions to activities, equipment, people (e.g. teachers or classmates) or the learning context; feelings of belonging or being important
Cognitive willingness to put necessary effort into understanding complex ideas or mastering difficulties; being strategic; being creative

According to Fredricks et al. (2004), all dimensions of engagement (behavioural, emotional, and cognitive) are important in order to understand the learning situation. By using qualitative research methods, important values of the learner’s engagement can become visible. Observations of pupils’ engagement can provide detailed descriptions of the learning situation and combining observations with interviews provides an insight into why some pupils engage while others do not (Fredricks & McColskey, 2012).

Conducting the study

The data in this article is based on pupils’ activities and statements during programming lessons at three SCs. The study was conducted in spring 2017, shortly before programming became part of mandatory education in Swedish compulsory schools. Lessons at SCs provided an opportunity to ensure that pupils had access to try out digital technology, whether or not they had access to computers and software at home. However, at that time, Swedish SCs had already been teaching programming for many years and were selected as an appropriate arena to study. SCs states at their website that visiting a SC increase engagement to science and technology (Svenska science centers, n.d.), therefore it is particularly interesting to investigate whether and how this can become visible. All examples are taken from lessons when pupils visited SCs as part of the school day. Each lesson lasted for about two hours.

The education had been planned by SC staff and was adapted for novices. All settings had been tested and prepared in advance. The lessons consisted of an introduction explaining the role of programming in society, and the pupils were then given the opportunity to try one or more programming tools based on given assignments (author, submitted). The pupils usually worked in pairs, but in some cases they worked alone. Each class rarely has the opportunity to visit SC more than once to try programming which makes it difficult to study the same class on several occasions, therefore, ten classes are included in the study. The data collection is presented in Table 2.

Table 2

Overview of the data.

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Lesson 9 Lesson 10

SC SC 1 SC 1 SC 2 SC 2 SC 2 SC 3 SC 3 SC 3 SC 1 SC 1
Grade in compulsory school 8 8 6 1 4 5 8 8 3 3
Number of conversations 4 5 10 4 6 0 2 2 7 8
Programming tool used Laptop, Scratch Laptop, Scratch Laptop, Lego robot iPad, Scratch JR Laptop, Scratch Laptop, Makey-Makey, Lego Robot, Kojo Laptop, Makey-Makey, Lego Robot, Arduino, Kojo Laptop, Makey-Makey, Lego Robot, Arduino, Kojo Laptop, Lego Robot Laptop, Lego Robot

Ten classes that had been booked for programming lessons at three SCs were contacted, and an information letter about the purpose of the study was sent. 220 pupils ranged in age between 7 and 15 years, corresponding to Swedish compulsory school participated in the study. For most of the pupils in the study, programming is something they have not worked on during school hours. However, how much experience the pupils actually have of programming can differ as some pupils have tried programming in other contexts.

Due to the purpose of investigating pupils’ engagement, careful ethical considerations were made. All participants were asked in advance if they were willing to participate in the study, and written permission was granted by the pupils’ legal guardians (Vetenskapsrådet, 2017). At the start of each observation, the participants were informed about the project once again, and that they had the opportunity to withdraw their participation at any time during the observation. In line with the General Data Protection Regulation (GDPR) (European Data Protection Supervisor, 2020), the personal data included in the data material was processed anonymously. All data is stored on an approved server. The names appearing in published material are pseudonyms. No individuals or school classes will be identifiable on publication.

To ensure that the sample was wide enough to embrace the purpose of the study (Twining et al., 2017), the data was collected using observations and conversations on ten occasions and from different SCs. The observations were conducted as partial participant observations (Gunnarson, 2019). No predetermined observation scheme was used. Observation notes were taken about pupils’ ways of being active, how they interacted with their peers, the instructor, and the digital equipment. Furthermore, conversations were noted in which the observed pupils participated. In order to supplement the notes, parts of the lessons were filmed with a mobile camera. Using a mobile camera made it possible to be flexible in the classroom and get close to the pupils’ activities; the filming also allowed to go back and study interesting parts of the observations. The same type of notes as during the observations were then made based on the films. The conversations, with one or two pupils at a time, were audio-recorded using a portable device and lasted about 2–5 minutes.

Field notes and notes from the films were edited and conversations were then transcribed. In line with the theoretical framework design for learning (Selander & Kress, 2017), different ways of communicating are constantly intertwined. An important aspect of the analysis is therefore to identify both what the pupils do and say and how they do it. Brackets were used to notate laughter, emphasis, etc. Likewise, pupils’ movements and how they interacted with the instructor and their peers were also noted. Empirically anchored descriptions provided a satisfactory basis for the theoretical analysis (Larsson, 2005). By using observation as a data collection method, the observer gained an insight into pupils’ behaviour during lessons. Interviews provided an opportunity to obtain explanations and clarifications from the participants. Combining these methods gives the study a detailed character (Loseke, 2017). Credibility and trustworthiness are ensured through the iterative analytical process described below (Twining et al., 2017).


A thematic analysis was used to sort the data into themes (Braun & Clarke, 2006). The thematic analysis included several steps, such as generating initial codes, searching for themes and defining and naming themes. Events and terms that are generally linked to engagement such as happy exclamations, disappointed gestures or deep concentration, were highlighted and coded throughout the transcribed material. These initial codes were defined by qualitative differences and not by quantitative occurrences. Particularly interesting sections were arranged into tables where they were coded line by line using the indicators for the different types of engagement (Fredricks & McColskey, 2012). At this stage, some types of engagement were identified as being more conducive to the pupil’s general engagement and were used to name the various themes. These themes were interpreted to understand the possible links between the different types of engagement. In addition, the ways in which the pupils’ engagement were related to how they designed in their learning were analysed.


By observing pupils when programming knowledge was gained about which aspects generated engagement, as well as insights into what could negatively influence engagement. In this way various types of engagement became visible. Each type of engagement was observed on several occasions. The results are primarily represented by three selected examples. The examples illustrate how different types of engagement relates to how pupils design their learning. The categorisation of engagement is carried out by the author based on the theories of Fredricks and McColskey (2012).

The content of the lessons observed in this study was designed to let pupils try one or more programming tools by solving assignments presented by an SC instructor. The programming tools used in the given examples are LEGO robots, Makey-Makey and Scratch. All tools used in the study are presented in Table 2. In the excerpts, Mia is the name of the observer.

Behavioural engagement

The most observable criterion for behavioural engagement is the absence of disruptive conduct (Fredricks & McColskey, 2012). In a social context, this means for example following rules or following classroom norms. Behavioural engagement also means involvement in various social and academic activities. During the lessons, there were several examples of behavioural engagement. It was visible, among other things, in the way in which pupils collaborated to solve the tasks they were faced with. There were also examples when the behavioural engagement seemed to be negative, for example pupils who disturbed their peers with irrelevant comments or that they used the computers for purposes other than programming. However, there is a risk that what appears to be negative behavioural engagement will conceal the cause of the situation. This is exemplified by Frida (Grade 3). Frida was with her class at the SC, where they had access to a LEGO robot and a computer per pair. The instructor initially gave step-by-step instructions, and the pupils were then supposed to work at their own pace with various assignments. See Table 3.

Table 3

Analysis 1 of engagement in a programming workshop.

1 Frida now walks around the room,
2 looking at what her friends are
3 doing. After a while, she sits down at beh
4 the computer again where her peer beh
5 tries to solve the assignment. The
6 observer sits down next to her.
7 Mia: Are you getting tired?
8 Frida: Uhm… (Frida is hanging
9 over the table) beh
10 Mia: How has it been so far today?
11 Frida: Good (Frida rubs her eyes emo
12 when she answers) beh
13 Mia: Has it been fun?
14 Frida: It has been a bit boring. emo
15 Mia: Why?
16 Frida: I don’t actually know.
17 During the interview, her peer asks
18 Frida something about the program.
19 Frida immediately gets up and
20 points at the screen and shows what beh
21 to do. She tells her peer that the part beh
22 of the program “must be unlimited”. cog
24 Frida then sits down again with her
25 arms crossed. The interview beh
26 continues.
27 Mia: Has it been too difficult or too
28 easy or…
29 Frida: Easy!! (Frida answers emo
30 quickly and cuts off the question.) beh
31 Mia: Has it been too easy, is that why
32 it’s boring?
33 Frida: Um…

The pupil does not violate any classroom norms as she walks around looking at what her peers are doing (lines 1–3), that is accepted at SC. However, she shows a negative behavioural engagement – when hanging over the table – that she is not particularly involved in the activities (lines 8–9). Her response that the activities are going well (line 11) contradicts the way she also shows that she is tired. Her engagement continues to be contradictory, as she for a while being cognitive engaged and showing willingness to put in the necessary effort to tell her peer what needs to be done for the program to function (lines 19–22). Although the pupil at first cannot answer why it is boring (line 16), she gives us a clue when she says that the programming assignments are easy (line 29), which shows that she is not challenged in her cognitive engagement. During the lesson, there is nothing that stops the pupil from exploring on her own after completing the first assignments. However, the intertwined engagement does not energise her, instead of trying to learn more about programming, she is hanging over the table. What at first appeared to be a negative behaviour seems to be linked to the fact that the pupil’s cognitive and emotional engagement are low. This means that the pupil’s design in learning is affected, she does not actively participate in the activities offered.

Emotional engagement

Emotional engagement focuses mainly on positive and negative reactions (Fredricks and McColskey, 2012). In a learning context, these reactions may apply to activities, equipment, and people (e.g. teachers or classmates). In the data material both happy exclamations and pupils’ irritated comments was analysed to belong to emotional engagement. The pupils showed their emotional engagement by for example, getting annoyed when their solution to the program did not work or stretching their arms in a gesture of victory when they were pleased with their program. The view of how pupils’ emotional engagement can relate to how they design their learning is exemplified by Anna (Grade 5). When Anna is with her class at the SC, they try three different types of programming assignments during two hours. After a quick change, the pupils meet a new instructor before each assignment. In the current excerpt, Anna and her classmate are working with the tool Makey-Makey. See Table 4.

Table 4

Analysis 2 of engagement in a programming workshop.

34 The instructor explains that they should
35 now try another assignment which also
36 includes plugging in a programming
37 tool to get a closed circuit to send the
38 signals to the computer. When the
39 instructor shows that it is connected by
40 holding the cables in his hands, Anna
41 bursts out (anxiously): It feels like you
42 are going to die! emo
43 When Anna and her peer later connect
44 their tools, she sounds fascinated when
45 she says: This is so cool, I had no idea emo
46 that it worked this way! cog
48 As the workshop continues, the pupils
49 constantly talk to each other. They talk
50 about what they are doing and how to beh
51 connect. They wonder if “it can be
52 stronger” if they put the cables in a cog
53 special way. They show each other
54 what they have done. Anna and her beh
55 peer get their tools working and Anna
56 calls out to the room: I am magic! I emo
57 am smart! emo

There are several aspects of engagement that affect how the pupil in the example designs in her learning. However, the emotional engagement is the most distinct, identified mostly by the way she communicates. The pupil expresses strong feelings and concern as the instructor holds the electric cables (lines 40–42). However, she also exhibits cognitive engagement, striving to understand complex ideas when seeing how the programming equipment works, which makes her excited (lines 45–46). The fact that she is satisfied and thus emotionally engaged when coping with the whole programming assignment (lines 55–57) is due to her behavioural engagement, namely her positive conduct and collaboration with her peer. Anna’s intertwined engagement energises the learning process. Although she expresses some concern, she continues, which leads to new discoveries. Anna expresses emotional engagement however she also has a willingness to put necessary effort into understanding complex ideas and mastering difficulties. This also affect her behavioural engagement as she actively takes part in everything that happens during the lesson. It seems that the pupil uses her engagement to design her learning in order to make it meaningful. It is when she realises that she understands how the equipment works that she expresses that she is smart.

Cognitive engagement

Isolated cognitive engagement can be difficult to identify, as behaviour and emotional engagement are often more visible. However, by being creative and by showing willingness to put in the necessary effort to master difficulties, pupils can demonstrate their cognitive engagement (Fredricks & McColskey, 2012). This can be illustrated, among other things, by a pupil who said that learning programming is something that is important and that he therefore did not want to give up despite all difficulties. Cognitive engagement can also give pupils the opportunity to understand complex ideas (Fredricks & McColskey, 2012), for example when a pupil was looking for a solution to a problem and realised why his robot was not working due to a bug in the program. Cognitive engagement can also mean being strategic. This is exemplified by Jens (Grade 8). He had designed for his learning by bringing his own private computer equipment. He worked by himself throughout the lesson, leaning over his computer. When the observer (Mia) looks at his screen there are no avatars as in Scratch, only numbers and letters. See Table 5.

Table 5

Analysis 3 of engagement in a programming workshop.

58 Mia: May I ask what you are doing?
59 Jens: I am programming in Python. beh
60 Mia: In Python?
61 Jens: Yes! cog
62 Mia: Because you have done a lot of
63 Scratch and stuff before?
64 Jens: No, not so much Scratch.
65 Mia: … Huh?
66 Jens: I think so, well yes, I get a
67 little cross as soon as someone calls emo
68 it programming, I think it is
69 graphically rendered. cog
70 Mia: Okay??
71 Jens: It is a bit like that, ahhh. (Jens
72 clenches his fist and shows
73 resistance.) emo
74 Mia: And you do not think it is…
75 Jens: NO! It is not exactly the same emo
76 thing!
77 […]
78 Mia: How did it come about that you
79 chose to participate in this pupil’s
80 choice today?
81 Jens: Because I think programming
82 is fun. emo
83 Mia: Yeah, and then you didn’t know
84 it was going to be Scratch it was
85 about, or what?
86 Jens: Well I probably knew it would
87 be for the most part, but I also knew cog
88 that it would be possible for me to
89 work with other languages as well… cog
90 Mia: OK…
91 Jens: … because it does not usually
92 happen that someone complains
93 when I am programming. cog
94 Mia: No…
95 Jens: Besides, I did the project! (Jens
96 giggles a little.)
97 Mia: What did you say?
98 Jens: Additionally, I did it in cog
99 seconds if you really want to see. beh

The pupil is quickly identified, despite attending a novice lesson, as having a special interest in programming. The pupil focuses his interest on programming which leads to a cognitive engagement. He already has a definite idea of what he thinks programming is, and he shows strong emotional engagement against the Scratch software for which the lesson was designed. However, his strategic plan is to get time to work on his own project, programming in Python (lines 86–89). In the unlikely event that anyone was to question him, he protected himself strategically by carrying out the proposed task in Scratch (lines 98–99). There are tendencies towards negative behavioural engagement, as the pupil shows resistance (lines 71–73). Still, it also explains his choice to design his own learning, he brings his own computer. He says it is fun to work with his own programming. His cognitive engagement makes him want to learn more, and as he states, no one usually complains about it.


This study shows how a learning design process can be understood by studying pupils’ engagement during programming lessons. The results show that pupils affect the design in learning, having different types of engagement in various learning situations. In some cases, it is easy to identify how pupils express their engagement with spontaneous jargon or stretching their arms, while other situations may need to be analysed more carefully to understand the more elusive types of engagement. In the analysis of pupils’ engagement when programming, different indicators are used to identify behavioural, emotional, and cognitive engagement (Fredricks et al., 2004; Fredricks & McColskey, 2012). The results also confirm that the types of engagement are interrelated and not isolated processes. This is valuable knowledge, otherwise it would have been easy to perceive several of the pupils in the observed situations as being unengaged in learning programming.

Initially, it was expressions such as “WOW – check this out” and “I am magic”, after which this article is named, that were noted as engagement. Several of the pupils in the study show the types of engagement that teachers often find it easiest to identify, namely positive behavioural and emotional engagement (Abrahamsson et al., 2019). However, when carrying out an analysis using the framework of engagement (Fredricks et al., 2004; Fredricks & McColskey, 2012), the results confirm – in line with Isiaq and Jamil (2017) – that engagement is multidimensional and includes different factors. Only listening to how pupils express themselves with spontaneous jargon, which can be extremely positive (who does not want to feel magic?), entails a risk of missing the cause of their engagement.

From a design-theoretical perspective, everyone involved in a learning process is a designer – both those who plan the activity and those who participate (Kress & Selander, 2012; Levinsen, & Sørensen, 2019). As initially noted, several studies on programming focus on educational tools and methods for learning. There may, for example, be a positive effect on pupils’ attitudes towards programming when they try different types of programming tools (e.g. Asad et al., 2016; Shim et al., 2017). Orchestration and planning using special engagement techniques often increase pupils’ engagement (Bergdahl et al., 2018). At the same time, engagement is an interaction between the learning environment and the learner. It means that how pupils design in their learning depends on their situated personal engagement. Learner characteristics and previous learning experience influence pupils’ engagement and their learning outcome (Halverson & Graham, 2019). The results of this study illustrate how pupils’ types of engagement differ. One answer to this may be the pupils’ personal interest and that they therefore direct their engagement differently. This can also depend on the individual’s previous experiences in different learning situations, on the surroundings, peer responses and contact with the instructors. The fact that the study was done at SCs, which are special learning environments, can also affect the pupils’ engagement. However, one type of engagement can lead to that other types increase or decrease depending on how the engagement is stimulated.

To have power to engage, it is important that every pupil feels that they have access to the learning content (Cochran et al., 2017). Visual programming, which is used during the observed lessons, can, for example, facilitate an understanding of how codes are constructed (Chang et al., 2017). The pupils can get an aha-experience when they see the codes and how things are connected (see example in Table 4). However, whether pupils perceive the activities offered to be emotionally engaging may depend on whether they think the assignments are meaningful and cognitively stimulating. This study shows that this applies to both younger and older compulsory school pupils. As in the example, when the interest in programming does not match the lesson content (Table 5). Here, however, the pupil had such a strong cognitive engagement that he brought his own computer. When pupils feel that assignments are too simple and not cognitively challenging, they easily become bored, resulting in what can be perceived as negative behaviour (Table 3). When pupils are not challenged, there is a risk that their cognitive engagement will not be strong enough to activate and obtain positive emotional and behavioural engagement (Kong et al., 2018). However, the study also shows how understanding how to solve a problem, thanks to behavioural and cognitive engagement, can lead to strong emotional engagement. This signifies that engagement is multidimensional, and that one type of engagement can affect the others. Consequently, how this individual multidimensional intertwined engagement is articulated, in turn, affects how the pupils design in their learning. As the pupils in this study visit a SC only once to try out programming, it is difficult to say whether their engagement extends beyond this opportunity. However, this is also a sign of engagement; it is situated in a certain time and place.


Engagement is both personal and situational, leading everyone to design in their own learning process. This can allow pupils, when encountering and understanding a new area of knowledge, to feel that they are ‘magic’. Indicators of emotional engagement are significant, in a positive sense, especially when pupils can discover and experience something they have not previously encountered or mastered. Negative aspects of both behavioural and emotional engagement are visible when pupils are not challenged in their learning. Cognitive engagement during programming lessons can cause pupils to design for their own learning in advance. Cognitive engagement can also grow when pupils understand new aspects of programming. In summary, the study raising awareness about how pupils design in their learning is related to all three types of engagement.


This study is explorative in nature and aims to understand the role of engagement in a learning context. The project was implemented when programming was about to become mandatory in Swedish compulsory schools in all grades at the same time. No claims are made that the examples documented here are the only combinations of engagement that can be observed when learning programming. The extent to which engagement affects learning in programming in the long term needs more research.

Competing Interests

The author has no competing interests to declare.


  1. Abrahamsson, C., Malmberg, C., & Pendrill, A.-M. (2019). En Delfistudie om lärares uppfattning av elevengagemang i NO-undervisningen. NorDiNa, 15(2), 128–144. DOI: 

  2. Asad, K., Tibi, M., & Raiyn, J. (2016). Primary School Pupils’ Attitudes toward Learning Programming through Visual Interactive Environments. World Journal of Education, 6(5). DOI: 

  3. Bergdahl, N., Fors, U., Hernwall, P., & Knutsson, O. (2018). The Use of Learning Technologies and Student Engagement in Learning Activities. Nordic Journal of Digital Literacy, 13(02), 113–130. DOI: 

  4. Braun, V., & Clarke, V. (2006). Using thematic analysis in psychology. Qualitative Research in Psychology, 3(2), 77–101. DOI: 

  5. Casey, J. K., Gill, P., Pennington. L., & Mireles, S. V. (2018). Lines, roamers, and squares: Oh my! Using floor robots to enhance Hispanic students’ understanding of programming. Education Information Technology, 23, 1531–1546. DOI: 

  6. Cerratto-Pargman, T., Järvelä, S. M., & Milrad, M. (2012). Designing Nordic technology-enhanced learning. The Internet and Higher Education, 15(4), 227–230. DOI: 

  7. Chang, C.-K., Yang, Y-A., & Tsai, Y.-T. (2017). Exploring the engagement effects of visual programming language for data structure courses. Education for Information, 33, 187–200. DOI: 

  8. Cochran, K. F., Reinsvold, L. A., & Hess, C. A. (2017). Giving Students the Power to Engage with Learning. Research in Science Education, 47, 1379–1401. DOI: 

  9. European Data Protection Supervisor. (2020). Data protection. retrieved 7 April 2020 

  10. Falcão, T. P., Barbosa, R. S., & Gomes, T. S. (2017). An Analysis of Interaction Design in Children’s Games Based on Computational Thinking. International Journal on Computational Thinking, 1(1). DOI: 

  11. Fredricks, J. A., Blumenfeld, P. C., & Paris, A. (2004). School engagement: Potential of the concept: State of the evidence. Review of Educational Research, 74, 59–119. DOI: 

  12. Fredricks, J. A., & McColskey, W. (2012). The Measurement of Student Engagement: A Comparative Analysis of Various Methods and Pupil Self-report Instruments. In: S. Christenson, A. Reschly, & C. Wylie (eds.), Handbook of Research on Pupil Engagement. Springer. DOI: 

  13. Godhe, A. (2019). Digital Literacies or Digital Competence: Conceptualizations in Nordic Curricula. Media and Communication, 7(2), 25–35. DOI: 

  14. Gunnarson, M. (2019). Att utforska praktisk kunskap med deltagande observation. In: M. Gunnarson (ed.), Att utforska praktisk kunskap: Undersökande, prövande och avtäckande metoder, (225–260). Södertörns högskola. 

  15. Halverson, L. R., & Graham, C. R. (2019). Learner engagement in blended learning environments: A conceptual framework. Online Learning, 23(2), 145–178. DOI: 

  16. Hymers, D., & Newton, G. (2019). Investigating student engagement in first-year biology education: A comparison of major and non-major perception of engagement across different active learning activities. The Canadian Journal for the Scholarship of Teaching and Learning, 10(1). DOI: 

  17. Isiaq, S. O., & Jamil, Md. G. (2018). Enhancing student engagement through simulation in programming sessions. The International Journal of Information and Learning Technology, 35(2), 105–117. DOI: 

  18. Jewitt, C. (2017). The Routledge Handbook of Multimodal Analysis. Second edition. 

  19. Kjällander, S. (2011). Designs for Learning in an Extended Digital Environment: Case Studies of Social Interaction in the Social Science Classroom. [Dissertation, Stockholm University]. 

  20. Kong, S.-C., Chiu, M. M., & Lai, M. (2018). A study of primary school students’ interest, collaboration attitude and programming empowerment in computational thinking education. Computers & Education, 127, 178–189. DOI: 

  21. Kress, G. (2015). Semiotic work: Applied Linguistics and a social semiotic account of Multimodality. AILA Review, 28. DOI: 

  22. Kress, G., & Selander, S. (2012). Multimodal design, learning and cultures of recognition. Internet and Higher Education, 15, 265–268. DOI: 

  23. Larsson, S. (2005). Om kvalitet i kvalitativa studier. Nordisk Pedagogik, 25(1), 16–35. DOI: 

  24. Leijon, M., & Lindstrand, F. (2012). Socialsemiotik och design för lärande. Två multimodala teorier om lärande, representation och teckenskapande. Pedagogisk forskning i Sverige, 17(3–4), 171–192. 

  25. Levinsen, K. T., & Sørensen, B. H. (2019). Teachers’ Designs for Learning Practices when Designing for Students as Learning Designers. Designs for Learning, 11(1), 30–39. DOI: 

  26. Lindberg, R., & Laine, T. (2018). Formative evaluation of an adaptive game for engaging learners of programming concepts in K-12. International Journal of Serious Games, 5(2), 3–24. DOI: 

  27. Loseke, D. R. (2017). Methodological Thinking. Basic principles of social research design. Second edition. SAGE Publications, Inc. 

  28. Mannila, L. (2017). Att undervisa i programmering i skolan. Varför, vad och hur? Studentlitteratur. 

  29. Melander Bowden, H. (2019). Problem-solving in collaborative game design practices: epistemic stance, affect, and engagement. Learning, Media and Technology, 44(2), 124–143. DOI: 

  30. Olofsson, A. D., Lindberg, O. J., & Fransson, G. (2018). Students’ voices about information and communication technology in upper secondary schools. The International Journal of Information and Learning Technology, 35(2), 82–92. DOI: 

  31. Regeringskansliet [Government Offices]. (2017). Stärkt digital kompetens i skolans styrdokument. Promemoria 2017-03-09. Stockholm. 

  32. Shim, J., Kwon, D., & Lee, W. (2017). The Effects of a Robot Game Environment on Computer Programming Education for Elementary School Students. IEEE Transaction on Education, 60(2), 164–172. DOI: 

  33. Selander, S. (2017). Didaktiken efter Vygotskij. Design för lärande. Liber. 

  34. Selander, S., & Kress, G. (2017). Design för lärande – ett multimodalt perspektiv. Andra upplagan. Studentlitteratur. 

  35. Selander, S., & Rostvall, A.-L. (2010). Design och meningsskapande – en inledning. In A-L, Rostvall, & S. Selander (eds.), Design för lärande. Norstedts. 

  36. Siddiq, F. (2018). A Comparison Between Digital Competence in Two Nordic Countries’ National Curricula and an International Framework: Inspecting their Readiness for 21st Century Education., 14(2), 144–159. Retrieved from 

  37. Skolverket. (2017). Få syn på digitaliseringen på grundskolenivå–Ett kommentarmaterial till läroplanerna för förskoleklass, fritidshem och grundskoleutbildning [Noticing digitalisation at compulsory education level—Commentary to curricula for preschool class, school-age educare and compulsory education]. Retrieved from 

  38. Svenska science centers. (n.d.). Vi gör skillnad. Retrieved from 

  39. Twining, P., Heller, R. S., Nussbaum, M., & Tsai, C.-C. (2017). Some guidance on conducting and reporting qualitative studies. Computers & Education, 106, A1–A9. DOI: 

  40. Vetenskapsrådet [Swedish research council]. (2017). Good research practice. Vetenskapsrådet. 

comments powered by Disqus