What are the didactical principles for teaching computer science

advertisement
What are the didactical principles for
teaching computer science
Professor Viera K. Proulx
College of Computer Science
Northeastern University
Boston, Massachusetts, USA
vkp@ccs.neu.edu
http://www.ccs.neu.edu/home/vkp
Outline
 Why teach computer science/informatics
 What are the key ideas
 What are the key didactical principles
 Using technology to teach computer science
 Teaching computer science without technology
 Concluding remarks
 Acknowledgements
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Why teach computer science/informatics
 Recent report by the National Research Council, USA
defined:
 Fluency in Information Technology
contemporary skills
use of computer and applications
foundational concepts
mostly informatics
intellectual capabilities
abstract thinking and reasoning skills
 http://www2.nas.edu/cstbweb/
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Why teach computer science/informatics
 Contemporary skills (NRC report)
setting up a personal computer
using basic operating system features
using a word processor, spreadsheet, database
using graphics package
connecting to a network and using Internet to find information
using computer to communicate with others
using instructional materials to learn how to use new
applications or features
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Why teach computer science/informatics
 Intellectual Capabilities (NRC report)
engage in sustained reasoning
manage complexity
test a solution
manage problems in faulty solutions
organize and navigate information structures and evaluate
information
collaborate; communicate to other audiences
expect the unexpected
anticipate changing technologies
think about information technology abstractly
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Why teach computer science/informatics
 Foundational Concepts (NRC report)
computers: program, interpretation, CPU, memory, I/O
information systems: hardware, software, interfaces, people…
networks: physical structure, protocols, bandwidth, standards
digital representation of information: text, images, sound, video
modeling and abstraction: validity, limitations, how it works
algorithmic thinking and programming
universality: every computer works the same way!!!
limitations: growth rate, tractability, decidability, accuracy
societal impact of information and information technology
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
What are the key didactical principles
 Understand what are the key concepts you are trying to
teach
 Make examples interesting and relevant
 Provide projects that focus on the concept
 Use graphics and illustrations to model the concept
 Present patterns in design and programs
 Support collaboration and interaction
 Set the stage for further exploration
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using Technology to teach computer science
 Programs that generate graphics as main output
motivation and visual debugging
illustration of concepts
 Animations that illustrate the key concepts
to support lectures
to provide environment for experimentation
 Modeling real uses of computers
 Web sites with supporting material
 Excel as a modeling and exploration tool
 (ask Erich Neuwirth…)
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Programs that generate graphics:
scaled drawings
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Programs that generate graphics:
animated loops
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Programs that generate graphics:
nested loop patterns
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Graphics for feedback and motivation:
maze search
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Graphics for feedback and motivation:
function plotting and sorting
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Mini applications:
piano keyboard, MiniPaint
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
cryptography (Ceasar’s shift)
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
Mars planetary images
real data
lot of data
mixed text,
numeric, and pixel
data
image
enhancement
additional topics
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
Mars planetary images
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
morphing line drawings
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
morphing images
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
recursive fractal grammars
recursive fractal grammars (L-systems)
impressive use of recursion
example of the need for extensive
computational power
seeing order of growth in ‘real life’
design issues for display (scaling)
need for recomputation, good design
power of algorithm
generate complex drawings from only a
few lines of grammar definition
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
recursive fractal grammars
recursive fractal grammars (L-systems)
Example:
The Sierpinski Gasket:
angle = 60°
S -> R
L -> R+L+R
R -> L-R-L
FASS Curves (space-filling, self-avoiding, simple, and self-similar)
Example:
Hexagonal Gosper Curve:
angle = 60°
S -> L
L -> L+R++R-L--LL-R+
R -> -L+RR++R+L--L-R
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
recursive fractal grammars: Sierpinski gasket, dragon
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
recursive fractal grammars: tree
Bracketed OL-systems
angle = 20°
S -> F
F -> F[+F]F[-F][F]
N=6
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Modeling real world computer science:
traffic simulation
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using technology to teach algorithms
 Animated demonstration
to present concept in a lecture
for student to explore on her own
to compare several algorithms and their properties
 Timing analysis programs
to conduct experiments
to learn about algorithm complexity
to learn to design and evaluate experiments
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using technology to teach algorithms:
sorting
Insertion sort
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using technology to teach algorithms:
sorting
Quicksort
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using technology to teach algorithms:
binary trees
Expression tree:
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using technology to teach algorithms:
binary trees
Heap (priority queue):
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Using technology to teach algorithms:
graph algorithms: breadth first search
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
What are the key didactical principles
 Understand what are the key concepts you are trying to
