60
Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Embed Size (px)

Citation preview

Page 1: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Making and Manipulating Media for Learning

Mark Guzdial

College of Computing/GVU

Georgia Institute of Technology

Page 2: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Story

The Dynabook model for what a computer is for. Learning through manipulating media.

30 years of literature suggests that it’s the right idea.

Two examples of trying it: Learning gravity by simulating it in elementary school Learning programming by manipulating media as a

context.

Page 3: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Dynabook to Personal Computer

The Personal Computer* as we know it today was invented in pursuit of the Dynabook

(*And object-oriented programming, too!)

Page 4: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Alan Kay’s Dynabook (1972)

Alan Kay sees the Computer as Man’s first metamedium A medium that can represent any other media: Animation,

graphics, sound, photography, etc. Programming is yet another medium

The Dynabook is a (yet mythical) computer for creative metamedia exploration and reading Handheld, wireless network connection Writing (typing), drawing and painting, sound recording, music

composition and synthesis One goal: End-user programming. But WHY?

Page 5: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Prototype Dynabook(Xerox PARC Learning Research Group)

Page 6: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

A Dynabook is for Learning

The Dynabook offers a new way to learn new kinds of things…and perhaps old things in better ways Knowledge representation: Think about your own thinking

(Papert, 1980) Programming (Kay & Goldberg, 1977)

But need a system for creative expression In a time when “windows” were made of glass, and “mice”

were undesirable rodents

Page 7: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Smalltalk-72

For the Dynabook, WIMP was invented: overlapping

Windows Icons Menus mouse Pointer

Page 8: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

What ~30 Years of Learning Sciencestell us about the Dynabook model

Since the 1970’s, Learning Scientists (Resarchers in Cognitive Science, Education, AI, etc.) have studied learning Do people learn from watching multimedia? Do people learn from creating multimedia? How well do people learn programming?

Page 9: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Do media make a difference in learning? Not obvious

“Equivalenced” media show little difference in learning benefit (Clark, 1983)

But it may be that equivalencing is the problem (Kozma, 1991) Mixing media may make a big difference

The case of animation Some studies show animations improve learning (Mayer, 1988) Most show animation has no benefit in learning (Stasko, Badre,

Lewis, 1993), and can even hinder learning (Palmiter, Elkerton, Baggett, 1991)

Page 10: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Do people learn from creating media?

Yes, and it’s a clearer case Children building educational software for other kids

learn fractions and science (Harel, 1988; Kafai & Harel, 1990)

Students building multimedia end up with higher grades (Hay et al., 1994)

“Multimedia literacy” may be a component of expertise For example, expert chemists constantly shift between

media and representations (Kozma et al., 1996)

Page 11: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

How well do people learn programming? Really, really badly Freshmen and Sophomores at Yale couldn’t handle error

conditions in loops in 1982 (Soloway et al.) Freshmen and Sophomores in 3 countries and 4 institutions

can’t build calculators in 2001 (McCracken et al., 2001) Failure/withdrawl rate in CS1 is double-digits in most

institutions Percentage of women and minorities in CS is falling

Page 12: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Bottom line: Not a bad idea!

30 years of research says that the Dynabook is a pretty good model. Creation of media is a real “killer app” for

learning with computers. Programming is much harder to teach than we

thought,but maybe more of a Dynabook focus would help there, too!

Page 13: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Two Stories

Using Squeak to teach elementary school science students about gravity…by simulating it!

Using a media computation context to learn programming by non-majors.

Page 14: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Squeak

Smalltalk-80 running on modern machines (over 30 platforms) http://www.squeak.org Supporting wide range of media: Flash, MIDI, AIFF/WAV, MPEG Open-source

Alan Kay, Dan Ingalls, Ted Kaehler from original Xerox PARC LRG Apple to Disney to Viewpoints Research

http://www.squeakland.org

Page 15: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Breaking the Lines

Page 16: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Squeak Books

Page 17: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Example of Squeak scripting: Building the car

Page 18: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Testing Gravity, by timing it

Page 19: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Segmenting the video, measuring the acceleration

Page 20: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Duplicate the measurement

Page 21: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Simulate the Reality

