Types and time of interaction for teaching introductory programming using instruction method of extreme apprenticeship

Abstract CS1 courses are designed in Indian Institutions as a lecture course of three to four credits and one credit lab course. The issues related to curriculum design, instruction design, and students’ learning manifest themselves as issues in the lab programs. This situation presents the lab instructor with an opportunity to understand and address the difficulty the student is facing. The difficulty could be understanding a concept, applying a concept, the amount of effort invested, and the time required by the individual to solve the problem. The student might need help to address various emotional aspects related to peer pressure, need for completion, need for acceptance by the instructor, and achievement goals. The student’s difficulty is usually handled by a) allowing the student to correct programs by looking at the working programs of their peers or class notes, b) The teacher or peer fixes the program. The problem gets solved, and the student moves on to the next program, but the student’s underlying difficulty may not have been resolved. Since addressing the underlying difficulty takes more time, we offered the students a voluntary supplementary CS0 course using the Extreme Apprenticeship instruction method. In this study, we estimated that students need between four to fifteen hours of one-on-one synchronous interaction time with the instructor based on prior exposure. Thematic Analysis of interactions identified fifteen themes in metacognitive domain interactions, eight themes in cognitive domain interactions, and six themes in affective domain interactions.

ABOUT THE AUTHOR Srinivasan Laksminarayanan worked as a Software Engineer in various roles and is currently pursuing a Ph.D. at Jain University, India. He held the position of Development Manager at Oracle (India) before switching to education research. N. J. RAO received Ph.D. in Control Systems from the Indian Institute of Technology, Kanpur. He was the Chairperson of the Center for Electronics Design and Technology and subsequently the Chairperson of the Department of Management Studies in the Indian Institute of Science. His research interests included Control Systems, System Dynamics, and Higher Education. Since superannuation in 2006, he is working in several areas related to Higher Education in India. His current research interests include assessment, accreditation, and metacognition in Higher Education. This study is a part of ongoing research to achieve transformative learning in introductory programming courses.

PUBLIC INTEREST STATEMENT
Every year close to 700 thousand students attend introductory programming course as a part of the first year of the undergraduate engineering programs in India. The lecture based instruction method is predominantly used in most institutions. These instruction methods result in students learning programs instead of learning programming. In order to address the situation we adopted the Extreme Apprenticeship method. Any change in the instruction method will have an impact on the instructor's effort. This study measures one on one instructor interaction time when the Extreme Apprenticeship method of instruction is adopted. Experienced teachers over years of interaction develop specific communication patterns. In this study the interactions between an instructor and students were captured and analysed to identify themes of interaction. These themes can be used to train teachers who are new to teaching introductory programming courses using the Extreme Apprenticeship method.

