Experimenting with Pair Programming in a 2 year Java Programming ...

4 downloads 191576 Views 85KB Size Report
(CSC 2102) course at Department of Computer Science,. International ... programming as one of the key practices in all phases of software production (Beck [1]).
Experimenting with Pair Programming in a 2nd year Java Programming Course Norsaremah Salleh

Azlin Nordin

Hamwira Sakti Yaacob

Department of Computer Science International Islamic University Malaysia [email protected]

Department of Computer Science International Islamic University Malaysia azlin @kict.iiu.edu.my

Department of Computer Science International Islamic University Malaysia [email protected]

ABSTRACT This paper reports on an experiment in practicing pairprogramming technique in the teaching of Java Programming (CSC 2102) course at Department of Computer Science, International Islamic University Malaysia. The aim of the experiment is to seek the efficacy of the technique, whether or not it can affect the students’ enjoyment, preferences in completing the assignments and confidence level when learning Java programming language. Our result indicates that the majority of the students enjoy learning Java when program using pairs. We also found that the students felt more confident and many preferred to use this technique in solving the problem. The results showed no contrast to some of earlier studies conducted by other researchers in [11, 12, 19].

Categories and Subject Descriptors k.3.2 [Computer and Information Science Education]: Computer Science Education

General Terms: measurement, experimentation Keywords: CSC 2102, pair programming, Java Programming, Computer Science Education

1. INTRODUCTION In recent years, pair programming has emerged as one important pedagogical approach in Computer Science/Software Engineering (CS/SE) teaching (Cliburn [4]). It requires informal activities of two persons to work collaboratively on the given assignment related to software development (Williams et. al [15]). According to Williams et. al [17], pair programming refers to a practice in which two programmers work collaboratively using one computer and working on the same design, algorithm, code, or test. The pair consists of two developers who change their roles alternately as the driver and reviewer. The driver is someone who is actively using the computer and having control of resources (keyboard, mouse etc) and the reviewer will actively perform

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. MySEC’07, Dec, 2007, Selangor, Malaysia. Copyright 2007 ACM 1-58113-000-0/00/0004…$5.00.

mental observation on the code functionality, maintaining active communication with the driver (Williams et. al [19]). Traditional methods generally require students to solve programming problems individually. However, it is important to realize that pair programming can significantly increase the students study performance and create enjoyment of the learning process (McDowell et. al [10], Werner et. al [13]). Due to the importance of pair programming, Extreme Programming (XP), an emerging software development methodology, has mandated pair programming as one of the key practices in all phases of software production (Beck [1]). The evidence of XP’s success has aroused many Software Engineering researchers and consultants to apprehend the use of pair programming in the CS educational setting. In our study, we investigated similar issues to those reported in [10]. In particular, we are interested in answering the following research questions: RQ1: Do students enjoy learning programming using the pair technique? RQ2: Does pair programming increase students’ confidence level in solving the programming problem? RQ3: Do students prefer to use pair programming when completing their assignments? RQ4: Does pair programming help improve students understanding of a difficult topic? The study took place in Semester 1, 2006/2007 at the International Islamic University Malaysia. The detailed discussion on the methodology and data analysis results can be found in Section 3 and Section 4. Finally, we conclude the discussion in Section 5.

2. PREVIOUS STUDIES Pair programming has been found to be very beneficial in a Computer Science (CS) educational setting (Werner et. al. [13]). Much of the earlier studies on pair programming in an academic environment have concentrated on establishing the efficacy of the practice for educating students (Katira et. al [7]). Williams et. al [20] studied pair programming at North Carolina University to access the affordability of the technique in an introductory CS course. The results indicate that students who pair programmed are more self-sufficient, perform better on projects, and are more likely to complete the course with a C grade or better. In the empirical studies conducted in [19] for instance, the researcher suggested that the use of pair programming can help students to achieve better grades and the result showed that

