Position paper for OOPSLA '96 workshop
"Teaching and Learning Object Design in the First Academic Year"

CS1 As An Architectural Design Course

M.D. Evans
School of Computing Science
Simon Fraser University
Burnaby, B.C., V5A 1S6, Canada
evans@cs.sfu.ca

Abstract:

Current CS1 courses purport to teach an introduction to design, often providing an early introduction to the software engineering lifecycle and to objects. This paper claims that such courses at best teach only micro-design - the self-contained design of small isolated data components and algorithms. Conversely, in real-world design, issues of a macro-perspective which emphasise the architectural organisation and structural connections between and among identified components are of significantly more importance than those of the micro-design perspective. This paper proposes, for a CS1 course, a case-study-driven approach to teaching object-oriented design from the macro-design perspective. The design and implementation hierarchy employed also teaches micro-design and its C++ implementation. Some observations of the author's experience of teaching such a course are provided.

Background:

The claim that modern CS1 curricula and textbooks emphasise and teach design is often supported by their provision to provide an early introduction to a basic software engineering lifecycle. Invariably, this methodology is then applied to small individual procedural and object (data) components. Emphasis on these localised or low-level design and implementation issues teaches very little about the processes of design from the perspective of true problem solving, precisely because students have no context upon which to evolve their design. Invariably the minimal context which is available implies the design is self-evident, therefore prompting the students to do little practical design, while suggesting to them that the important issues are ones of implementation and syntax.

A simple analogy assists the presentation of this argument. Consider an architectural problem of building a bathroom. In the CS1 domain, this bathroom would be fully specified by the instructor. Given this specification, the bathroom's design is relatively obvious to students. They then perceive the emphasis to be on its construction, with little need to emphasize design. Inherently generic and applicable design processes can only be taught and learned if a design context is provided. Is this bathroom a "portaloo" on a construction site, an ensuite in a home, or one on a concourse of a new football stadium? Localised design of the bathroom cannot be made until a particular context is evident. The issue of bathroom design is now of relatively less significance that is the architectural specification and design of the context within which this bathroom resides.

Significant issues, processes and qualities of good design must be addressed by consdering the constituent architectural components and their organizational structures and interfaces within the larger context of the problem or product. The processes of teaching and learning design must emanate from these global contexts. Invariably, CS1 courses do not address design from this perspective.

This statement is equally valid for object design and for object-oriented courses which either start "small" with procedural design emphases or offer an early introduction to simple objects. They avoid the larger context within which significant and meaningful object-oriented design issues may be studied.

This author has long employed a "design-in-the-small" pedagogy -until recently required to teach C++ to CS1 students. Possessing a personal bias against C, and recognizing that the essential basis of C++ is objects, it became apparent that the course should emphasize the macro-world of object application. The resultant course became one of teaching data-driven design - via ADT's and objects - with C++ introduced when implementation issues were addressed.

Position:

    The background commentary leads to 5 propositions.

  1. The movement towards teaching object oriented CS1 courses should replace the emphasis on language syntax and implementation tools with an emphasis on the process of data-driven (object) design applied to large problems, with specific language issues and syntax raised only as technical concerns reqired to implement low-level designs.
  2. The issues of "how" to design (as opposed to "what" to do as specified by a software engineering lifecycle), the identification of qualities of good design, and an understanding of applicable design tools can only be appreciated by studying "large, meaningful" problems. These are required to provide a significant context within which to consider the identification of design components and their architectural and structural connections. The pedagogical perspective must be that of the development of an architects' drawings for a new house, followed by the more specific drawings of the various floor and room plans. From these will flow the detailed designs of the blueprints, and the implementation of the house itself. Design issues are learned by contact with this hierarchy of design. Learning must proceed by original design development and/or the study of existing designs. Appreciation and development of good design is enhanced via the study of alternative designs for the same product. Significant-sized problems are required to support these views.
  3. Even though object design is a data-driven design paradigm, students must be taught that they are employing in parallel an equally powerful paradigm - the procedural (algorithmic) paradigm. This is used to specify both the interactions between and amongst the design components and the detailed designs of internal methods of the components.
  4. The typical topic order of a CS1 course is reversed, in that initial topics must include high-level structural design and full conceptual coverage of data objects/classes/ADT's.
  5. The pedagogy employed must simultaneously recognise that while there is little in a student's background to support this proposed way of thinking, students do possess practical knowledge and experience of many of the required concepts, and they can and do react favourably to this challenge.

The Methodology:

The author is currently concluding his first offering of a CS1 course based on the above propositions. The course organization and pedagogy employed:

Resultant Experience:

After 12 weeks (of a 13 week course), the author has noted:

Comparison:

Most typical depth-first topic based CS1 courses and textbooks within the author's knowledge support, at best, what might be called low-level or localized design issues. Books such as Savitch [2], which introduce object design very early and consistently, address the localized design issue but do not directly address the issues of "how to" design solutions to significant problems given in a broader context. The ideas adopted in this paper employ, only at the lowest level of design and implementation, the concepts espoused by such authors. Other approaches which introduce objects quite late (and therefore only support procedural design) are at the opposite end of the design spectrum proposed in this paper.

References:

[1] Evans, M.D., "A New Emphasis & Pedagogy for a CS1 Course", SIGCSE BULLETIN, September, 1996.

[2] Savitch, Walter, "Problem Solving with C++ The Object of Programming", Addison-Wesley Publishing Co.Ltd., 1996.

Bibliography:

The author is currently employed as a Senior Lecturer in Computing Science at Simon Fraser University. He has held previous positions as Associate Professor and Senior Lecturer at, and has obtained post-graduate degrees in both mathematics and computing science from, universities in both Canada and Britain. He has been a visiting lecturer at the University of Maryland (Overseas). His current interests include computing science education and curricula issues, particularly at the lower division levels.