Educating Novices in The Skills of Programming. Michael E. Caspersen. PhD Dissertation. Department of Computer Science University of Aarhus Denmark

of 29
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Educating Novices in The Skills of Programming Michael E. Caspersen PhD Dissertation Department of Computer Science University of Aarhus Denmark Educating Novices in The Skills of Programming A Dissertation
Educating Novices in The Skills of Programming Michael E. Caspersen PhD Dissertation Department of Computer Science University of Aarhus Denmark Educating Novices in The Skills of Programming A Dissertation Presented to the Faculty of Science of the University of Aarhus in Partial Fulfilment of the Requirements for the PhD Degree by Michael E. Caspersen February 26, 2007 Abstract Programming is recognised as one of seven grand challenges in computing education. Decades of research has shown that the major problems novices experience are composition-based they do not know what the pieces are and do not know how to put them together. Despite this fact, textbooks, educational practice, and programming education research hardly address the issue of teaching the skills needed for systematic development of programs. We provide a conceptual framework for incremental program development, called stepwise improvement, which unifies best practice in modern software development such as test-driven development and refactoring with the prevailing perspective of programming methodology, stepwise refinement. The conceptual framework enables well-defined characterizations of incremental program development; in particular, it enables a notion of degree of correctness, which plays a key role in stepwise improvement. We utilize the conceptual framework to provide a derived programming methodology for novices and an instructional design for an introductory programming course in which stepwise improvement is supported explicitly by the programming process and a model-driven approach to object-oriented programming and implicitly through cautious design of the teaching material. Our approach is founded in cognitive science and educational psychology, primarily cognitive load theory, cognitive skill acquisition, and cognitive apprenticeship, as well as research in programming methodology. v Acknowledgments It is a privilege and a great pleasure to thank the many people who made this dissertation possible. Gitte Møldrup, director of IT University West, suggested that I pursued a PhD and has provided resources and support for making it possible. Ole Lehrmann Madsen, my advisor, who urged me for seven years before I gave in, has for more than a decade been a rich source of inspiration and knowledge. David Gries, my friend, colleague, and long-distance mentor, the latter for almost twenty-five years and not all the time to his knowledge, has offered help and support at a scale far beyond the call of friendship. Erik Meineche Schmidt, my first teacher in computer science and mentor for many years, taught me programming and how to teach it, and he introduced me to the work of Dijkstra and Gries. Jens Bennedsen, my close colleague and friend for almost twenty years, has been a wonderful playmate and an endless source of energy throughout our common endeavours. Ole Eriksen, my colleague and friend for more than twenty years, has been an endless source of inspiration. Many ideas about programming and programming education have matured through countless talks, letters, s, and cycling tours. Michael Kölling, my colleague and friend for more than ten years, has made my educational life much easier with his contributions. Through close interaction he continuously influence my way of thinking about teaching programming. Henrik Bærbak Christensen, my colleague and friend for almost ten years, taught me how to integrate advanced object-oriented concepts into programming education for novices. Numerous people have contributed to my research. Jens Bennedsen, Henrik Bærbak Christensen, Michael Kölling, Jürgen Börstler, Marie Nordström, Carl Alphonce, Adrienne Decker, and Kasper Dalgaard Larsen are coauthors of one or more of my publications. Klaus Marius Hansen, Erik Ernst, Aino Corry, Henrik Bærbak Christensen, Carl Alphonce, Adrienne Decker, David Gries, Michael Clarkson, and Michael Schwartzbach offered their time and help as subjects for my study of programming experts in action. From 2003 through 2006, more than one thousand students from the course Introduction to Programming have volunteered as subjects in various experiments and evaluations. vii I also take the opportunity to thank Owen Astrachan, David Barnes, Moti Ben-Ari, Joe Bergin, Claus Bossen, Mats Daniels, Anna Eckerdal, Sally Fincher, Gudmund Frandsen, Mark Guzdial, Poul Henriksen, Lew Hitchner, Jens Dybkjær Holbech, Joe Hummel, Michael Jackson, Bruce Klein, Morten Kyng, Bengt Lennartsson, Morten Lindholm, Raymond Lister, Lauri Malmi, Helle Mathiasen, Dung Zung Nguyen, Rich Pattis, Eric Roberts, Axel Schmolitzky, Ian Utting, Niklaus Wirth, Stephen Wong, and the members of the Scandinavian Pedagogy of Programming network for occasional interaction and support. Thanks to all colleagues at DAIMI for providing a wonderful atmosphere of friendship, support, enthusiasm, and professional ambitions. Last but not least, heartfelt thanks to the most precious in my life, my wife Susanne, my daughter Christina, and my son Christopher; without you it would all be meaningless; for your immense support I shall remain forever grateful. Thank you all! Michael E. Caspersen, Aarhus, 26 February 2007 viii Contents Abstract Acknowledgments v vii I Overview 1 1 Introduction Theses and research questions Contributions and organization of the dissertation 7 2 Programming Education: A Grand Challenge Programming is hard An explorative activity of discovery and invention A tale of two companies Grand challenges in computing education Failure rates in introductory programming Grand challenges in computing 13 3 Cognition and Learning Cognitive science and educational psychology Schemas Chunking Summary Learning versus problem solving A failed experiment Misguided advice A survey of cognitive load theory Milestones in cognitive load theory Development of cognitive load theory Worked examples and cognitive skill acquisition The power law of practice Transfer Conclusion 32 4 Programming Education Research Selected conferences and publications SIGCSE ITiCSE Koli Calling Workshop in killer examples for design patterns ICER Joint Modular Language Conference Informatics Education Europe (IEE) Scandinavian Pedagogy of Programming Network (SPoP) The ACM Education Board and Council Personal involvement and commitment Research areas 37 ix 4.2.1 Student understanding Animation, visualization, and simulation Teaching methods Assessment Educational technology Transferring practice into the classroom Incorporating new developments and new technologies Transferring to distance education Recruitment and retention Constructing the discipline Conclusion 53 5 Programming Aptitude Related work Local replication of previous studies Abstraction ability Operationalization of hypothesis Students and data Findings Discussion Mental models The test instrument Failure of verification Conclusion 66 6 Programming Methodology A contemporary perspective CC2001 on teaching programming skills A textbook survey Two educator surveys The programming education research perspective A historical perspective Emphasis in education Two misconceptions Stepwise enhancement From structured to object-oriented programming Conclusion A future perspective Best practice A study of the programming practice of experts Horizontal programming Conclusion 87 7 Stepwise Improvement Toward a unified programming methodology The refinement calculus A conceptual framework for program extension Unification of methodologies Programming strategies Degrees of correctness Two examples Incremental development and OOP 111 x 7.2.1 Programming as a modeling process Implementing specification models Conclusion A Programming Method for Novices Random walk or guided tour Random walks Guided tours Cognitive apprenticeship using videos STREAM Stubs Tests Representations Evaluation Attributes Methods The mañana principle An example Stubs Tests Representations Evaluation Attributes Methods Discussion Graspability of STREAM Conclusion Instructional Design Principles of programming education Consume before produce Worked, exemplary examples Reinforce specifications Reveal process and pragmatics Hands-on Progression in terms of complexity of tasks Reinforce patterns and conceptual frameworks Constructive alignment Care and support A model-driven approach to OOP Goal Getting started Learning the basics Conceptual framework and coding recipes Programming method Subject specific assignments Practice Final examination Patterns and frameworks Conclusion Evaluation of process competence Related work 153 xi 9.5 Conclusions Future Work Books Evaluation of instructional design Tools A notional machine workbench Tool support for STREAM Tool support for incremental program development An educational programming language Programming methodology Extension of STREAM Theoretical foundation of conceptual framework Extension of conceptual framework Conclusion 163 Bibliography 167 II Papers Potential Success Factors Abstraction Ability as an Indicator of Success? Mental Models and Programming Aptitude Exposing the Programming Process A Novice s Process of Object-Oriented Programming CS1: Getting Started Frameworks in CS Model-Driven Programming Killer Killer Examples for Design Patterns Assessing Process and Product Beauty and the Beast 305 xii I Overview 1 1 Introduction Programming education is indeed a grand challenge. Fifty percent failure rates for introductory programming courses are not unusual; study after study have demonstrated that students after six to twelve month of instruction cannot fluently apply basic constructs such as loops; and several studies recognize that even after two years of programming instruction at university, many students have only rudimentary understanding of programming. The community has promoted research and development in the area for thirtyfive years without significantly improving the state of affairs. 1 In 2004 programming education was recognized as one of seven grand challenges in computing education: the challenge of programming education is to understand the programming process and programmer practice to deliver effective educational transfer of knowledge and skills. Our aim is to address the challenge of programming education by capturing the essence of the programming process and programmer practice in order to devise effective education for novices in the skills of programming. In our endeavour, we shall refrain from discussing the educational inadequacy of modern programming languages. We shall do so not because it is irrelevant on the contrary but because it is a separate concern and because our aim is to address the challenge of programming education independently of specific (kinds of) programming languages. Although expressed in terms of object-oriented programming and Java, the dominating teaching language of our time, the essence of our work is applicable to programming education in general, independently of choice of programming language technology. Programming education, i.e. teaching and learning programming, is the heart of the matter, but teaching and learning are two very different things. Learning is a cognitive, psychological activity that ultimately takes place in the mind of the learner through recoding of cognitive structures; teaching is a social activity in a social system aiming at transferring and constructing knowledge and skills. It is the combination of the two that is our concern and we shall address both aspects of programming education in this dissertation. 1.1 Theses and research questions As a starting point for this dissertation we propose three theses about teaching and learning introductory programming. The theses are based upon more 1 This chapter takes the form of an extended abstract without documentation of claims and assertions; everything will be readdressed and documented in the following chapters. 3 than twenty years of personal experience teaching introductory programming at the tertiary level and have been refined through the PhD study. Thesis 1 (T 1 ): Revealing the programming process to novices eases and promotes the learning of programming. Thesis 2 (T 2 ): Teaching skills as a supplement to knowledge promotes the learning of programming. Thesis 3 (T 3 ): Anybody can learn to program. Theses of this nature, of course, are difficult if not impossible to verify, but they are still useful because they form the scope and fundamental perspective of our work. From the three theses, we shall derive the more concrete and specific research questions to be addressed in the dissertation. As always, it is mandatory to investigate relevant research to look for support or the opposite of the statements put forward in the theses above. The word learning occurs in all three theses, and the learning domain is programming education; therefore, the first two research questions to explore are pretty obvious: Research question 1 (Q 1 ): What is the foundation in learning theory for programming education that supports T 1 -T 3? The question is refined to four more specific questions: Q 1.1 : Is there a foundation in learning theory that supports (or contradicts) T 1 -T 3? Q 1.2 : If so, what are the major relevant results? Q 1.3 : What is the scientific validity and reliability of these results? Q 1.4 : Do the results generalise to the context of programming education? Research question 2 (Q 2 ): Does programming education research support T 1 -T 3? The question is refined to two more specific questions: Q 2.1 : What is programming education research all about? Q 2.1 : Does some of the research support or contradict the claims of T 1 -T 3? Thesis T 3 is a very strong claim, particularly in the light of the current state of affairs as mentioned above. Due to high failure rates in introductory programming courses, it is a common assumption that not everybody can learn to program. This attitude was recently promoted in very strong terms by researchers who claimed to have found a test for programming aptitude to cleanly separate programming sheep from non-programming goats. As succinctly expressed in T 3, we strongly disagree with the attitude that not everybody can learn to program. Of course, we do not mean to suggest that anybody can become a brilliant programmer, but we claim that anybody provided that they are motivated and that the body of knowledge is suitably structured can learn the basic knowledge and skills of programming. The 4 thesis is inspired by Jerome Bruner 2 and his attitude toward structure of knowledge. Bruner requests that educators must specify the ways in which a body of knowledge should be structured so that it can be most readily grasped by the learner. Bruner explains it this way: Any idea or problem or body of knowledge can be presented in a form simple enough so that any particular learner can understand it in a recognisable form [Bruner 1960]. However, some students learn programming more easily than others and perform much better; it is therefore reasonable to search for explanations, i.e. to search for pre-study as well as in-study indicators of success for introductory programming. To the extent that we as a community are able to identify such indicators, we may be able to use them to improve students background and prerequisites to increase their performance and chances of success. This leads us to the third research question to be explored: Research question 3 (Q 3 ): Are there indicators of success for learning and performance in introductory programming? The question is refined to four more specific questions: Q 3.1 : Has programming education research identified indicators of success for introductory programming courses? Q 3.2 : If so, can we generalise the results of others to our local context? Q 3.3 : Can we identify novel indicators of success in introductory programming? Q 3.4 : If so, can we exploit these to improve students performance and chances of success? When talking about programming and programming competencies we shall distinguish between knowledge and skills. Knowledge is facts, definitions, language constructs, specific algorithms, etc., whereas skills are strategies for using knowledge. We unfold the definition later, but this shall suffice for now. Typical introductory programming textbooks devote most of their content to presenting knowledge about a particular language [Robins et al. 2003]. Exposing students to the process of programming is merely implied but not explicitly addressed in texts on programming, which appear to deal with program as a noun rather than as a verb. But teaching programming is much more than teaching a programming language [Knudsen et al. 1988]. Knowledge about a programming language is a necessary but far from sufficient condition for learning the practice of programming. Students also need knowledge about the programming process, i.e. how to develop programs, and they need to extend that knowledge into programming skills as expressed by theses 1 and 2. As David Gries once wrote [Gries 1974]: Let me make an analogy to make my point clear. Suppose you attend a course in cabinet making. The instructor briefly shows you a saw, a plane, a hammer, and a few other tools, letting you use each one for a few minutes. He next shows you a beautifully-finished cabinet. Fi- 2 Jerome S. Bruner (1915), an American psychologist from Harvard, has made valuable contributions to cognitive psychology and cognitive learning theory in the field of educational psychology known as social constructivism [Bruner 2006]. 5 nally, he tells you to design and build your own cabinet and bring him the finished product in a few weeks. You would think he was crazy! David Gries, 1974 Clearly, cabinet making cannot be taught simply by teaching the tools of the trade and demonstrating finished products; but neither can computer programming. Nevertheless, judged by the majority of past as well as contemporary textbooks, this is what seems to be attempted. In [Kölling 2003b], a survey of 39 major selling textbooks on introductory programming was presented. The overall conclusion of the survey was that all books are structured according to the language constructs of the programming language; the process of program development is often merely implied rather than explicitly addressed. A typical structure of a section on a specific language construct (e.g. the while loop), is the presentation of a problem followed by a presentation of a program to solve that problem and a discussion of the program s elements. From the viewpoint of a student, the program was developed in a single step, starting from a problem specification and resulting in a working solution. The fact that we all start by developing sub-optimal and partial implementations on our way to a solution, which we later refine and improve, seems to be one of the best kept secrets of programming education! We need to supplement the teaching of tools, concepts, and programming language constructs on the one hand and finished example programs on the other with education in the process of programming. We need to provide the missing link between the tools of the trade and products created by these tools, as indicated by Figure 1-1. Tools Concepts Language constructs? The missing link Finished programs The tools of the trade Products Figure 1-1: The missing link between the tools of the trade and products But in order to incorporate the programming process in programming education for novices, we need to understand what it is. Programming methodology, the study of methods for making programs, aims at increasing programmers ability to compose programs; theses 1 and 2 are just another way of saying that programming methods ought to permeate programming education in order to ease and promote learning. But where is the field of programming methodology today, and how does it relate to best-practice of modern software development? This becomes
Similar documents
View more...
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks