Read, Manipulate, and Write: A study of the role of these cumulative skills in learning computer programming

Similar documents
Improving learning outcomes for first year introductory programming students

A Categorization of Novice Programmers: A Cluster Analysis Study

Performance Assessments in Computer Science. An example of student perceptions

Learning and Teaching

IMPROVING STUDENTS FOCUS IN INTRODUCTORY PROGRAMMING COURSES

Simulated learners in peers assessment for introductory programming courses

Using Visual Logic with Pseudocode to Teach an Introductory Programming Course

PROBLEMS IN PROGRAMMING EDUCATION AND MEANS OF THEIR IMPROVEMENT

Pair Programming Improves Student Retention, Confidence, and Program Quality

Comp151. Definitions & Declarations

Two-Dimensional Parson s Puzzles: The Concept, Tools, and First Observations

Applying GQM Approach towards Development of Criterion-Referenced Assessment Model for OO Programming Courses

RECEPTIVENESS OF EDUCATIONAL MULTIMEDIA TOOLS IN COMPUTER PROGRAMMING EDUCATION

- a literature study for developing visualizations in the Codewitz-Minerva project

Planning a Class Session

nexaminer: A Semi-automated Computer Programming Assignment Assessment Framework for Moodle

Curriculum Map. Discipline: Computer Science Course: C++

INSTRUCTIONAL STRATEGY IN THE TEACHING OF COMPUTER PROGRAMMING: A NEED ASSESSMENT ANALYSES

Eugene Wallingford Department of Computer Science University of Northern Iowa Cedar Falls, Iowa

Difficulties Facing Students in Learning Computer Programming Skills at Tabuk University

Measuring Students' Ability to Read and Understand Computer Programs

Towards the development of a cognitive model of programming; A software engineering proposal

TEAM PLANNING AND REPORTING

What makes the difference, the active learning activities or the technology in the classroom?

Engaging Students Online

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

CodeSkelGen A Program Skeleton Generator

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

Rethinking the First Year Programming Course

Grade Level Year Total Points Core Points % At Standard %

Time needed. Before the lesson Assessment task:

COMPUTER SCIENCE (5651) Test at a Glance

Performance of Students in Computer Programming: Background, Field of Study and Learning Approach Paradigm

KS3 Computing Group 1 Programme of Study hours per week

Introducing Programming into the Physics Curriculum at Haverhill High School Using the R Language

LEARNING TO PROGRAM USING PART-COMPLETE SOLUTIONS

Pre-service Performance Assessment Professional Standards for Teachers: See 603 CMR 7.08

Supporting an Information Systems Curriculum with a Management Science Course. Scott J. Seipel *

Teaching Problem Solving Techniques and Software Engineering Concepts Before Programming

Introductory Problem Solving in Computer Science

Program Visualization for Programming Education Case of Jeliot 3

How To Teach Computer Science In High School

Assessing the Success of an Introductory Programming Course

Teacher Education Portfolio Guidelines and Rubric

Thomas Kuhn and The Structure of Scientific Revolutions

Appendix K Introduction to Microsoft Visual C++ 6.0

Chapter 8 Selection 8-1

Using Graphics in the First Year of Programming with C++

The C++ Language. Loops. ! Recall that a loop is another of the four basic programming language structures

Important Steps to a Career in Higher Education (MA/MS or or PhD)

LEARNING OBJECTS FOR JAVA PROGRAMMING LANGUAGE

Active Learning in Accounting Classes: Three Literacy Strategies

Research Basis for Catchup Math

Fairfield Public Schools

American Journal Of Business Education September/October 2012 Volume 5, Number 5

IT 106 Introduction to IT Problem Solving Using Computer Programming revised

A STATISTICS COURSE FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS. Gary Kader and Mike Perry Appalachian State University USA

Extreme Apprenticeship Method in Teaching Programming for Beginners

Expected Undergraduate Outcomes

TEACHER S GUIDE TO RUSH HOUR

Solving Linear Equations in Two Variables

A General Framework for Overlay Visualization

COMPUTER SCIENCE, BACHELOR OF SCIENCE (B.S.)

Abstraction in Computer Science & Software Engineering: A Pedagogical Perspective

Sample Fraction Addition and Subtraction Concepts Activities 1 3

Critical thinking - applied to the methodology of teaching mathematics

N3458: Simple Database Integration in C++11

Lab Experience 17. Programming Language Translation

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

Elementary Education: Teacher Leadership Track

Aim To help students prepare for the Academic Reading component of the IELTS exam.