Introduction
Cognitive apprenticeship is an instruction method where the instruction is delivered as modelling, coaching, scaffolding, articulation, reflection and exploration (Collins, 1991). Modelling is the demonstration of performing a task while articulating the rationale behind each action and decision taken by the instructor. Coaching by the instructor is done by observing and facilitating student's learning by the instructor while the student is performing the task. Scaffolding is a way of organizing the content by breaking down the task to smaller tasks or tasks created to help the student learn concepts needed for performing a task. Articulation refers to the students making their thinking processes explicit. Reflection refers to the students comparing their performance with that of peers and the instructor and thereby developing the ability to perform. Exploration happens when the students do not need the scaffolding by the instructor, and the instructor predominantly performs the role of evaluation of the work.
The basic requirements for cognitive apprenticeship are instructor's expertise in the subject and ability to design and deliver the course using the cognitive apprenticeship method. Instructor time required should be allotted by the curriculum and the institution. The students should have mastery goal orientation towards the course. About 800 students attend the CS1 course every semester in the institution where the study was done. It is a mandatory course for all engineering undergraduates. The study was conducted in the year 2020, January to June semester batch. C was the programming language used for the course. The lab instructor (LI) in the study was assigned 164 students in 12 batches. The students had to solve about three problems in every 2-hour lab session over a period of 14 weeks. Majority of the students could not complete even one lab program. Hence the students would type out the programs looking at the class notes or reference programs, and the errors were solved by comparing with the class notes or peers' programs. When the student fails to write the program by comparing the code, the instructor helps the student. Though the current system students learn the existing programs, many students found the programming very difficult because of the syntax, and logical errors that inadvertently happen while typing. The LI proposed to offer a supplementary course (CS0) based on cognitive apprenticeship method to address the difficulties of the students.
The CS0 course had the following characteristics: (1) It was not graded.
(2) The institution offered a certificate to all the students who completed the course.
(3) It was optional and voluntary.
(4) The instructor's availability online and in the lab was high.
(5) The course outcome was that students should be able to write a program for an authentic programming task.
(6) The instruction was one to one.
The version control data and interactions with the instructor form a basis for understanding the individual student's learning. The students who do not perceive any intrinsic value had a choice to drop from the course without consequences to their grades. Twelve students underwent the majority of the course with the interactions exclusively on the text chat. Teaching on text chat makes teaching a linear process and captures all the teacher-student interactions. This study intends to analyze the course's chat logs to achieve the following research objectives: (1) Identify metacognitive, cognitive and affective interactions that facilitate first-year students learning the basics of programming.
(2) Estimate interaction time needed between a student and the teacher for a novice to learn programming basics. Ureel and Wallace (2018) report in their study that cognitive apprenticeship results in an improvement in student performance and a clearer understanding of the place of communication in the lives of computing professionals. Brondino et al. (2019) reported that higher compliance of students in an extreme apprenticeship course performed better and was characterized by less intense anxiety, anger, and hopelessness compared to those with lower compliance. Vihavainen et al. (2011) in their work describe extreme apprenticeship as an extension of Cognitive apprenticeship. We adopted the extreme apprenticeship method for this study. We adopted, from their work, the values of learning by doing, continuous feedback, no compromise, and the student should be able to write programs for an authentic task. We followed the practices of minimal lecturing and encouraged looking for information. The students were predominantly taught online using online google hangouts, and the activities were coordinated using google classroom and online git version control system. Haatainen et al. (2013) have described the implementation of additional support for students finding the CS1 course difficult. In the study, they used self-assessment to identify students needing help. They created a learning environment where participation was voluntary. The students who participated found lower social barriers to learning since they met others having similar difficulties. The learning was done by programming in groups before graduating to programming individually. This process allowed students to learn programming in a socially supported environment. They recommend that differentiated learning and educational constructionism will benefit students learning. We have adapted some of the methods from this study to address the issues in our instructional setting. We reduced the social barriers by not having grading and making the course a voluntary mastery learning course. The student asking questions was a mandatory beginning to every interaction, and this reduced the social barriers further. Interventions were attempted in the order of pure discovery, guided discovery, direct questioning, direct answering, and direct instruction. Campbell et al. (2019) implemented a self-paced mastery learning course online and reported that though the student reported a deeper engagement, the student tended to procrastinate work till the end of the course. In our course, we observe that procrastinating students drop out eventually. McCane et al. (2017) reported the advantages of a mastery learning course in programming for weaker students. They reported the difficulties in the implementation of the mastery course. We feel that trying to run a mastery course in a semester format leads to these problems. We ran the course as a self-paced but regular number of hours every week in mastery learning mode without any grades as a voluntary supplementary course, which allows the course to focus on students ability to write a program for authentic tasks instead of completion within a given time period. Student's intention to learn becomes a necessary condition for the continuation of the student course. Xie et al. (2019) proposed a theory in which they identify four distinct skills that novices learn incrementally. These skills are tracing, writing syntax, comprehending templates (reusable abstractions of programming knowledge), and writing code with templates. They mention that incorporating the theory in the instruction design resulted in improved instruction. Prather et al. (2019) identified that students have metacognitive difficulties due to forming the wrong conceptual model about the problem, dislodging an incorrect conceptual model of the problem, assuming the correct conceptual model for the wrong problem, and moving too quickly through one or more stages incorrectly leads to a false sense of accomplishment. We find that cognitive apprenticeship addresses the methods and issues reported in the studies. Tracing and writing syntax is addressed in almost all courses as a norm. We incorporated comprehending templates and writing code with templates as steps in the code review process of the CS0 course. In addition, the metacognitive difficulties mentioned were addressed during the continuous feedback adopted in our study. Mayer (2004) described the disadvantages of pure discovery learning and recommended guided discovery. We have taken the position that the student's cognitive load decreases with the increased familiarity of content over time. By carefully managing the time for pure discovery, we can give the student the experience of pure discovery learning. This course aims to provide students with the experiences of pure discovery, that is, the ability to arrive at the right solution using the internet resources and guided discovery where the instructor attempts corrective feedback before attempting explanatory feedback. The student can choose to learn the concepts from many available resources online, but they will have to write the program by themselves when it comes to solving an authentic task. If they cannot solve and if the instructor has to give direct instruction, then the student will have to solve another authentic task. This cycle continues until the student can write a program for an authentic task. Raj et al. (2018) adopted live-coding as an instruction method. This is a practice where the instructor writes code in the class while talking out loud, explaining their thought process. They claim this is a useful pedagogical tool to learn programming. Students directly get to learn algorithmic thinking, debugging skills and other programming practices from a master. This is a direct implementation of cognitive apprenticeship in an introductory programming course. Since our instruction was individually paced, we preferred explaining an already written program and the rationale behind the decisions for writing the code in a specific way. (2016) conclude that in their programming course, the methods of the cognitive apprenticeship enhance online collaborative learning not only because students work together to reach a common goal, but also because they can support each other's learning through synchronous interactions when using a chatroom for this purpose. In our study, we use the synchronous interaction aspect to maintain the continuity of learning between the instructor and the student.