students are more likely to be registered in the CS related major. In addition to that, initial research results in [16] indicate that higher quality code will be produced through the pair programming practices without significant increase in time and cost. These observations inspired further research to explore the potential of pair programming practices in CS education. A study conducted in [14] had shown that the pair programming behavior such as “pair-pressure” and “pair-learning” is beneficial to the quality of work being produced. It enables the students to learn the new programming language much faster and better compared to solitary learning. The research findings in [11] also indicate that the use of the technique is important to improve the educational outcomes and enjoyment of students. McDowell et. al [10] conducted research on the impact of pair programming on student performance, perception and persistence. In the study, they found that students who paired could produce better programs and feel more confident in their solutions and enjoyed completing the assignment compared to program alone. Consequently, the tendency towards course completion is higher through pair programming and thus encouraged the students to pursue CS degrees. In summary, many of the previous studies have mainly concerned conducting experiments on the pair programming practices in Computer Science courses to observe the benefits of the technique. The research results indicated that the use of pair programming pedagogy enable the students to achieve: i) higher quality code [10]; ii) decrease time to complete program [16]; iii) greater understanding [6]; iv) increased enjoyment of programming [10,11,12,19]; v) improved course completion rate [10]; vi) improved performance on exam [11,12,19]; and vii) helps female students to work more efficiently in programming tasks [6]. Despite the benefits for students, the pairing works may also help the instructors in reducing the workload especially in the process of grading the assignments. The research conducted in the earlier studies has aroused the motivation of the author to experiment with this technique in the Java Programming course at International Islamic University Malaysia.

3. METHODOLOGY An experiment was held at the International Islamic University Malaysia during Semester 1, 2006/2007 session. The experiment was part of a Java Programming (CSC 2102) course which was conducted twice per week with 90 minutes per session. The course carries three (3) credit hours and lasts for 14 weeks. Students attended lectures for three (3) hours per week. The first two authors are the instructors of the course. Course assessment was based on three (3) mandatory assignments (20%), Quizzes (15%), Mid Term (15%), Project (10%) and Final Exam (40%). Tutorials were conducted in separate sessions where attendance is not compulsory. The students, however, were required to practice the pair programming technique during the tutorial session conducted by the tutor.

3.1 Subjects Of the 70 undergraduate students enrolled, 21% intended to obtain Bachelor of Computer Science, 79% Bachelor of Information Technology. Only 34 students had voluntarily participated in the

studies, where they would have to work in pairs for all the assignments. The remaining students had chosen to program alone in all assignments. In order to register for this course, all students had to pass the prerequisite course which is Structured Programming Language (CSC 1101). Our students comprises of both international and local students where almost 40% of the population are international students.

3.2 Experiment Design During the first class of the semester, the students were given a brief 15 to 20 minutes description about pair programming technique. In addition to that, they were requested to read an article by Williams and Kessler on “All I Really Need to Know About Pair Programming I learned in Kindergarten” [15]. The purpose of the briefing and the article was to give them clear idea on what is it pair programming means. During the lab session, students were requested to practice the pair programming technique in solving the lab exercises and assignments. Assignments were graded based on the pairing work whereby lab exercises were optional and submission was not required. In order to evaluate the students’ performance, the grading on quizzes, mid term and final exam were based on individual performance. The CSC 2102 course consisted of two parts: Part I introduced objects and classes concepts, developing methods, operations and decision construct, looping constructs, encapsulations, constructors, arrays and inheritance and polymorphism. In Part II, students were taught on building Java GUI application using Swing components, applying event handling and creating Java Applets. Students were recommended to use Netbeans as IDE in developing the programs. The assignments given to students covered both parts of the course outline. Table 1 lists the programming assignments given in the offering semester of the CSC 2102 course. Table 1: CSC 2102 programming assignments # Description Topics 1 Write a program to compute electricity objects and bill based on values input by user. classes, Formula is given and student is expected methods to display the result according to format specified. 2 Based on a class diagram of Books Array of object, write program to create an array objects of books object. The program should be able to retrieve the cheapest and the most expensive price of book besides perform searching based on the ISBN. 3 Develop an application to store and Inheritance, manipulate data on students including Polymorphism, their name, matric number, program, Abstraction kulliyyah and marks from a set of tests. Class diagram of Student class is given. Program should cater for both types of students: undergraduate or postgraduate 4 Write a GUI application that keep GUI/swing track students’ test and calculate the average marks. It should display either numeric or letter-based grade. Sample of GUI is depicted as in Figure 1.