Page 22: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Computer science is more important than Calculus In 1961, Alan Perlis argued

that computer science should be part of a liberal education. Explicitly, he argued that all

students should learn to program.

Calculus is about rates, and that’s important to many.

Computer science is about process, which is important to everyone

Page 23: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

How close are we to being able to teach everyone CS?

Not very CS1 is one of the most despised courses for non-majors

At many departments, CS retention rates are lower than the rest of campus At Georgia Tech: 65% for 1995 cohort, vs. 73% for

Engineeering

Drop-out rates near 50% at many institutions Female enrollment in CS has been dropping nationally

Page 24: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Why?

Several recent studies and books claim that CS instruction tends to dissuade anyone but white males “Tedious,”

“taught without application relevance,”“boring,” “lacking creativity,” “asocial”

Page 25: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

The best uses for computing technologies will come from others

Thomas Edison vs. D.W. Griffith Suggestion: D.W. Griffith knew things that Edison didn’t.

If we want computing technologies to become useful, they have to get out of our hands.

It can’t be just through applications. Computer science will never have the potential

that it might, if future practitioners hate our introductory course!

Page 26: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

The Challenges

We need to motivate CS, potential CS, and non-CS students to care about computing

We need to make it social, creative, relevant,exciting, and not tedious

Which is how many of us already see Computing, but that’s not getting communicated

Page 27: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Our Attempt: Introduction to Media Computation A course for non-CS and non-Engineering majors

International Affairs, Literature, Public Policy, Architecture, Management, Biology, etc.

120 students this semester,planning 400-600 in the Fall 2/3 female in this semester’s CS1315

Focus: Learning programming and CS concepts within the context of media manipulation and creation

Language: Python (Jython)

Page 28: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Motivating the Computing

As professionals, these students will often the use the computer as a communications medium.

All media are going digital,and digital media are manipulated with software.

Knowing how to program, then, is a communications skill.

Page 29: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

def negative(picture): for px in getPixels(picture): red=getRed(px) green=getGreen(px) blue=getBlue(px) negColor=makeColor(255-red,255-green,255-blue) setColor(px,negColor)

def clearRed(picture): for pixel in getPixels(picture): setRed(pixel,0)

def greyscale(picture): for p in getPixels(picture): redness=getRed(p) greenness=getGreen(p) blueness=getBlue(p) luminance=(redness+blueness+greenness)/3 setColor(p, makeColor(luminance,luminance,luminance))

Page 30: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

def chromakey(source,bg): for x in range(1,getWidth(source)): for y in range(1,getHeight(source)): p = getPixel(source,x,y) # My definition of blue: If the redness + greenness < blueness if (getRed(p) + getGreen(p) < getBlue(p)): #Then, grab the color at the same spot from the new background setColor(p,getColor(getPixel(bg,x,y))) return source

Page 31: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Use a loop!Our first picture recipe

def decreaseRed(picture): for p in getPixels(picture): value=getRed(p) setRed(p,value*0.5)

Used like this:>>> file="/Users/guzdial/mediasources/barbara.jpg">>> picture=makePicture(file)>>> show(picture)>>> decreaseRed(picture)>>> repaint(picture)

original

Page 32: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Recipe to Increase the Volume

def increaseVolume(sound): for sample in getSamples(sound): value = getSample(sample) setSample(sample,value * 2)

Using it:>>> f="/Users/guzdial/mediasources/gettysburg10.wav">>> s=makeSound(f)>>> increaseVolume(s)>>> play(s)>>> writeSoundTo(s,"/Users/guzdial/mediasources/louder-g10.wav")

Page 33: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

A Sunset-generating function

How do we turn this beach scene into a sunset?

What happens at sunset? Tried increasing the red,

but that failed.

New Theory: As the sun sets, less blue and green is visible, which makes things look more red.

Page 34: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

A Sunset-generation Functiondef makeSunset(picture): for p in getPixels(picture): value=getBlue(p) setBlue(p,value*0.7) value=getGreen(p) setGreen(p,value*0.7)

Page 35: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

SlowSunset