Rodríguez-Bonces and Ortiz
Recent research indicates a tilt toward automation. Automated grading, automated feedback, online tutorial, MOOCs, educational analytics have all been used to improve the learning of the students. Increasingly students are using these systems to learn. These systems do not generally support code review, and the students find them excessively strict (Wilcox, 2015). Yan et al. (2019) implemented a feedback tool as a way to begin the conversation on metacognition and as a way to bring a human aspect back to programming despite the size of classrooms. In this study, the students were required to use a version control system, and the data from the version control system was used for feedback. Students were encouraged to use any online resources, and the instructor intervenes when the student is not able to progress in an activity or seeks help. Table 1 lists the activities and corresponding cognitive outcomes. The design was arrived at based on the experiences with previous batches in previous years. The course is a supplementary course, and the students also attend a regular CS1 course. Right from the first activity, the instructional method starts with discovery learning methods, followed by guided discovery learning methods. When both the methods do not lead to progress, and the student still has the difficulty, then the direct instruction method is used. Since this process involves elaborate work, the concepts taught were limited to those required for writing programs for chosen authentic tasks. The authentic tasks were chosen from ACM high school programming contests.

Method
Mixed methods were adopted for the study. The participants interacted with the instructor exclusively using the text chat. The programs were submitted for review using the git revision control system. Quantitative methods were used to analyze the count data from chat logs and estimate the time taken for interaction between the instructor and the student. The synchronous interaction time is the sum of all time differences between two messages when the difference is less than two minutes. Qualitative thematic analysis method with manual coding was used to classify the chat interactions and understand the kinds of interactions used to resolve the students' difficulties. Only the participants who interacted extensively using chat were selected for the analysis.

Quantitative analysis of data
From Table 2, we can see that only 50% of students were able to write a program for an authentic task even with additional instruction. Students, who had prior exposure, needed instruction time of 2 to 5 hours to be able to write a program for an authentic task. We see from the table that students who do not have prior exposure require between 4 to 15 hours of interaction time. This data can be used to determine the number of credits to the lab course and the number of students assigned to an instructor. Even if we assume 6 hours of interaction time per semester per student on an average, one-credit lab course, which is 2 hours per week, and a 14-week course, a lab instructor can handle a maximum of five students. In the institution where the study was conducted, each instructor handles 12 students, which reduces the interaction time to less than 3 hours per student per semester, indicating the need for the management to rethink the curriculum design for the course. Ben-Ari (2001) writes that a researcher working from a constructivist viewpoint should use qualitative methods. The insights obtained from qualitative research are far more helpful than the research that measures performance alone and then draws conclusions on the success of Write a program to add two numbers. Understand data types and expressions.