teach
 #Make examples interesting and relevant
 Provide projects that focus on the concept
 #Use graphics and illustrations to model the concept
 Present patterns in design and programs
 Support collaboration and interaction
 #Set the stage for further exploration
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
What are the key didactical principles
 #Understand what are the key concepts you are trying
to teach
many input prompts and input statements make code messy
• solution: filtered input:
– X = RequestInt(“Next number:”, 0);
when animating algorithms, make sure focus is on algorithm
 Provide projects that focus on the concept
design the solution first:
• make students work on key parts
• supply the framework
make your code a model of good practice
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
What are the key didactical principles
 Present patterns in design and programs
programming patterns:
loop design patterns
decision patterns
algorithmic patterns
do for all and collect cumulative result
greedy method - do the easiest case first
divide and conquer
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
What are the key didactical principles
 Present patterns in design and programs
design and object patterns:
scaling
change in the frame of reference
objects that represent a state
function objects that generate values
migrating objects that belong to several collections over time
collection objects
• of other objects
• of references to objects
traversal objects (iterators)
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Present patterns in design and programs
 Hospital Emergency Room Simulation
patient arrival: random number, severity code, treatment time
discrete probability distribution function object
generates next value for a given probability
waiting room: priority queue
beds: available versus in-use
design choices how to handle the free list
patient object: migrating object = referenced
statistics:
where is data collected, design of the experiments
meaning and validity of results
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
What are the key didactical principles
 Support collaboration and interaction
group work
exploration of animations
hands-on illustrations
“food for thought” questions
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Support interaction
 Towers of Hanoi:
hand simulate to deduce the pattern
estimate and verify the expected number of moves
when will the world end - exponential growth (rice)
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Support interaction
 Binary cards:
 tttt
 tttt
 tttt
 tttt

1
tt
tt
tt
tt
0
tt
tt
1
tt
1
t
0
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
=
21
Support interaction
 Binary story:
I was born in year 110 1100 1010 in Bonn
I became a professional musician at the age of 1011
I lived in Vienna since 111 0000 0010
I wrote my first symphony in 111 0000 1000
The third symphonyEroica was written in 111 0000 1100
I died in 111 0010 0011
My name is: ???????
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Support interaction
 Binary clock:
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
The network game
Compare your address
1 0 0 1
with address on the message 1 1 0 1
Mark with X all places where
the addresses are the same, X
and copy the address of the
message into the other places
0 X
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
X
X
1
The network game
Select a color for one of the positions
that do not have X
Mark the selected position with X and
send the message along the wire of that
color
For example, for the message address
X 1 0 X

select the second position
Didactics for Computer Science

mark >><<
theViera
new
address
as
X X
K. Proulx
>><< May
1999
0 X
The network game
If you receive a message, select next
color
and send it.
Messages with addresses X X X X are
for you.
Read them and reply to the sender.
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Which concepts did we cover:
 Foundational Concepts (NRC report)
computers: program, interpretation, CPU, memory, I/O
information systems: hardware, software, interfaces, people…
networks: physical structure, protocols, bandwidth, standards
digital representation of information: text, images, sound, video
modeling and abstraction: validity, limitations, how it works
algorithmic thinking and programming
universality: every computer works the same way!!!
limitations: growth rate, tractability, decidability, accuracy
societal impact of information and information technology
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Which capabilities did we cover:
 Intellectual Capabilities (NRC report)
engage in sustained reasoning
manage complexity
test a solution
manage problems in faulty solutions
organize and navigate information structures and evaluate
information
collaborate; communicate to other audiences
expect the unexpected
anticipate changing technologies
think about information technology abstractly
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Conclusion
 Computer science provides foundation for abstract
thinking and reasoning
 The key ideas help understand the technology and
adapt to the change
 The key didactical principles: experiential learning
 Use technology, engage students without technology
 Explore the breadth of computer science applications
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Acknowledgements
 Collaborators: Richard Rasala and Harriet Fell
 Support form the NSF Foundation
DUE ILI-LLD 9650552
 Support from MicroSoft Corporation
 Inspiration and suggestions: Erich Neuwirth
 and my family…
 http://www2.nas.edu/cstbweb/
 http://www.acm.org/education/hscur/
 http://www.ccs.neu.edu/home/vkp/
Didactics for Computer Science
>><< Viera K. Proulx >><< May
1999
Download