Running head: PERSONAL STATEMENT ON LEARNING AND INSTRUCTION 1. Personal Statement on Learning and Instruction. Jay A. Bostwick

Chapter 2: Algorithm Discovery and Design. Invitation to Computer Science, C++ Version, Third Edition

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

Goals for This Lecture:

Requirements EDAM WORD STUDY K-3: PRINT AWARENESS, LETTER KNOWLEDGE, PHONICS, AND HIGH FREQUENCY WORDS

Investigating Difficulties of Learning Computer Programming in Saudi Arabia

Geometry Solve real life and mathematical problems involving angle measure, area, surface area and volume.

Decomposing Numbers (Operations and Algebraic Thinking)

LITERATURE REVIEWS. The 2 stages of a literature review

Pre-Requisites EDAM-5001 Early Literacy Guiding Principles and Language

FROM NUMERICAL EQUIVALENCE TO ALGEBRAIC EQUIVALENCE 1. Rolene Liebenberg, Marlene Sasman and Alwyn Olivier

OBJECTS-FIRST VS. STRUCTURES-FIRST APPROACHES TO OO PROGRAMMING EDUCATION: AN EMPIRICAL STUDY

Solving Algebra and Other Story Problems with Simple Diagrams: a Method Demonstrated in Grade 4 6 Texts Used in Singapore

Chapter One Introduction to Programming

COURSE TITLE. Computer Programming 1 LENGTH. One Semester Grades 9-12 DEPARTMENT. Computer Department Barbara O Donnell, Supervisor SCHOOL

PRECALCULUS WITH INTERNET-BASED PARALLEL REVIEW

Abstract. Introduction

Research Findings on the Transition to Algebra series

Performance Assessment Task Bikes and Trikes Grade 4. Common Core State Standards Math - Content Standards

Common Beginner C++ Programming Mistakes

North Dakota Advanced Placement (AP) Course Codes. Computer Science Education Course Code Advanced Placement Computer Science A

PROJECT THE WIKI WAY: USING WIKI FOR COMPUTER SCIENCE COURSE PROJECT MAN- AGEMENT

A First Course in Software Engineering for Aerospace Engineers

A Comparative Analysis of Preferred Learning and Teaching Styles for Engineering, Industrial, and Technology Education Students and Faculty

EVALUATION AND MEASUREMENT IN MARKETING: TRENDS AND CHALLENGES

Teaching Computer Programming to Non-computer Science Students. Weijun Chen, Xiu Li, Weidong Liu. (pp ) The Asian Conference on Education

G C.3 Construct the inscribed and circumscribed circles of a triangle, and prove properties of angles for a quadrilateral inscribed in a circle.

Sequential Program Execution

PREPARING STUDENTS FOR CALCULUS

Transcription:

Read, Manipulate, and Write: A study of the role of these cumulative skills in learning computer programming Laura Zavala Department of Physics and Computer Sciences Medgar Evers College of the City University of New York It is widely agreed that in the Computer Science discipline a lot of practice is needed, in particular for (computer) programming courses. Introductory programming courses usually have a significant amount of time dedicated to practice, inside and outside the classroom. Some practitioners have noted that, although practice is good, asking novice students to write programs after only teaching them syntax rules and a few examples might not be the right approach. Based on this notion, this paper proposes three phases that students should sequentially master in the process of learning computer programming: code comprehension, code manipulation, and code writing. This paper presents a small-scale study conducted to corroborate this intuition. Students from two introductory programming courses were evaluated on code comprehension, code manipulation, and code writing skills in two different content areas. The results obtained are in line with our intuition that these are skills that students should sequentially master in the process of learning to write programs. Corresponding Author: rzgutierrez@mec.cuny.edu Introduction High failure rates abide in introductory computer programming courses (CS1) all over the world with a pass rate estimated to be around 63%. This has motivated many researchers to search for causes and solutions to the problem. The literature abounds with research on pedagogies and innovative approaches for CS1 courses, specifically, active and collaborative learning approaches such as pair-programming, peerlead instruction, flipped classrooms, and live coding [1][2][3][7][8][9]. Regardless of the approach used and the degree to which it is used in the classroom, the need for considerable practice in CS1 courses is indisputable and widely acknowledged. The degree and approach used might not make a big difference as long as practice is guaranteed. It is the type of practice given to students that needs further consideration. Practice in programming courses is most of the time equated with programming and more specifically with writing code. This might be adequate for advanced, upper-level courses. However, for CS1 courses, the fact that code comprehension skills are a precursor to code writing skills should not be ignored; practice of the former should be ensured before asking students to do the latter. Some practitioners have discussed the need for a reading before writing approach in CS1 courses [4][1][11][12][13]. The underlying idea is inspired in the observation that children learn to write after they have spent several years of reading (or rather, being read to) and speaking the language. By the time they are asked to write, they have been exposed to the syntax and semantics of the language, as well as different models of writing. The same underlying idea has been explored in other problem solving oriented disciplines. For example, Sweller and Cooper [5] compared the efficacy of a worked-examples approach versus a problem-solving approach. In their experiments, some students learnt certain algebraic processes by solving problems, while other students learnt the same algebraic processes by studying complete solutions to those problems (i.e. worked examples). They found that students who learned algebra with worked examples performed significantly better than those who were asked to solve problems instead. The analogous reading before writing approach in CS1 courses is more of a read before you manipulate and manipulate before you write approach. Students should be able to not only read code before they can write code, but also they should be able to manipulate code that is given to them (i.e. modify or use). Formally, there are three phases that students should sequentially master in the process of learning to write programs: code comprehension, code manipulation, and code writing. This paper presents the results of a study conducted at a small urban college with the goal of corroborating this intuition. Although it can be argued that code comprehension and manipulation work is covered in CS1 courses through sample solutions, design roadmaps, implementation hints, and starter code, the emphasis is, by far, on code writing. Further, providing students with all these resources does not really constitute practice on

