#### DMCA

## UvA-DARE (Digital Academic Repository) Paradigms and laboratories in the core computer science curriculum: An overview Paradigms and laboratories the core computer science curriculum in An overview

### BibTeX

@MISC{Hartel_uva-dare(digital,

author = {P H ; Hartel and L O Hertzberger and Pieter H Hartel and L O Hertzberger},

title = {UvA-DARE (Digital Academic Repository) Paradigms and laboratories in the core computer science curriculum: An overview Paradigms and laboratories the core computer science curriculum in An overview},

year = {}

}

### OpenURL

### Abstract

Abstract Recent issues of the bulletin of the ACM SIGCSE have been scrutinised to find evidence that the use of laboratory sessions and different programming paradigms improve learning difficult concepts and techniques, such as recursion and problem solving. Many authors in the surveyed literature believe that laboratories are effective because they offer a mode of learning that complements classroom teaching. Several authors believe that different paradigms are effective when used to support teaching mathematics (logic and discrete mathematics) and computer science (programming, comparative programming languages and abstract machines). Precious little evidence by way of reported results of surveys, interviews and exams was found in the ACM SIGCSE bulletins to support these beliefs. Introduction Over the years, computer science (CS) has evolved from a single discipline into a number of related disciplines. The 1991 ACM/IEEE-CS Computing Curricula report • Department of Computer Systems, University of Amsterdam, Kruislaan 403, 1098 SJ Amsterdam. The Netherlands pieter@fwi.uva.nl A host of non-core (peripheral) topics are now firmly established. These include databases, artificial intelligence, symbolic and numeric computation and human-computer interaction. The Computing Curricula report recommends that just over 10% of the lecture hours should be spent on these peripheral subjects. The number of applications of CS is on the increase. This has caused two separate trends. Firstly, some CS curricula are being expanded to contain more peripheral CS topics. Secondly, many non-CS curricula now include the study of some CS topics. Many departments that started out as pure CS departments have acknowledged these developments and are now offering a number of different curricula, often in combination with subjects such as psychology, business studies, law, medicine, languages, physics etc. While previously a universitv would offer onlv one CS curriculum, presently manv universities offer several curricula with a CS component. The diverging trends in CS curricula necessarily have an impact on the teaching practice of the CS departments. This divergence brings with it a demand to focus the various curricula. Aspects of this focusing activity will be discussed here. To simplify the discussion, hopefully without being unjust, we claim that core CS is intimatelv related to discrete mathematics and logic. Where a relation exists, the peripheral CS disciplines are more closely associated with other branches of mathematics such as calculus, or probability theory. The relationship between logic and discrete mathematics within the core CS curriculum will be highlighted as found in the papers being surveyed. All issues of ACM SIGCSE bulletin over the past seven years have been scrutinised to find evidence of this relationship. No. 4 Dec. i995 BULLETIN An important element of the above relationship is the emphasis placed on learning through experimentation. The same literature has been scanned to find descriptions of how laboratory sessions are used to support learning. Some 30 papers were found to contain relevant information. The present survey is restricted to papers pubfished in SIGCSE, hoping to provide a view reflecting that generally held by those with an interest in education proven by publication in this medium. The next section reviews the papers that discuss general issues. Section 3 covers papers that use programming in various paradigms and / or laboratories for teaching discrete mathematics and logic. Teaching core CS topics using laboratories and various paradigms is discussed in Section 4. The last section presents some discussion and the conclusions. General issues The general issues of relevance that were found in the literature are abstraction, recursion and learning with the aid of laboratories. N~vrat [17] argues that teaching abstraction and generalisation as problem solving concepts can be supported bv the use of appropriate programming paradigms. His point is that three methodological dimensions must be distinguished: abstraction and concretisation, generalisation and specialisation, and meta-knowledge. The first two dimensions are often confused. For example, an abstract solution to a problem should be no more general than a concrete solution. The third dimension, that of meta-knowledge, captures programming tools and techniques that can be applied in specific circumstances. At various points in the three dimensional space thus established, N~ivrat finds that specific programming paradigms are particularly useful for highlighting the distinctions between the three dimensions. Abstraction and generalisation Along the same lines, Jarc [10] presents a unified view of data structures, which can be recognised as an object hierarchy. In both papers Recursion It is essential to teach recursion as a concept in its own right. It is often perceived as a difficult concept so it must be taught properly. Firstly, learning recursion requires a new mode of thinking. Secondly, many important algorithms are recursive. Wiedenbeck Plan-based recursion According to Newmarch [18] a plan-based approach to recursion presupposes a solution to a given problem. The solution is then matched to a repertoire of plans that describe the basis of the recursion and the recursive step(s). Examples are "linear recursion" and 'divide-and-conquer'. Newmarch makes plans operational using Prolog. A small number of plans support a large number of different programs and algorithms. The planbased approach also works with the imperative programming paradigm. Recursion as problem solving tool Instead of presupposing a solution, recursion can be presented as a problem solving tool. Henderson Manv imperative programming languages require the use of pointers to manipulate recursive data structures effectively. Pointers are a relatively low-level concept. They are therefore mostly taught as an advanced concept, late in a programming course, when problem solving has alreadv been taught. The use of an imperative prograrnming language therefore makes it difficult to teach recursion and recursion-based problem solving early. Fractals provide a good example for teaching recursion No. 4 Dec. 1995 14 BULLETIN alitv analysis plays an important role in work with fractals) and in the structure of the programs that draw fractals (for which Prolog is used). The recursion at each level is essentially the same, thus reinforcing the concept. The visual aspect stimulates exploratory learning of recursion. Laboratories Laboratories support the learning process by offering students well-chosen, short, well-paced exercises. Laboratory assignments: • make the material being studied operational • allow the student to ascertain that the material is understood • provide instant feedback to the student • stimulate experimentation with the material • raise questions for further lectures and study • offer the student the opportunity to discover solutions to problems Various authors [22, [4] argue for an experimental approach to the CS curriculum, using programming assignments. One author goes further: Biernat [21 in his course on algorithms and data structures uses puzzles and games for class room teaching and home work. He observes that students understand algorithms faster, remember them better and are excited about the course. Discrete mathematics and Logic Henderson Schoenefeld and Wainwright [25] describe a summer course in discrete mathematics for teachers at high-school level. This course is taught using the book bv Skiena [26], which offers extensive laboratory assignments based on Mathematica. A number of survevs have been held amongst the course participants, indicating that they were "extremely pleased that Mathematica was integrated into the course". The use of Mathematica as an exploratory tool makes operational important mathematical concepts such as abstraction and generalisation. Myers [15] makes a plea for teaching more logic as part of the CS curriculum. One of the many reasons he gives is that the basis of all important programming paradigms is found in logic. Hein [6] describes tools to teach discrete mathematics and logic using a large variety of short and relevant laboratory assignments. Simple assignments are described to experiment with laws of logic (using Prolog). Other assignments support learning about functions and function composition (using FP) and learning about types (using SML). The use of different languages is not seen as a problem, as the languages that are used faithfullv reflect the notations used in the course and emulate in a natural way the notions of discrete mathematics and logic. Hein notes that a course supported bv extra laboratory assignments does require students 1Miranda is a trademark of Research software Ltd. to do more work. One should thus not forget to award more credits for such a course than for a course without a laboratory. Core Computer Science In the laboratories that support teaching general and mathematical concepts an experimental approach to programming and programming paradigms is used. Teaching core CS subjects requires a different, more fundamental approach to programming and programming paradigms. However, there is again a relationship between particular subjects and the choice of paradigm that is most suited to teach that subject. In the SIGCSE bulletins, the following subjects were discussed with a relationship to paradigms and/or laboratories: the first programming course, the comparative study of programming languages and the study of abstract machines. course, these students produce "much better code than their procedurally-brainwashed class mates". The paper does not provide supporting evidence for this rather strong and tendentious claim. Stanchev and Radenskv [23] teach functional programming using an FP-tike language to graduate and under-graduate students. They report that their course was found difficult. This is a questionable conclusion for it is based on the number of students that actually took the exam (15 out of 26 the first year, 7 out of 14 the next). The authors hold responsible the "one word at a time" thinking habits induced by prolonged exposure to imperative languages. The evidence found thus far in the SIGCSE bulletins, for or against using different paradigms in the first programming course barely transcends the anecdotal. A more comprehensive survey would have to include a vast amount of other literature, such as special issues of various journals [28] that are devoted to education. First programming course S~nchez-Calle and Vel~zquez-iturbide [23] teach the declarative paradigm (using Hope+) in the first programming course, with a strong emphasis on synthesis and analysis of programs using logic to reason about programs. The authors report, without presenting the evidence, that their students "enjoy building programs while they are also able to analyse them rigorously". Louden [t21 reports on an experiment with two different streams of students. The first stream consists of first year CS students. The other stream consists of more mature students. The CS students learn Logo first, "emphasizing the role of functional programming in a manner similar to Abelson and Sussman [1]'. Thev then learn Pascal. The mature students frequently bypass the Logo and Pascalbased classes. Both streams then team Lisp. Does the declarative (Logo) background improve the examination results for the Lisp course? Possibly: based on the responses received for a survey (69 CS and 100 mature students), it was found that the examination results of the mature students were slightly better, Louden points out that the relative maturity of this stream might exptain this effect and concludes that more study should be done. Clancy and Linn [3] report on their experience with students who were taught Lisp as a first language. During the subsequent data structures The comparative study of programming languages The comparative study of programming languages is moving away from particular languages towards the study of paradigms, in much the same way as the core CS field as a whole is moving in that direction. In his survey, King [11] notes that one of the goals of a comparative study must be to prepare the students for the future. This implies that some historical perspective and a deep understanding of current concepts are essential. The comparative study of programming languages thus becomes more fundamental SIGCSE Abstract machines and translations Abstract machines and translations between abstract machines are topics that appear in such diverse contexts as computer archit%cture, semantics of programming languages, compiler construction and the theory of computation. A thorough treatment supported with well-constructed laboratory assignments will therefore be beneficial to all of these subjects at once. Such recurring concepts are identified as extremely useful in the ACM curriculum Some authors describe abstract machines in terms of declarative programs. Protog [4] even enables 'reverse execution" (i.e. given a finite state machine and its output, the Prolog system will reconstruct the possible inputs). Piotrowski states that Miranda [20] is less versatile, but offers more elegant and robust (typed) specifications of abstract machines. Both of these declarative approaches to experimenting with abstract machines offer readily executable specifications of formal systems.