Implementing Constructivist Ideas in a Functional Programming Curriculum for Secondary School Students
”Migvan” - Research and Development in Computer-Science Education
Department of Education in Science and Technology,
Technion - Israel Institute of Technology, Haifa 32000 ISRAEL
Functional Programming includes complex concepts and advanced ideas such as building abstractions with functions, compound data and list processing. Other core concepts, such as lists and evaluation of expressions, might seem simpler yet prove to be complex for some students, as we will show in this paper. Teaching FP issues to secondary school students gave us an opportunity to rethink our beliefs about Computer Science Education, FP courses, and their implementations in schools. As part of a new CS curriculumfor secondary school students in Israel we developed a FP course, using DrScheme environment, based on recent research in science education that emphasizes the constructivist nature of learning. In this paper we will focus on two of the typical learning obstacles that were found in our field research. One is the conceptual conflict between the functional and the imperative paradigms, and the other is the difficulty to capture the functional evaluation process.
Constructivism, educational research, functional programming, programming paradigms.
As part of a new Computer Science curriculum for secondary schools in Israel, we chose to develop a Functional Programming course. Inspired by excellent sources such as [1,6,7,8,9,10,12] we looked for our unique recipe that will meet the following requirements:
·þThe Israeli CS curriculum is based on Algorithmics via Pascal;
·þFunctional programming is learnt after the first module (in grade 10), and in parallel to the second module (in grade 11), both in Pascal;
·þThis FP module is one of the electives of the “second paradigm” module, intended to introduce a second programming paradigm that is “conceptually different from the procedural approach adopted in the first two modules” .
·þMost CS secondary classes in Israel are heterogeneous with diverse background and student ability.
Considering the above requirements we were faced with the challenge to bring constructivist ideas into our functional programming course.
This paper will combine curriculum and teaching issues with two typical learning obstacles that were found during our field research. One is the conceptual conflict between the functional and the imperative paradigms, and the other is the students’ difficulty to capture the functional evaluation process. These issues will follow a brief discussion of the course.
2. THE FUNCTIONAL PROGRAMMING COURSE FOR SECONDARY SCHOOL
Guided by our holistic approach to course development we try to influence the classroom culture as well as develop written materials for the students and the teachers. Within the culture we wish to foster, we try to “create a supportive climate in the classroom, in which students feel safe to explore, make guesses, and learn from their errors” .
Our drive to create a constructivist learning environment was influenced by recent research in mathematics and science education [2,3,5,14,15,16]. This view guided our decision to introduce most concepts through concrete learning activities, both in the computer laboratory and in regular class settings. These activities are combined of individual investigations, small-group interactions and whole class discussions.
The course is organized around three stages. In the first stage, the students are introduced to the paradigm, the language, and the environment. The second stage is devoted to recursion, while dealing with core concepts like list processing, data abstraction, and higher order functions. The last major part of the course is designed as an integrative phase in which the students work on individual (or group) programming projects. This period serves as a ladder in the spiralstructure of knowledge constructing. The students have to review previous concepts, reflect upon their understandings, and face issues such as complexity and abstraction.
3. A CASE STUDY: ONE SIMPLE TASK
When viewing learning as a gradual construction process, the learning processes become more important than final outcomes and there is a need for the researchers to focus on students’learning processes. In this spirit we wish to share with the readers part of our own learning process as curriculum developers. This process was greatly influenced by our field research. In this section we will demonstrate our work through examining one episode, taken from a lesson on the first month of FP course in 11tgrade. This episode is based on utterances of real students from different classes. It was reconstructed here in order to focus our discussion on the two learning obstacles mentioned earlier. We will start with the episode, discuss teacher roles, continue with research remarks and conclude with curriculum implications.
3.1 The Episode
The students were presented with the following simple task:
Write a function that inputs a list of numbers and returns the sum of the its first two numbers.
Here is the class discourse that followed.
Alex: I know how to do this. You need the plus sign and the first.
Teacher: O.K. could you please tell us how?
Alex: [dictates while the teacher writes on the board] open parenthesis, plus sign, open parenthesis, first, open parenthesis, big L, close parenthesis, close again, second
Benny [intervenes]: No, it’s wrong, you can’t do this!
Cathy: Benny is right. I agree.
Alex: But I’m not finished yet. I’m telling you that it works.
Teacher: Let Alex finish his suggestion first.
Alex: Open parenthesis and the same with second
Teacher: O.K. [writes the following expression on the board - ( + ( first ( L ) ) ( second ( L ) ) ) ]
Benny: You see, I told you Alex was wrong. It has to be first again.
Teacher: Please tell me what to write.
Benny: Erase the second and write first instead [the teacher writes ( + ( first ( L ) ) ( first ( L ) ) ) ]
Cathy: But this is the same as Alex’s solution. You will get an application error.
There are at least two issues here. First, Benny and Cathy refer to different problems in Alex’s suggestion. Second, the simple task turned out to be problematic at least for two of the students.
What is the students’ model of the evaluation process? How do they understand the concept of list? What should the teacher do in this situation? What can we, as researchers, learn from this episode? And how can this discourse influence the curriculum development? In what follows we will briefly discuss these questions.
3.2 The Teachers’ Role
Since “we construct our understandings through our experiences” , the constructivist teacher will try to give Alex and Benny, as well as other students in the class, the opportunity to reconstruct their own understandings.
The teacher is faced with two problematic suggestions on the board:
Alex: ( + ( first ( L ) ) ( second ( L ) ) )
Benny: ( + ( first ( L ) ) ( first ( L ) ) )
There are at least five starting points from here.
1. The teacher could ask for more solutions from other students or ask for more comments on the previous solutions.
2. The teacher could send the students to check these expressions on the computer and use the error messages as a trigger for a joint discussion.
3. The teacher might decide to deal with one problem at a time. In this case, the teacher will have to decide which suggestion should be treated first. Since Benny missed Alex’s real problem, his solution embodies both Alex’s and his own problems. Therefore Benny’s solution is more complex and the teacher might prefer to start with Alex’s suggestion.
4. The teacher could take a didactic interrupt and set the task aside for a few minutes in order to deal with the evaluation model or other FP issues.
5. The teacher could ask Cathy to elaborate on her last comment, hoping that her utterance reveals a good understanding of the evaluation model and could seas a basis for a new taken-as-shared understanding .
All these are possible starting points for teaching routes based on the belief that “concepts cannot simply be transferred from teachers to students - they have to be conceived” .
Choosing any one of these routes does not discharge the teacher from a keen effort toward a better understanding of his students’ cognitive models. This type of effort will be discussed in the next section.
3.3 Research Issues
For us, as educational researchers, the simple sum task turned out to be a rich source of investigations in order to unpack the complexity of the learning situation.
In order to understand what Alex and Benny were thinking about we need to hear their authentic voice. Let us look at their explanations (taken from later interviews).
Alex who suggested (+ (first (L)) (second (L))) explainedthat “I have to tell the computer that L is a list and lists have to come in parenthesis”.
We want to suggest that Alex, being in the middle of a conceptual conflict between the functional and the imperative paradigms, is trying to reconstruct Pascal’s rules concerning variable declaration in this FP environment.
Benny who suggested (+ (first (L)) (first (L))) explainedthat “after we used first, the list gets shorter so the second item is now the first”.
Here we can assume that Benny has difficulties with the functional evaluation process and lacks some understanding of basic mathematics. Like Alex, he is probably influenced by the imperative paradigm and thinks that L’s value is changed by a ‘virtual assignment’ L¬ (rest L). Another explanation could be that Benny has a strong perception of sequential linearity while the functional model requires some understanding of quasi parallelism. Benny does not realize that the same parameter L is given autonomously to all expressions of the ‘same level’ and he seeks for dependence between the first and the second evaluations. This difficulty comes as an addition to the fact that Benny did not notice the problem in Alex’s suggestion.
What can we, as researchers, learn from this episode?
Evidently it is difficult for some students to overcome the paradigm changes. It is also evident that when faced with uncertainty students build their own models of understanding. It is our objective, as researchers, to strive for a better understanding of these models in order to make sense of the learning process. Such an effort could also prove to be useful for curriculum design purposes, as we will suggest in the next section.
We believe that the difficulties some students have might be common among others. We also believe that confronting errors and different models can help students with their own models.
Once we witness such rich episodes, we think of them first as researchers and then as curriculum developers, trying to bring into the course our ‘new understandings’. The development process is spiral as each insight we gain in the field serves as a potential starting point for another development cycle of the improved curriculum.
The above episode can influence the course in several directions. First, we can create a learning activity in which the students will be presented with Alex’s and Benny’s suggestions. They will be asked to determine their opinion and justify it. Second, concerning the issue of evaluation we feel that the students need more help with the model of functional evaluation. Third, we are faced with a considerable amount of findings concerning the issue of the paradigm shift. The sum episode is just one examplefor this phenomenon. We will need further research in order to get a better understanding of this problem, which in time will help us treating the students’ cognitive obstacles in a better way.
In addition to the course materials we feel that our findings should be shared with the teachers in order to strengthen the connection between researchers and practitioners in the CS teaching field. The knowledge gained in research might also help convince teachers in the importance of being attentive to students’ voice, models and understandings.
4. CONCLUDING REMARKS
In this paper we tried to highlight a small portion of our course development process, through a close look at two learning obstacles.
Thanks to its simplicity, functional programming is often recommended as an appropriate paradigm to start Computer Science learning. Although we share this belief, our findings show that this simplicity can turn out to be complex for secondary school students. This does not mean that we should abandon our efforts since Pascal has it’s own problems and obstacles, and we find FP worth fighting for. Further research is needed in order to locate the cognitive factors related to the difficulties here described. Such research can be done by carefully observing and interpreting learning and teaching situations as these naturally happen in the real classroom. The latter refers not just to the research on learning and teaching functional programming but to the educational research of Computer Science in general.
We wish to thank Uri Leron for his comments on earlier drafts of this paper. Our special thanks to Matthias Felleisen, for the enlightening remarks and suggestions.
 Abelson, H., Sussman, G.J., and Sussman, J. Structure and Interpretation of Computer Programs. MIT Press, 1985.
 Ball, D.L. With an eye on the mathematical horizon: dilemmas of teaching elementary school mathematics. The Elementary School Journal, 93 (4), 373-397, 1993.
 Cobb, P., and Steffe, L.P. The Constructivist researcher as teacher and model builder. Journal for Research in Mathematics Education, 14 (2), 83-94, 1983.
 Cobb, P., Yackel, E., and Wood, T. A Constructivist alternative to the representational view of mind in mathematics education. Journal of Research in Mathematics Education 23 (1), 2-33, 1992.
 Conferey, J. A theory of intellectual development. For the Learning of Mathematics, 15 (2), 36-45, 1995.
 Eisenberg, M., and Abelson, H. Programming in SCHEME. The Scientific Press, 1988.
 Felleisen, M., Findler, R.B., Flatt, M., and Krishnamurti, S. How to Design Programs. Rice University, Houston, Texas. 1998.
 Ferguson, I., Martin, E., and Kaufman, B. the Schemer’s Guide. Schemers Inc., 1995.
 Ferguson, I., Martin, E., and Kaufman, B. the Scheming Teacher’s Resource Pack. Schemers Inc., 1995.
 Friedman, D.P., and Felleisen, M. the Little Schemer. MIT Press, 1996.
[þ11þ] Gal-Ezer, Y., Beeri, K., Harel, D., and Yehudai, A. A High school program in computer science. Computer, 28 (10) 73-80, 1995.
 Harvey, B., and Wright, M. Simply Scheme – Introducing Computer Science. MIT Press, Cambridge, Mass., 1993.
 Leron, U. Can we follow what we preach: Teaching according to constructivist principles. CMESG ad hoc discussion group, Regina, Sask., June 1994.
 Pirie, S., and Kieren, T. Creating constructivist environments and constructing creative mathematics. Educational Studies in Mathematics, 23, 505-528, 1992.
 Smith, J.P., diSessa, A.A., and Roschelle, J. Misconceptions reconceived: a constructivist analysis of knowledge in transition. The Journal of the Learning Sciences, 3 (2), 115-163, 1993.
 Von Glasersfeld, E. A Constructivist approach to teaching, in Steffe, L.P., and Gale, J. (eds.), Constructivism in Education, 3-17. Lawrence Erlbaum Associates, Hillsdale, NJ, 1995.