code comprehension and manipulation; it is not the main focus. Finally, students are rarely or never assessed on these skills to ensure that they are ready to start writing code. Background Linn and Clancy [12] emphasize the importance of learning patterns of program design. They propose the use of programming case studies to teach students program design skills. They argue that novice students should be exposed to many case studies before they can design and write their own programs. The authors used this approach for several years at Berkeley and they reported significant improvement in students design skills. In a similar effort, Kirschner, Sweller, and Clark [6] recommend providing students with worked examples and process worksheets, which should provide a description of the steps they should go through when solving the problem as well as hints or rules of thumb that may help to successfully complete each step. In [4], an ITiCSE conference working group presents an assessment developed to evaluate the programming competency of students that have completed their first one or two courses in computer science. As a result of applying the assessment to a large population of students from different universities, they established that many students do not know how to program at the conclusion of their introductory courses. In the search for a cause to this problem, Lister et al. [13] tested students from seven countries at the conclusion of their CS1 courses on two abilities: (i) their ability to predict the outcome of a program, and (ii) their ability to complete a near-complete program. The authors note that poor performance in one or both abilities might be an explanation for the fact that many students do not know how to program at the conclusion of their introductory courses. This work is closely related to that presented in this paper. An important difference is that they only test students on code comprehension skills and speculate on a relation of those skills to the ability of students to write code. The work presented in this paper examined that assumption given that students were tested on both, code comprehension skills as well as code writing skills of similar complexity. Problem formulation The high-level goal for the study presented in this paper was to collect initial data to shed light into the belief that (1) code comprehension, (2) code manipulation, and (3) code writing are phases that students should sequentially master in the process of learning to write programs. The specific goal was to answer the following questions: a) Do (most or all) students that show proficiency in a given skill also possess proficiency in the skills that precede it in the sequence? b) Do (most or all) students who show deficiency in, or lack of, a given skill, also lack the skills that follow it in the sequence? Methodology Students from two introductory programming courses were evaluated on their code comprehension, code manipulation, and code writing skills in two different content areas. Code comprehension is the ability of students to understand a code fragment or a program. Some ways to assess this skill include asking students to (i) select the piece of code, from a set of choices, that performs a specific task; (ii) verbally describe what a code fragment or program does, (iii) indicate what is the value returned by calling a given function with specific argument values; (iv) indicate what a program would display on screen when it runs; (v) indicate what the value of one or more variables is after executing a code fragment or program; and (vi) identify the part of a program where a specific action is carried. Code manipulation involves using or modifying existing code. The skill can be assessed with exercises where students have to be able to manipulate existing code, such as: (i) completing a piece of code (either by writing the missing code, or choosing it out of a set of choices), (ii) writing function calls to provided functions so that a specific result is obtained; (iii) building a program from a set of fragments of code, not all of which might be part of the solution; (iv) reordering a scrambled program. Code writing is the ability of students to write code for a given task (even if provided with a similar example and its solution). Assessment of this skill is widely carried and the straightforward and widely used method is to redact the specification of a task or problem, for which the student has to write a code fragment or program that carries out such task or constitutes the solution to the problem. The following two content areas were used for the evaluation: arrays using for loops and C++ STL container classes. The first area was evaluated in a first Object Oriented Programming (OOP) course (group 1). The second area was evaluated in the next course in the sequence (group2), where students learn about data structures and algorithms. Both courses are taught using the C++ programming language. The assessment instrument was a quiz containing four code comprehension questions, two code manipulation exercises, and two code writing exercises, all of similar complexity. The quiz was administered by phases: first,

