正在加载图片...
938 TEACHING THE METHOD $29.2 Teachers may unconsciously tend to apply an idea that was once popular in biology: that ontogeny (the story of the individual)repeats phylogeny (the story of the species);a human embryo,at various stages of its development,vaguely looks like a frog,a pig etc. Transposed to our subject,it means that a teacher who first learned Algol,then went on to structured design and finally discovered objects may want to take his students through the same path.There is little justification for such an approach,which inelementary education would make students first learn to count in Roman numerals,only later to be introduced to more advanced"methodologies"such as Arabic numerals.If you think you know what the right approach is,teach it first. Paving the way for other approaches One of the reasons for recommending(without fear of fanaticism or narrow-mindedness) the use of object technology right from the start is that,because the method is so general, it prepares students for the later introduction of other paradigms such as logic and functional programming-which should be part of any software engineer's culture.Ifyour curriculum calls for the teaching of traditional programming languages such as Fortran, Cobol or Pascal,it is also preferable to introduce these later,as knowledge of the object- oriented method will enable students to use them in a safer and more reasoned way. O-O teaching is also good preparation for a topic which will become an ever more prevalent part of software education programs:formal approaches to software specification,construction and verification,rooted in mathematics and formal logic.The use of assertions and more generally of the Design by Contract approach is,in my experience,an effective way to raise the students'awareness of the need for a sound, systematic,implementation-independent and at least partially formal characterization of software elements.Premature exposure to the full machinery of a formal specification method such as Z or VDM may overwhelm students and cause rejection;even if this does not occur,students are unlikely to appreciate the merits of formality until they have had significant software development experience.Object-oriented software construction with Design by Contract enables students to start producing real software and at the same time to gain a gentle,progressive exposure to formal techniques. Language choice Using the object-oriented method for introductory courses only makes sense if you can rely on a language and an environment that fully support the paradigm,and are not encumbered by ghosts of the past.Note in particular that"hybrid"approaches,based on object-oriented extensions ofolder languages,are unsuitable for beginning students,since they mix O-O concepts with unrelated remnants from other methods,forcing the teacher to spend much of the time on excuses rather than concepts. In C-based languages,for example,just explaining why an array and a pointer have to be treated as the same notion-a property having its roots in optimization techniques for older hardware architectures-would consume precious time and energy,which will not be available for teaching the concepts of software design.More generally,students938 TEACHING THE METHOD §29.2 Teachers may unconsciously tend to apply an idea that was once popular in biology: that ontogeny (the story of the individual) repeats phylogeny (the story of the species); a human embryo, at various stages of its development, vaguely looks like a frog, a pig etc. Transposed to our subject, it means that a teacher who first learned Algol, then went on to structured design and finally discovered objects may want to take his students through the same path. There is little justification for such an approach, which in elementary education would make students first learn to count in Roman numerals, only later to be introduced to more advanced “methodologies” such as Arabic numerals. If you think you know what the right approach is, teach it first. Paving the way for other approaches One of the reasons for recommending (without fear of fanaticism or narrow-mindedness) the use of object technology right from the start is that, because the method is so general, it prepares students for the later introduction of other paradigms such as logic and functional programming – which should be part of any software engineer’s culture. If your curriculum calls for the teaching of traditional programming languages such as Fortran, Cobol or Pascal, it is also preferable to introduce these later, as knowledge of the object￾oriented method will enable students to use them in a safer and more reasoned way. O-O teaching is also good preparation for a topic which will become an ever more prevalent part of software education programs: formal approaches to software specification, construction and verification, rooted in mathematics and formal logic. The use of assertions and more generally of the Design by Contract approach is, in my experience, an effective way to raise the students’ awareness of the need for a sound, systematic, implementation-independent and at least partially formal characterization of software elements. Premature exposure to the full machinery of a formal specification method such as Z or VDM may overwhelm students and cause rejection; even if this does not occur, students are unlikely to appreciate the merits of formality until they have had significant software development experience. Object-oriented software construction with Design by Contract enables students to start producing real software and at the same time to gain a gentle, progressive exposure to formal techniques. Language choice Using the object-oriented method for introductory courses only makes sense if you can rely on a language and an environment that fully support the paradigm, and are not encumbered by ghosts of the past. Note in particular that “hybrid” approaches, based on object-oriented extensions of older languages, are unsuitable for beginning students, since they mix O-O concepts with unrelated remnants from other methods, forcing the teacher to spend much of the time on excuses rather than concepts. In C-based languages, for example, just explaining why an array and a pointer have to be treated as the same notion — a property having its roots in optimization techniques for older hardware architectures — would consume precious time and energy, which will not be available for teaching the concepts of software design. More generally, students
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有