Qualitative data analysis
Write a program to add two numbers using four functions.
Understand modularization in C.
Write a program to find the distance between two points.
Apply modularization in C.
Write a Program to find the distance between two points using structures.
Understand data abstraction in C.
Write a program to find the sum of n different numbers.
Apply for loops and arrays to handle process data of many objects of the same kind in C.
Write a program to find the sum of two fractions. Apply modularization and data abstraction in C.
Write a program to add n fractions. Apply modularization, data abstraction to handle data of many objects of the same kind in C.
Write a program for the task from ACM High School Programming Competition with assistance.
Write a program for an authentic task with instructor assistance.
Write a program for the task from ACM High School Programming Competition without assistance.
Write a program for an authentic task without instructor assistance.  a technique. Magrini (2012) defines phenomenology as a philosophical "method/practice" of observing, recording, and interpreting "lived experience" through vivid and detailed descriptions. The practice of phenomenology seeks to expose, uncover, or reveal "universal" (transcendental) elements of human existence that are instantiated within practical, "particular" empirical situations. In this study, the instructor interacted with the students completely on the text chat for synchronous communication. Each student had between 400 to 2000 interactions with the instructor and hence capturing the lived learning experience in great detail.
Instructors encounter many contexts repeatedly during the interactions in the extreme apprenticeship method in introductory programming courses. Since this course happened exclusively on the text, the chat logs provide rich content for identifying these repeated contexts and also a chance to reflect upon the way the interaction happened for a given context. In this study, we followed the coding stages of reflexive thematic analysis for identifying the contexts and classifying the interactions. We went through multiple rounds of coding to identify the codes since we had to code each student resulting in refining the codes and combining the codes. We then classified code into metacognitive, cognitive and affective domains. The whole process intends to develop a repeatable reflexive practice. The thematic analysis followed the steps of familiarization, coding and generation of initial themes by the lab instructor and was refined further when the chat logs of the next student were coded. We present our understanding based on the themes identified during the coding process. Table 3 is a summary of codes for interactions related to the metacognitive domain. The most important cultural shift was moving the student from Understand to Apply (TUVSCONS). From the prior educational experiences, many of the students believe that understanding a solution explained by the teacher is the end of learning. Programming falls under apply, analyze, evaluate, and create cognitive levels Sorva. TUVSCONS interaction happens when a student requests for a direct answer from the instructor. The instructors get an opportunity to present the constructivist methods of learning. From the data, we see 10 out of 12 students had this interaction with the instructor. The time required to write a program is significantly more than understanding and reproducing the program. This shift leads to many metacognitive, affective, and cognitive domain interactions with the teacher. The student will now have to plan their learning to accommodate this additional time requirement from their study time. Table 4 shows chat excerpts related to understanding versus constructing programs.

Interactions with the students in metacognitive domain
A common question that comes to a novice programmer's mind is when a program is working, why should they improve it. They do not see the need to modularize, making the programming more readable, using appropriate data types, indenting the program, or using appropriate loops. One of the major difficulties lies in communicating with the student that the program is wrong even though it works. Students cannot take the comments as objective comments and need discussion to get the correct attitude towards code reviews. Whenever an attitude needs to be fixed, it takes additional interactions and time. Student learning time is extremely precious. They have difficulty understanding that spending time refining a working solution is not a waste of time and is essential. Table 5 shows chat excerpts related to working programs versus well-written programs.
Interactions were required to delineate learning for grades and learning to program (TLGVSLL).
Interactions happened with 4 out of twelve students. When the students could not progress as fast as they would like to, they needed counselling to allot more time (TTIME) and improve their learning strategies (TMDEBUG). 9 out of 12 students needed interactions with respect to giving more time to the problem, and three students needed interactions for improving learning strategies. The students needed to be counselled on peer helping (TPQVSPA) since there was a general tendency to share the program once they got it working. When there was a lack of conceptual knowledge, students were referred to internet resources (TRIN), and when the student failed to apply the conceptual knowledge, students were referred to class notes (TRCN). Students would sometimes shift the focus from the difficulty being discussed and needed to be asked to focus (TFOCUS). One student was predominantly accepting the instructor's direct answers without questioning, and there was one discussion on obeying (TOBEYVSAGREE). When other instruction methods did not result in progress, we ask the student to repeat (TREPEAT) an existing program. Table 6 is a summary of codes related to the cognitive domain. Table 7 shows the interaction flow from asking lead questions to direct instruction to help students construct programs. In the actual instruction, the interactions had many variations. Depending on LI's perception of the student's capability, the interaction flow happened. 518 interactions were direct instruction, and 682 interactions were attempts at constructivist approaches to learning. Many interactions resulted in students resolving their difficulties by themselves.  Table 8 is a summary of interactions in the affective domain. Many of the difficulties can only be resolved by dealing with the emotions of the student. Initial emotions of fear get resolved once the student gets familiar with CS0 culture. The need for completion (TNCVSNL) interactions happens when the student submits the working code and is asked by the LI to improve the code. Students may find the request unreasonable since it delays completion and hence they need interaction to make them aware of the emotion. The interactions addressing the need for completion also happens when a student takes a lot of time to complete the program or has to park a problem for the day. Making students aware of this emotion helps them manage their time objectively. Table 9 shows the chat excerpts related to need for completion. LI: Arriving at using arrays to return multiple values from a function was known but was not applied without prompting.

