Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Log on Education Mark Guzdial and

Elliot Soloway

Teaching the Nintendo


Generation to Program
Preparing a new strategy for teaching introductory
computer programming.

W
hile the phrase “new Start asking around—we’re hear- even among second-year, college-
economy” doesn’t ing about dropout/failure rates in level students at four schools in
hold the same CS1 courses in the 15%–30% three different countries [5].
promise that it did range. A report in the ACM (These results echo our research
for the dot-commers a couple from 15 years ago, so it’s not clear
years ago, we all still recognize we ever have figured out how to
that information technology teach programming.) The Ameri-
has become the can Association for University
backbone of the Women’s report, Tech-Savvy: Edu-
world’s economy. The cating Girls in the Computer Age
National Science Foun- [1] points out that large numbers
dation’s Information of women drop out or simply fail
Technology Research pro- to enroll in computer science
gram was developed in courses because they perceive
response to the President’s these courses to be overly techni-
Information Technology Advi- cal, with little room for individual
sory Committee (PITAC) [6] creativity
report which said as much. Even Why are we doing such a poor
in the down-turned economy, job at getting and keeping stu-
there are still huge numbers of IT dents in computer science? Here’s
jobs going unfilled. our suggestion: Computer science
Of course, none of this is news educators are using an outdated
for those of us in the trenches view of computing and students.
teaching computer science. Our We teach computer science in
enrollments are bulging at the much the same way as we learned
seams. We can’t get enough fac- it. We got excited about computer
ulty to cover the loads. science while learning about lay-
Despite those enormous enroll- ing out complex patterns of
ments, there are lots of indications abstract decisions and computa-
that we’re not doing enough, or tions, manipulating invisible data
not doing the right things, to SIGCSE Bulletin from a working structures, and finally perhaps
TERRY MIURA

meet the demand for a diverse, group at ITICSE 2001 found printing a number or a phrase.
well-educated, large work force of shockingly low performance on These activities matched the avail-
computer science professionals. simple programming problems, able computing hardware: The

COMMUNICATIONS OF THE ACM April 2002/Vol. 45, No. 4 17


Log on Education

punched card, teletype, and gen- Deitel’s Java: How to Program vision looks even more futuristic
erally text-focused I/O devices. [2]. We’re not picking on it but today than it did then. Kay and
Printing “Hello, World!” was using it as an example. Most Goldberg describe animations,
interactive computing when most CS1 textbooks are fairly similar music synthesis, and drawing tools
of us were learning to program. in terms of their exercises. The that resemble what we have today,
And we didn’t get a lot of com- first program discussed in Deitel but their media were created by
puter science majors in those and Deitel is producing a line of students as they were learning to
days, either. text, akin to “Hello, World.” program. The established practice
But, computing is much differ- The second places the text in a of having students focus on pro-
ent today. The hardware enables window. The next few produce ducing text and the occasional
us to do much more. In what fol- numeric outputs in windows and graphical user interface widget is
lows, we propose a new strategy then input numbers and gener- well entrenched today. Who
for teaching introductory com- ate calculator types of responses. teaches CS1 by having students
puter programming we believe will Would one expect these kinds of build animated horse races? Kay
attract a group of students not exercises to be the ones to and Goldberg did 25 years ago.
excited by the invisible, abstract, engage the MTV generation? Ironically, there are fewer techni-
t and text world we grew up with. Such exercises are exactly what cal barriers to kids programming
n the AAUW report describes as media today than there were in
Engaging Students “tedious and dull.” 1977. Computers today have mag-
o Learning scientists have found nitudes more zorch. High-resolu-
over and over again that engaging It’s About Media tion displays supporting millions
the students is critical to deep Today’s desktop computers were of colors and sound cards with
learning. Sure, you can get stu- invented to be multimedia com- CD-quality recording and play-
dents to memorize just about any- position and exploration devices. back facilities are the default com-
thing, but if you want them to The Xerox PARC Learning puting platforms offered at such
understand it, you have to get Research Group believed in a stores as Best Buy and Radio
them to think about it. Engaging vision of the computer as a Dyn- Shack.
students is critical for them to abook: A tool for learning, One reason for not introducing
learn something well enough to through creation and exploration programming via multimedia
use it again in a new situation. of a wide range of media. Pursu- construction is the lack of a good
College students today have ing that vision is what led them multimedia programming plat-
been called the “Nintendo genera- to invent the desktop user inter- form. Java is the most popular
tion” or the “MTV generation.” face as part of their programming CS1 programming language
Their perception of technology language, Smalltalk. Alan Kay today, but the Java 2 Media
and media has been profoundly and Adele Goldberg spelled out Framework is complex and isn’t
influenced by these sources. The their vision of the Dynabook in a completely ported to all operating
implication has often been that 1977 article, “Personal Dynamic system platforms. Other popular
they need to consume mass quan- Media,” that talked about stu- CS1 languages like C++, Scheme,
tities of fast-paced sound, graph- dents building music, animation, and Python offer little support for
ics, and animation. Perhaps there’s and drawing systems—learning multimedia, and certainly not for
a more critical implication—that to program through the creation all hardware and operating system
these are the kinds of media that of media and learning to pro- configurations. This lack of sup-
Nintendo generation students gram in order to create media. port for multimedia might be due
want to produce when learning Creating media sounds like what to the perception that multimedia
computer science. the Nintendo Generation is look- programming is an advanced
Let’s consider a popular text- ing for. topic, something that CS1 stu-
book for CS1 today, Deitel and In a lot of ways, that 1977 dents might one day aspire. No