the code writing exercises, then the code manipulation exercises, and at the end, the code reading questions. Students worked on each phase one at a time and had no access to the questions on the other sections. Content area: arrays using for loops. The questions consisted of a short program containing one or two arrays that are manipulated through one or two for loops. For the code comprehension questions, students were asked to indicate what the program would display on screen when it runs. The code manipulation exercise consisted of a scrambled program that students had to order. In the code writing exercise, students were asked to write the for loop. Figure 1 shows some of the questions in this content area. Content area: C++ STL container classes. The questions consisted of short programs where data are inserted into one or two C++ STL container objects. Then, after some operations are performed on the container objects, their content is displayed to screen. For the code comprehension questions, students were asked to indicate what the program would display on screen when it runs. For the code manipulation exercises, students were asked to sort a scrambled program. The code writing exercises required students to write the program from scratch. Figure 2 shows some of the questions in this content area. What will be the output of the following program? In other words, what is printed to screen when you run it? #include <iostream> using namespace std; int main () { int foo []={ Matt, Jen, Andy, Zoe, Ted, Zane, Mike, Rob, Alice }; for (int index=; index<9; ++index) { if (foo[index]> Matt ) cout << foo[index] << endl; } return ; } (a) Assume there is an array of string values called names where the names of 1 students have been stored. Assume further that there is an array of float values named grades where the corresponding grades of those students have been stored. Write a for loop to print the names of the students who have a grade greater than 5. Figure 1. Questions given to group 1: (a) code comprehension; (b) code writing (b) What will be the output of the following program? In other words, what is printed to screen when you run it? #include <iostream> #include <map> #include <string> using namespace std; int main ( ){ map<string, string> actors; actors.insert(make_pair( Mark Ruffalo, The Avengers )); actors.insert(make_pair( Mark Ruffalo, The Avengers: Age of Ultron )); actors.insert(make_pair( Hugh Jackman, X-Men )); actors.insert(make_pair( Hugh Jackman, The Wolverine )); actors.insert(make_pair( Scarlett Johansson, The Avengers )); actors.insert(make_pair( Scarlett Johansson, The Avengers: Age of Ultron )); cout << ACTORS AND THEIR MOVIES: << endl; for (map<string, string>::iterator it= actors.begin(); it!= actors.end(); it++) cout << (*it).first << - " << (*it).second << endl; } Figure 2. Code comprehension question given to group 2

Results Code comprehension questions were worth 1 points each, for a total of 4 in that section. Code manipulation questions were worth 15 points each, for a total of 3 in that section. Code writing questions were worth 15 points each, for a total of 3 in that section. Tables 1 and 2 show the results for each student in terms of percentage grade in each section. Students have been anonymized. Figures 3 to 6 show a summary of the results. The stacked line charts in Figures 3 and 4, in which the cumulative scores by level are plotted, show that code reading is the most dominant skill, followed by code manipulation, while code writing is the weakest one. The same pattern is shown in Figures 5 and 6, where the number of students with a score greater than for each skill has been plotted. The pattern is less steep for group 2 because some students scored higher at code manipulation than at code reading. This might be explained by the fact that their mistakes in the reading questions had more to do with the properties of the data structures that were particularly used. For example, the C++ map container (Figure 2) does not allow repetition of a key value and the elements are always sorted by it. Incorrect student answers would either show repeated values or show the elements unsorted. Conclusions Based on the expressed need of a reading before writing approach for CS1 courses, an analogous approach has been presented that is more of a reading before manipulating and manipulating before writing approach. Students should be able to not only read code before they can write code, but also they should be able to manipulate code that is given to them. To shed light on the validity of this claim, a small-scale study was conducted where students code comprehension, code manipulation, and code writing skills in two different content areas were evaluated. The results obtained are in line with the original premise that code comprehension, code manipulation, and code writing are phases that students should sequentially master in the process of learning computer programming. However, since the author teaches at a small school, extensive quantitative assessment is not possible. Therefore, this work is continuing in collaboration with colleagues at larger institutions to conduct similar experiments at their colleges. Further, the experiment will be conducted with a larger pool of computer science students at the original institution, not only with those in introductory programming courses. Student Scores (%) Average S1 82.5 8 66.66 76.38 S2 1 86.66 86.66 91.1 S3 82.5 66.66 5 66.38 S4 75 5 41.66 S5 5 16.66 22.22 S6 5 33.33 27.77 S7 1 86.66 66.66 84.44 S8 62.5 16.66 16.66 31.94 S9 1 5 33.33 61.11 S1 37.5 12.5 S11 82.5 66.66 66.66 71.94 Average 74.77 5.3 35.15 Table 1. Results by learning-to-code skill (level) for each student in group 1 Student Scores (%) Average S1 87.5 1 73.33 86.94 S2 87.5 5 5 62.5 S3 75 73.33 5 66.11 S4 8 83.33 66.66 76.66 S5 1 1 1 1 S6 62.5 66.66 33.33 54.16 S7 62.5 2.83 S8 37.5 33.33 33.33 34.72 S9 62.5 66.66 5 59.72 S1 87.5 1 83.33 9.27 S11 87.5 1 83.33 9.27 S12 1 1 1 1 Average 75.5 72.78.28 Table 2. Results by learning-to-code skill (level) for each student in group 2