Interactions with students in the affective domain
LI: You didn't do it, that you couldn't is a false statement.
LI: Copying before modification was known but not applied.
STUDENT: I didn't get that idea. STUDENT: I did try, sir.
LI: There were two new things you understood about them but not constructed . . . Do you see that in life, you get only one opportunity to construct?
LI: Didn't try a sufficient length of time.
STUDENT: Yes sir. STUDENT: One day, sir LI: Once you have understood, the opportunity to construct is gone forever and forever, but there are infinite such opportunities, and you have the potential.
LI: Next time, two days before giving up.
STUDENT: Yes, sir. STUDENT: Okay, sir. When students start learning in a constructivist culture, they may not make progress as fast as they wish to or as fast as their peers are progressing, and they tend to judge themselves as incapable or unsuitable for the course wrongly. The students need to be counselled that the brain needs more experiences to learn (TCOUNSEL) and that it is usual for some students to take a longer time to learn. Table 10 shows chat excerpts related to counselling.
Shyness prevents interaction, and it is overcome by the demand to interact with the teacher. When there is a fault in the programs, students feel a loss of face with the teacher. There is a need to address this emotion (TCCVSCS). Consequently, the student spends time defending themselves (TDEFENSE), and making them aware of this helps them listen better. Students also need reassurance that the teacher is not angry or disappointed with the student because of the time it takes to overcome the difficulty(TEMOT). It is often important to reiterate the relationship's nature, which is non-judgmental, empathic, and respectful (TRELATIONSHIP). In one interaction, the student had to choose the right solution overcoming the respect for the teacher (TOBJECTIVITY).

Conclusions
The study is in a situated context and culture, and hence the time estimates and the kinds of interaction are specific to the institution. The result can be generalized to many Indian engineering institutions which are in a similar context. Though the number of students who participated in the CS0 course is small, they represent a large class of students.
The number of credits allotted to the course, the learning outcomes of the course, instruction method and teacher effort should all be aligned for successful implementation of the course. In this study, it was estimated that synchronous one on one interaction time required for teaching students to write a program for an authentic task is between 4 hours to 15 hours. When the objective is to write a program for an authentic task, the instructor will also have to address various metacognitive, affective and cognitive issues that arise during the course. This study categorizes and lists all the interactions that happened during the course. The interaction time estimates and list of kinds of interactions will help the other lab instructors plan and design their instruction. LI: Listen, two things are very important for you. One, you should enjoy the learning, and two, you should accept yourself. If you are not getting it, so be it Is it because of lack of effort or sincerity? STUDENT: Sorry, sir LI: Learning is a continuous process. It is not how many programs you completed. It is how many days you worked.
STUDENT: But sir, for this, I used to spend more than 3 hrs per day.
LI: But you were not communicating. Communication is important, and different people are different. For some, it takes three months on one problem, all of a sudden everything becomes clear, and for some, it is clear on day one. LI: Daily, you spend one hour on programming for the next 6 semesters. You will see the magic.