Table 3: Frequency of Student's Enjoyment and Confidence Level when using PP

Figure 1: Sample output of GUI based assignment The students were required to complete three assignments over a period of eight weeks. In week twelve, questionnaires were distributed to the students for data collection and further analysis. The questionnaire was designed in a similar form to the one used by Williams et. al. at North Carolina University [17].

Criteria

SA

A

D

SD

Enjoyment Confidence level

17

14

2

1

Missing Data -

16

15

-

2

1

Figure 2 shows the summary of data based on the students’ confidence. The overall result shows that, students are more enjoyed and confident in their solution when pair program as compared to program alone. 91.2% of total respondent agree and strongly agree that pair programming affects their level of confidence in solving the programming problem. In the questionnaire, we rank the questions in Part 2 using a 4 point Likert scale as follows: 1 – Strongly Agree; 2 – Agree; 3 – Disagree; 4 – Strongly Disagree

4. RESULTS

4.1 Student’s enjoyment and confidence level Considering the data collected from the questionnaires, in most cases students who pair programmed enjoyed the collaborative experience. The positive outcome also appeared since their confidence level is higher due to program using pair. Table 2 summarizes the percentage of data obtained, whereas Table 3 shows the frequency data. Out of 34 respondents, a total of 31 students agree that pair program causes enjoyment in their tasks enabling them to solve the programming problem more easily (See Table 3). Table 2: Percentage of Student's Enjoyment and Confidence Level when using PP Criteria

SA

A

D

SD

Enjoyment Confidence level

50%

41.2%

5.9%

2.9%

Missing Data -

47.1%

44.1%

-

5.9%

2.9%

(SA – Strongly Agree; A – Agree; D – Disagree; E – Strongly Disagree)

Strongly Disagree

Confident

In this section, we present the results of our experiment. Our focus has been on trying to determine the effect of pair programming on student’s enjoyment, preferences and confidence level when practicing the technique. We also are interested to see whether the pairing pedagogy helps improve students’ understanding in solving the problem. One important assumption in this study was that all of the students have adequate and similar levels of experience in programming. In order to enroll to this course, students must have obtained a minimum of grade ‘C’ for the prerequisite course which is an introductory programming course or Structured Programming Language (CSC 1101). None of the students in our study had any industrial or formal experience in programming.

n=2

Disagree

Agree

n=15

Strongly agree

n=16

10%

20%

30%

40%

50%

Pe rce nt

Figure 2: Students confidence with pair programming The analysis of data using SPSS 13 indicates evident that students enjoyed doing program with pair (x = 1.62). The mean of less than 2.5 shows that the students agreed with the statements put forward to them. Meanwhile, similar outcomes appear for the results of students’ confidence level when using pair programming (x = 1.64). It shows that the majority of the students agree that PP can increase their confidence.

4.2 Preferences to use pair program When asked about the students’ preferences in practicing pair programming while completing their tasks, the result in Table 4 shows that 52.9% had chosen to pair program. This indicates that the tendency is more on using pair programming rather than program alone. Further investigation can be done to find out reasons not to opt for pair programming or other factors that might hinder the motivation of the students from using it. In a study performed by Katira et. al [7] for instance, compatibility of a student can be affected by personality type, perceived and actual skills, as well as differences in gender.

partner, rather than looking for lecturer’s availability to entertain their questions while in the lab. Other students mentioned that:

Table 4: Student’s Preferences Statement Almost all assignments were completed with pair About half of the assignments were completed with pair Very few, of assignments were completed with pair Total

Frequency

Percent (%)

18

52.9

9

26.5

7

20.6

34

100.0