18 April 2002/Vol. 45, No. 4 COMMUNICATIONS OF THE ACM


one does multimedia first. could see what a multimedia-first additive synthesis is the way that
But, if the platform does sup- approach might look like. The it was invented on early hardware:
port multimedia—as does Alan easiest way to start with com- By stuffing numbers into a buffer
Kay et al.’s Squeak—multimedia puter music is to record oneself and sending the buffer to a digi-
programming can fit in well (Squeak provides a built-in, tal-to-audio converter. A Squeak
within the scope of a CS1 course. cross-platform digital recorder), routine (method) for generating a
Indeed, the code for creating save (name) the sound, and play sound buffer with a given fre-
graphical transitions, for doing it back—even at a different pitch, quency, amplitude (roughly, vol-
cell animations, even for synthe- so the sound becomes an instru- ume), and duration requires no
sizing sounds is not all that com- ment. This is exactly the more than a simple loop and cal-
plicated. We have been using the approach of modern sampling culation. The problem requires
programming language Squeak for keyboards. The musical equiva- some trigonometry, but nothing
three years at Georgia Tech with lent to “Hello, World!” in the too complex.
over 100 students per semester domain of computer music is (in
[3]. Squeak (www.squeak.org) is a Squeak) (SampledSound sound- forFreq: freq amplitude: amp
cross-platform multimedia envi- Named: ‘mySound’) play. To use duration: seconds
ronment that is the evolution of our recorded sound as an instru- “Generate a monophonic Sound-
Smalltalk toward the Dynabook, ment is a simple extension: Buffer (array) filled with a sine
championed by Alan Kay, Dan ((SampledSound soundNamed: wave of the given frequency (freq),
maximum amplitude (amp), and
Kids can produce their kind of media using duration in seconds (seconds)”
today’s technology. In fact, they want to. And | sr anArray pi interval samples-
they’ll learn programming doing it. PerCycle maxCycle rawSample |
sr := SoundPlayer samplingRate.
“The Sampling Rate”
Ingalls, and a large open source ‘mySound’) pitch: ‘c’) play. anArray:= SoundBuffer
community. Students at Georgia We can go further down this newMonoSampleCount:
Tech use Squeak to build MPEG path by using our sound to play (sr * seconds). “The
movie editors, personalized news- recorded MIDI files. But let’s take array for the sound”
papers built on harvested Web a different path to explore some pi := Float pi. “The constant Pi”
content, math equation layout (slightly) more complex algo- interval := 1 / freq. “Time
editors, and 3D adventure games. rithms. We’ll use as an example between cycles,
Admittedly, we’re not yet in the creation of sounds via additive inverse of frequency: sec-
CS1—ours is a sophomore synthesis. Additive synthesis is an onds per cycle”
requirement. But it’s through our old technique for sound synthesis samplesPerCycle := interval * sr.
use of Squeak and watching stu- (pre-dates Yamaha synthesizers) “secs/cycle * samples/sec-
dents rise to the challenge of mul- which doesn’t generate musical ond = samples per cycle”
timedia programming that we sounds. It has the advantage, maxCycle := 2 * pi. “Maximum
came to the realization that multi- though, of being understandable radians per cycle”
media-first is a viable way to and allowing the users to generate
introduce computing. different kinds of sounds with not 1 to: (sr * seconds ) do: [:sampleIndex |
very much code. rawSample := ((sampleIndex/
Example: Sound Synthesis Additive synthesis works by samples PerCycle) * max-
Last year, we ran a pilot class on summing sine waves at different Cycle) sin. “Compute
computer music implementation frequencies to create new kinds of a sound sample value”
for a dozen undergraduates so we sounds. The simplest way to do anArray at: sampleIndex

COMMUNICATIONS OF THE ACM April 2002/Vol. 45, No. 4 19


Log on Education

put: (rawSample * believe that Nintendo generation the text-first view of program-
amp ) rounded. students will prefer learning ming that we emphasize today.
“Insert the sam- about array manipulation where
ple into the sound at the example results in producing Back to the Future
the right amplitude” sound as opposed to sorting pay- We have used “Hello, World!” for
]. roll IDs or doing linear searches the past 25 years because text was
^ anArray for student names. the medium that was easiest to
In Squeak, we cannot only gen- manipulate with the given tech-
One doesn’t need to under- erate sounds using these 16 lines nology. Today’s technology can
stand anything about Squeak to of code, but we can also look at manipulate sound, graphics, and
see that this is 10 lines of code the waveforms, play the newly cre- video with the same responsive-
with a single “for” loop in it. To ated sounds, and even do Fourier ness and ease. Today’s technology
add these sine waves together one analyses on them. In our com- produces the media that “kids
simply adds the values from the puter music course, we even used these days” are consuming. These
sound buffers with the same
index values, like this:
Reviewing
combine: soundbuffer1 and: computer music
soundbuffer2“Add two Sound- lecture notes
Buffers (arrays) together” from within a
browser, using
| newsound | wave editors to
(soundbuffer1 size) = (sound explore the
buffer2 size) sounds.
ifFalse: [^self error: ‘Sound
buffers must be of the
same length’].