def slowsunset(directory): canvas = makePicture(getMediaPath("beach-smaller.jpg")) #outside the loop! for frame in range(0,100): #99 frames printNow("Frame number: "+str(frame)) makeSunset(canvas) # Now, write out the frame writeFrame(frame,directory,canvas)

def makeSunset(picture): for p in getPixels(picture): value=getBlue(p) setBlue(p,value*0.99) #Just 1% decrease! value=getGreen(p) setGreen(p,value*0.99)

Not showing you writeFrame() because you know how that works.

Just one canvas repeatedly being manipulated

Page 36: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

SlowSunset frames

Page 37: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Introducing IF:Making Barb a redhead

def turnRed(): brown = makeColor(57,16,8) file = r"C:\Documents and Settings\Mark Guzdial\My Documents\mediasources\barbara.jpg" picture=makePicture(file) for px in getPixels(picture): color = getColor(px) if distance(color,brown)<50.0: redness=getRed(px)*1.5 setRed(px,redness) show(picture) return(picture) Original:

Page 38: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Generalizing Algorithms

We talk about algorithm complexity later in the course, after the media is done.

We talk about different approaches to the same problem, where the criteria might be aesthetics or correctness, instead of speed or size For example, generating greyscale

During the media, we point out similar themes in different functions.

Page 39: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Scaling the picture downdef copyBarbsFaceSmaller(): # Set up the source and target pictures barbf=getMediaPath("barbara.jpg") barb = makePicture(barbf) canvasf = getMediaPath("7inX95in.jpg") canvas = makePicture(canvasf) # Now, do the actual copying sourceX = 45 for targetX in range(100,100+((200-45)/2)): sourceY = 25 for targetY in range(100,100+((200-25)/2)): color = getColor(getPixel(barb,sourceX,sourceY)) setColor(getPixel(canvas,targetX,targetY), color) sourceY = sourceY + 2 sourceX = sourceX + 2 show(barb) show(canvas) return canvas

Page 40: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Scaling the picture updef copyBarbsFaceLarger(): # Set up the source and target pictures barbf=getMediaPath("barbara.jpg") barb = makePicture(barbf) canvasf = getMediaPath("7inX95in.jpg") canvas = makePicture(canvasf) # Now, do the actual copying sourceX = 45 for targetX in range(100,100+((200-45)*2)): sourceY = 25 for targetY in range(100,100+((200-25)*2)): color = getColor(getPixel(barb,int(sourceX),int(sourceY))) setColor(getPixel(canvas,targetX,targetY), color) sourceY = sourceY + 0.5 sourceX = sourceX + 0.5 show(barb) show(canvas) return canvas

Page 41: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Recipe for halving the frequency of a sound

def half(filename): source = makeSound(filename) target = makeSound(filename)

sourceIndex = 1 for targetIndex in range(1, getLength( target)+1): setSampleValueAt( target, targetIndex,

getSampleValueAt( source, int(sourceIndex))) sourceIndex = sourceIndex + 0.5

play(target) return target

This is how a sampling synthesizer works!

Here are the pieces that do it

Page 42: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Compare these two

def half(filename): source = makeSound(filename) target = makeSound(filename)

sourceIndex = 1 for targetIndex in range(1, getLength( target)+1): setSampleValueAt( target, targetIndex,

getSampleValueAt( source, int(sourceIndex)))

sourceIndex = sourceIndex + 0.5

play(target) return target

def copyBarbsFaceLarger(): # Set up the source and target pictures barbf=getMediaPath("barbara.jpg") barb = makePicture(barbf) canvasf = getMediaPath("7inX95in.jpg") canvas = makePicture(canvasf) # Now, do the actual copying sourceX = 45 for targetX in range(100,100+((200-45)*2)): sourceY = 25 for targetY in range(100,100+((200-25)*2)): color = getColor(

getPixel(barb,int(sourceX),int(sourceY))) setColor(getPixel(canvas,targetX,targetY), color) sourceY = sourceY + 0.5 sourceX = sourceX + 0.5 show(barb) show(canvas) return canvas

Page 43: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Both of them are sampling

Both of them have three parts: Set up the objects Loop over samples or pixels and copy from one place to

