Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

A musical approach to teaching design patterns

Published: 24 June 2002 Publication History

Abstract

In case you missed the signs, design patterns [2] have suddenly become a core programming topic. The Computing Curricula 2001 [1] includes the topic as a major part of SE1 "software design," and in a recent survey [4] software practitioners ranked "software design and patterns" as one of the areas of knowledge they consider most important to their work.Teaching design patterns, however, is not so easy. Patterns need to be studied in the context of a software design project; to do otherwise renders the topic asomatous. We have met with some success in using "musical composition" to teach a number of standard design patterns, including Composite, Decorator, Visitor, and Factory. The idea of musical composition comes from Paul Hudak's Haskore system [3].The project centers on the design of a "musical object," by which we mean either a note (with a pitch and duration), a rest (having just a duration), or a combination of musical objects. The combinations can be contemporaneous (as for a chord), or sequential (like a scale). The two primitive music types together with the combinators come together using the Composite inheritance pattern. Decorators can then be added to describe tempo changes (the scaling of the duration of all parts of a musical object), pitch transpositions, and to assign different instruments to parts of a composition.With the descriptive part of the system so formed, a Visitor can be used to traverse the musical tree and generate a linear sequence of "musical events," which can then be written as type 1 MIDI files for playback on most standard PC equipment. As well as learning about design patterns, students are given the opportunity to try their hand at transcription or composition. Some examples of their work can be found at http://www.cs.auckland.ac.nz/courses/ compsci360fc/ archive/1999/Ass2/PickOfTheBest/.

References

[1]
ACM and IEEE Computer Society, Final report of the Computing Curricula 2001 project (CC2001), http://www.computer.org/education/cc2001/index.htm
[2]
Gamma, E., Helm, R., Johnson,R., and Vlissides,J. Design Patterns Elements of Reusable Object-Oriented Software, Addison-Wesley (1994)
[3]
Hudak, P. The Haskell School of Expression: Learning Functional Programming Through Multimedia, Cambridge University Press (2000)
[4]
Lethbridge, T. "What knowledge is important to a software professional?" IEEE Computer (May 2000)

Index Terms

  1. A musical approach to teaching design patterns
    Index terms have been assigned to the content through auto-classification.

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGCSE Bulletin
    ACM SIGCSE Bulletin  Volume 34, Issue 3
    September 2002
    269 pages
    ISSN:0097-8418
    DOI:10.1145/637610
    Issue’s Table of Contents
    • cover image ACM Conferences
      ITiCSE '02: Proceedings of the 7th annual conference on Innovation and technology in computer science education
      June 2002
      262 pages
      ISBN:1581134991
      DOI:10.1145/544414
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 24 June 2002
    Published in SIGCSE Volume 34, Issue 3

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 2,294
      Total Downloads
    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 10 Sep 2024

    Other Metrics

    Citations

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media