newsound := SoundBuffer Squeak to create the lecture notes, same kids can produce their kind
newMonoSampleCount: (sound where we build sounds, listen to of media using today’s technology.
buffer1 size). “The resultant them, and analyze them from In fact, they want to. And they’ll
sound” within a Web browser (see the fig- learn programming to do it.
ure). We are sympathetic to the com-
1 to: (soundbuffer1 size) do: Squeak has even more sophisti- plexities of really making this
[:index | cated multimedia aspects in its “multimedia-first” approach work.
“Add up each of the sam- base distribution, like FM synthe- We readily admit that neither the
ples” sis and wavelets support, so better University of Michigan nor Geor-
newsound at: index put: (more musical, more sophisti- gia Institute of Technology are
(soundbuffer1 at: index) cated, more interesting) computer currently following a “multimedia-
+ (soundbuffer2 at: index)]. music is available, too. Thus, first” approach in our instantia-
^newsound. along the multimedia spectrum of tions of CS1. But, if we want to
computer music, it’s possible to attract and keep the MTV/Nin-
Six lines of code, and we now span the easy concepts of “Hello, tendo generation students sitting
have an additive sound synthe- World!” through introduction to in our classes, we must reach out
sizer by calling these methods programming up to serious pro- and use their media, use their
with appropriate parameters. gramming—while engaging a set modes of expression. Interestingly
Based on our experience, we of students who are turned off by enough, in so doing we cannot

20 April 2002/Vol. 45, No. 4 COMMUNICATIONS OF THE ACM


only teach all the “old concepts” Coming Next Month in
but we can also have our students
use modern ideas such as Fourier
transforms. And, in using their
Communications
media we are tacitly saying: we
value you and your ideas. Students The Adaptive Web
won’t miss that gesture. Indeed, The May issue will spotlight adaptive
they will reciprocate and value
more what we are trying to teach Web-based systems—the next generation
them. In so doing, we will provide in user-adaptive software systems.
alternative paths into computer
science for students who might Adaptive systems have the capability to
have turned away from the “Hello, adapt their behavior, often using
World!” view of computing. c
intelligent technologies for user modeling
References
1. AAUW. Tech-savvy: Educating girls in the
and adaptation to the goals, tasks, and
new computer age. American Association of
University Women Education Foundation,
interests of users or groups of users.
New York, 2000.
2. Deitel, H.M. and Deitel, P.J. Java: How to
Program. Prentice-Hall, Upper Saddle River, The articles will feature adaptive
NJ, 1999.
3. Guzdial, M. Squeak: Object-Oriented Design interfaces, animated agents, personalization
with Multimedia Applications. Prentice-Hall,
Englewood, NJ, 2001. techniques, and privacy concerns. The
4. Kay, A. and Goldberg, A. Personal dynamic
media. IEEE Computer (Mar. 1977), 31–41. areas of application include e-commerce,
5. McCracken, M., Almstrum, V., Diaz, D.,
Guzdial, M., Hagan, D., Kolikant, Y.B.-D., Web-based education, job banks, and
Laxer, C., Thomas, L., Utting, I., and Wilusz,
T. A multinational, multiinstitutional study of online health information.
assessment of programming skills of first-year
CS students. ACM SIGCSE Bulletin 33, 4
(2001), 125–140.
6. PITAC. Information technology research:
Investing in our future. President’s Informa-
tion Technology Advisory Committee, 1999;
Also in May:
www.ccic.gov/ac/report. Strategies for Transitioning Old Economy
Firms to E-Business
Mark Guzdial (guzdial@cc.gatech.edu)
is an associate professor in the College of Controlled Publication of Digital Scientific
Computing at the Georgia Institute of Data
Technology.
Elliot Soloway (Soloway@umich.edu) is Managing with Web-based IT in Mind
a professor in the College of Engineering, School
of Information, and School of Education at the Are Intelligent E-Commerce Agents
University of Michigan.
Partners or Predators?

© 2002 ACM 0002-0782/02/0400 $5.00

COMMUNICATIONS OF THE ACM April 2002/Vol. 45, No. 4 21

You might also like