another To decrease the frequency or the size, we take each

sample/pixel twice In both cases, we do that by incrementing the index by

0.5 and taking the integer of the index Finishing up and returning the result

Page 44: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Using your personal pictures

Page 45: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

And messin’ with them

Page 46: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Data-first Computing

Real users come to a user with data that they care about, then they (unwillingly) learn the computer to manipulate their data as they need.

Introduction to Media Computation works the same. We use pictures of students in class demonstrations. Students do use their own pictures as starting points for

manipulations. They started doing this in the second week

How often do students use concepts from the second week of CS1 on their own data?

How does that change the students’ relationship to the material?

Page 47: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Rough overview of Syllabus Defining and executing functions Pictures

Psychophysics, data structures, defining functions, for loops, if conditionals

Sounds Psychophysics, data structures, defining functions, for

loops, if conditionals Text

Converting between media, generating HTML, saving text from database and using in HTML, text searching Web pages (e.g., for data like the temperature)

Movies Then, Computer Science

Page 48: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Computer science as a solution to their problems “Why is PhotoShop so much faster?”

Compiling vs. interpreting Machine language and how the computer works

“Movie-manipulating programs take a long time to execute. Why?” Algorithmic complexity

“Writing programs is hard! Are there ways to make it easier? Or at least shorter?” Functional programming and recursion Object-oriented programming

Page 49: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Assignments encourage creativity

For several homeworks, the task is to manipulate media in some way, but we don’t care what media For example, creating a collage or building an animation

Encouraging homework results to be posted to CoWeb (collaborative website) in galleries

Page 50: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

First Homework assignment

Homework 1:

Write a program named hw1 to accept a picture as input, and change its pixels as follows:

• Set the green component to 125% of its current value • Decrease the blue by 25% • Decrease the red by 75%

Page 51: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Solutions shared in the CoWeb

Page 52: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Grade distribution

Much better than anticipated.

Page 53: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Homework #3: Make a collage with images that you modify by code only—any images you want

Page 54: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Grades on Homework #3

Page 55: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Assessment results so-far

Of the 120 students who started, only two dropped the course.

97% of the students on a midterm survey answered Yes to “Are you learning to program?” Compared with 88% in our traditional CS1

Page 56: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

What do you like about the class?

“I like the feeling when I finally get something to work.” “Very applicable to everyday life.” ‘I dreaded CS, but ALL of the topics thus far have been

applicable to my future career (& personal) plans- there isn't anything I don't like about this class!!!”

“When I finally get a program to work like I want it to.” “The professor answers questions in class and online and is

concerned about our success in the class. He also seems to understand that most of us are not engineers and most likely won't do straight programming in the future- just the way of thinking is important.”

Page 57: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

What have you learned that you found interesting or surprising? “The most useful things I have learned are the

basics about computers and pictures/sound. I think when we learn HTML- that will be interesting and useful to real life applications.”

“Just general concepts about programming. It's pretty logical, sort of like in math, so it's understandable.”

“Programming is fun and ANYONE can do it!”

Page 58: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

The Power of the Dynabook

The Dynabook has given us the desktop user interface and object-oriented programming.

But it also offers its original purpose: A model for using the computer for learning. Allowing students to learn from the real world by

manipulating media from it and simulating it. Motivating students to learn hard things in interesting

ways.

Page 59: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

Acknowledgements

Kim Rose for the Squeakers DVD Course materials development: Jason Ergle, Claire

Bailey, David Raines, Joshua Sklare, Adam Wilson, Andrea Forte, Mark Richman, Matt Wallace, Alisa Bandlow.

Assessment: Andrea Forte, Rachel Fithian, Lauren Rich Thanks to Bob McMath and the Al West Fund, to GVU

and CoC, and the National Science Foundation

Page 60: Making and Manipulating Media for Learning Mark Guzdial College of Computing/GVU Georgia Institute of Technology

For further information

Squeak: http://www.squeak.org Viewpoints Research:

http://www.viewpointsresearch.org Course CoWeb:

http://coweb.cc.gatech.edu/cs1315 Where we planned the course:

http://coweb.cc.gatech.edu/mediaComp-plan [email protected]