4.3 Usefulness of pair programming In addition to the students’ enjoyment and confidence level, the final research question concerns whether pair programming helps improve students understanding or not. The result appears to be very positive. The majority of the students agree that pair programming helps them to improve their understanding especially of difficult topics. The data for the usefulness of the pair technique is shown in Table 5. In the absence of pair programming, the result shows that many students would have to struggle to complete the assignments and worst-case is that they were unable to do it by themselves. The result shows that 82.35% of the students agree that they have difficulties to program alone whereby only 14.7% of the students do not encounter any problems if doing it alone. Only a single student was found to be very sure that he/she did not face any difficulties in completing the assignment. Table 5: PP helps improve student’s understanding Statement Pair programming helped me understand that topic better, because I got to discuss it with my partner I think I would have understood the topic better if I had done the assignment by myself There was no topic in the course that I found particularly challenging, so I cannot answer this question Total

Frequency

Percent (%)

28

82.35

5

14.71

1

2.94

34

100.0

4.4 Experience with pair programming When asked about the students experience in practicing pair programming in the laboratory and tutorial sessions, we received various comments noted in the questionnaire. One student, for example, said: “I managed to benefit a lot with pair programming in terms of knowledge especially in the areas where I do not understand.” This statement indicates that the students like the idea of discussing, doing and thinking together to resolve the programming problem. Certainly, it is a lot easier to refer to their

“It helps me in completing the tasks. Two heads are better than one.” “It really works for me because when I get it blurred, my partner will try to resolve it” Obviously, pair programming requires two people to work together and it works when the pair is compatible with each other. Since the practice was monitored in a closed lab, instructors can ensure that both students played their role equivalently as driver and reviewer. It is not the case of pair programming where one student is doing the coding while his/her partner is doing something else. Both students must collaborate on the same task. Overall, we found that many students gave similar feedback. They like the idea of solving assignments collaboratively.

5. THREADS TO VALIDITY In assessing the validity of a research methodology, Leedy et. al [9] suggested that the internal and external validity should be mentioned explicitly to allow accurate and meaningful results being drawn from a study. To ensure the internal validity of a research study, we should have sufficient controls to minimize bias or to eliminate other possible explanations for the results. In our study, the thread to validity is the pairing assignment. The pair chose their own partner and they worked together throughout the semester. This could possibly bias the result due to differences in personality type, academic qualification as well as their skill level. Pairing students where both have high technical skills will definitely yield greater productivity as compared to a pairing of novice students. Since this is our initial experiment of the technique, we only interested in seeking students’ perception in practicing pair programming. In our study, we also did not record the time to complete the assignments (time log) and monitoring of the practice was done only during lab sessions. In the tutorial session, it is only optional to use the technique and thus cannot be used as the basis to record any data. The tutor however was aware of the practice and encouraged the students to apply it.

6. CONCLUSIONS Our results show that the pair programming technique contributes to enhance students’ understanding of coding assignments, increases their satisfaction, enjoyment and also their confidence level. The efficacy of the technique can be seen from the data that supports its use since the majority of students who participated preferred to program in pair rather than working alone. In order to further observe the adaptation of this practice, the author plans to compare the grades obtained by the students practicing the technique and those not using it. Our current findings seem to confirm previous studies of pair programming [8, 9 -11, 17] that support the use of the technique in teaching programming courses. Through pair programming, students felt more enjoyment and confidence in solving programming assignments. Besides that, it provides greater understanding in program comprehension. Thus, quality learning and teaching in CS/SE education can be achieved with the correct implementation of the technique.

Development and Design Computer Science Course, Proceedings of ITiCSE’05, June 2005, pages 296-300, 2005.

7. ACKNOWLEDGMENTS The author would like to thank Dr Laurie Williams for allowing us to use the set of questionnaires and for her encouragement. We also dedicate special thanks to Dr Emilia Mendes for her kind support and encouragement as well as spending her precious time in giving feedback on this paper.

[12]

E. Mendes, L. B. Al Fakhri, A. Luxton-Reilly, A Replicated Experiment of Pair-Programming in a 2nd year Software Development and Design Computer Science Course, Proceedings of ITiCSE’06, 2006.