1 9 8 7 5 4 3 2 1 S11 S1 S9 S8 S7 S6 S5 S4 Figure 3. Group 1 cumulative scores by level 1 9 8 7 5 4 3 2 1 Figure 4. Group 2 cumulative scores by level S12 S11 S1 S9 S8 S7 S6 S5 S4 S3 S2 S1 12 12 1 1 8 8 6 6 4 4 2 2 Level 1 > Level 2 > Level 3 > Level 1 > Level 2 > Level 3 > Figure 5. Number of students from group 1 with a score greater than Figure 6. Number of students from group 2 with a score greater than

References 1. Leo Porter and Beth Simon, Retaining nearly one-third more majors with a trio of instructional best practices in CS1, in Proceedings. ACM Computer Science Education (SIGCSE '13). 44th Annual Technical Symposium (213): 165-17, ACM. 2. A. Robins, J. Rountree, and N. Rountree. Learning and teaching programming: A literature review, Computer Science Education 13, no. 2 (23): 137 172. 3. A. Sanwar, Effective teaching pedagogies for undergraduate computer science, Mathematics and Computer Education 39, no. 3 (25): 243 257. 4. McCracken, M., V. Almstrum, D. Diaz, M. Guzdial, D. Hagen, Y. Kolikant, C. Laxer, L. Thomas, I. Utting, T. Wilusz, A Multi- National, Multi-Institutional Study of Assessment of Programming Skills of Firstyear CS Students, SIGCSE Bulletin 33, no. 4 (21): 125-14. 5. Sweller, J., & Cooper, G. A., The use of worked examples as a substitute for problem solving in learning algebra, Cognition and Instruction 2, no. 1 (1985): 59 89. 6. Kirschner, P.A., Sweller, J., and Clark, R.E., Why minimal guidance during instruction does not work: an analysis of the failure of constructivist, discovery, problem-based, experiential, and inquiry-based teaching, Educational Psychologist 41, no. 2 (26): 75-86. 7. Judith D. Wilson, Nathan Hoskin, and John T. Nosek, The benefits of collaboration for student programmers, in Proceedings. ACM Computer Science Education (SIGCSE '93). 24th Annual Technical Symposium (1993): 165-17, ACM. 8. Henry M. Walker. 211, A lab-based approach for introductory computing that emphasizes collaboration, in Proceedings. Computer Science Education Research Conference (211): 21-31, Open Universiteit, Heerlen. 9. Marc J. Rubin. 213, The effectiveness of live-coding to teach introductory programming, in Proceedings. ACM Computer Science Education (SIGCSE '13). 44th Annual Technical Symposium (213): 651-656, ACM. 1. Mark Guzdial and Judy Robertson, Too much programming too soon?, Communications of the ACM 53, no. 3 (March 21): 1-11, ACM. 11. Mark Guzdial. 215, What's the best way to teach computer science to beginners?, Communications of the ACM 58, no. 2 (January 215): 12-13, ACM. 12. Marcia C. Linn and Michael J. Clancy. 1992, The case for case studies of programming problems, Communications of the ACM 35, no. 3 (March 1992): 121-132, ACM. 13. Raymond Lister, Elizabeth S. Adams, Sue Fitzgerald, William Fone, John Hamer, Morten Lindholm, Robert McCartney, Jan Erik Moström, Kate Sanders, Otto Seppälä, Beth Simon, and Lynda Thomas, A multi-national study of reading and tracing skills in novice programmers, Working group reports from ITiCSE on Innovation and Technology in Computer Science Education (24): 119-15, ACM.