8. REFERENCES [1]

K. Beck, Extreme Programming Explained: Embrace Change, Reading, PA: Addison-Wesley, 1999

[13]

[2]

J. Bevan, L. Werner, and C. McDowell, Guidelines for the use of pair programming in a freshman programming class, Proceedings 15th Conference on Software Engineering Education and Training, 25-27 Feb. 2002, pages 100 – 107, 2002.

L. L. Werner, B. Hanks, C. McDowell, PairProgramming helps female computer science students, ACM Journal of Educational Resources in Computing, Vol. 4, No. 1, March 2004, 2004.

[14]

E.A. Chaparro, A. Yuksel, P. Romero, and S. Bryant, Factors affecting the perceived effectiveness of pair programming in higher education, Proceedings 17th Workshop of the Psychology of Programming Interest Group, June 2005, pages 5 – 18, 2005.

L. Williams, and R.R Kessler, The effects of “pairpressure” and “pair-learning” on software engineering education, Proceedings 13th Conference on Software Engineering Education & Training, 6 – 8th March 2000, pages 59 – 65, 2000.

[15]

L. Williams, and R.R Kessler, All I really need to know about pair programming I learned in kindergarten, Communications of the ACM, May 2000, 43(5), 2000.

[16]

L. Williams, R.R. Kessler, W. Cunningham, and R. Jeffries, Strengthening the case for pair programming, IEEE Software, 17(4), July – Aug. 2000, pages 19 – 25, 2000.

[17]

L. Williams and R. Kessler, Pair Programming Illuminated, Reading, Massachusetts: Addison-Wesley, 2003.

[18]

L. Williams, L. Layman, J. Osborne, and N. Katira, Examining the compatibility of Student Pair Programmers, the Agile 2006 International Conference, 2006.

[19]

L. Williams, C. McDowell, N. Nagappan, J. Fernald, and J. Werner, Building pair programming knowledge through a family of experiments, Proceedings International Symposium Empirical Software Engineering, 30 Sept. – 1 Oct. 2003, pages 143 – 152, 2003.

[20]

L. Williams, K. Yang, E. Wiebe, M. Ferzli, C. Miller, Pair Programming in an Introductory Computer Science Course: Initial Results and Recommendations, Proceedings of OOPSLA, 4th Nov. – 8th Nov. 2002, 2002.

[3]

[4]

D.C. Cliburn, Experiences with pair programming at a small college, Journal of Computing Sciences in Colleges, October 2003, 19(1), 2003.

[5]

H. Gallis, E. Arisholm, and T. Dyba, An initial framework for research on pair programming, Proceedings International Symposium on Empirical Software Engineering, 30 Sept. – 1 Oct. 2003, pages 132 – 142, 2003.

[6]

C. Ho.; Slaten, K.; Williams, L.; and Berenson, S., Examining the Impact of Pair Programming on Female Students, NCSU Technical Report, TR-2004-20, June 17, 2004.

[7]

N. Katira, L. Williams, E. Wiebe, C. Miller, S. Balik, and E. Gehringer, On understanding Compatibility of Student Pair Programmers, Proceedings of the 35th SIGCSE technical symposium on Computer Science Education, March 2004, 2004.

[8]

N. Katira, L. Williams, and J. Osborne, Towards Increasing the Compatibility of Student Pair Programmers, Proceedings of the 27th International Conference on Software Engineering, May 15 – 21, 2005, 2005.

[9]

P. D. Leedy, J. E. Ormrod, Practical Research Planning and Design, Pearson Merril Prentice Hall, 2005.

[10]

C. McDowell, L. Werner, H.F. Bullock, J. Fernald, The impact of pair programming on student performance perception and persistence, Proceedings 25th International Conference on Software Engineering, 3 – 10 May 2003, pages 602 – 607, 2003.

[11]

E. Mendes, L. B. Al Fakhri, A. Luxton-Reilly, Investigating Pair Programming in a 2nd year Software