A Story About Teaching Programming - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

A Story About Teaching Programming

Description:

I only claim to know how a story ought to be told, for I have been almost daily ... Words which are things..., (Childe Harold's Pilgrimage, Canto III) ... – PowerPoint PPT presentation

Number of Views:123
Avg rating:3.0/5.0
Slides: 41
Provided by: bev2
Category:

less

Transcript and Presenter's Notes

Title: A Story About Teaching Programming


1
A Story About Teaching Programming
2
  • I do not claim that I can tell a story as it
    ought to be told. I only claim to know how a
    story ought to be told, for I have been almost
    daily in the company of the most expert
    story-tellers for many years.
  •  
  • Mark Twain

3
  • It is easy to write a course outline. It is
    another matter entirely to move the content of
    that outline from the writers pen into the
    students brain.
  •  
  • Steve McConnell

4
  • The programmer, like the poet, works only
    slightly removed from pure thought-stuff. He
    builds his castles in the air, from air, creating
    by exertion of the imagination.
  •  
  • Frederick P. Brooks, Jr.

5
  • Story telling
  • parables
  • fables
  • histories .
  • myths
  • fairy tales

6
  • not just entertainment
  • educational purpose
  • propaganda
  • cautionary tales
  • the Archers

7
  • Story telling in broadest sense
  •  
  • oral
  • written
  • films
  • plays

8
  • People like stories
  • want to hear them
  • pass them on
  • learn from them painlessly
  • want to hear them again
  •  
  • seems were story tellers and listeners

9
  • so why not apply it to programming?
  •  
  • not rigidly
  • metaphor
  • simile
  • a mindset
  • teaching as a story / using stories
  • programming as a story / script

10
  • Three strands
  • teaching as story telling
  • programming as story writing
  • programs as story text

11
Teaching As Story Telling
12
  • good story has
  • beginning
  • middle
  • end
  • characters
  • some problem/adversity/ goal/aim
  • reached or overcome
  • its own internal logic
  •  
  • actually a bit like a good program

13
  •  
  • what are we teaching?
  •  
  • not a language
  •  
  • teaching people to think - Dijkstra

14
  • syntax
  • getting past the compiler
  • logic
  • getting past the problem
  • testing
  • getting past the user
  •  
  • binary opposites

15
  • syntactical structures
  •  
  • sequence
  • iteration
  • selection
  •  
  • tell em in the right order
  • tell em repeatedly
  • if one way doesnt work tell em another way
  •  

16
  • lets take selection structures
  • if
  • if else
  • else if
  • switch / case
  • the c one with the question mark
  • which do you teach first?
  • in what order?

17
  • in a story
  • characters have a narrative purpose
  • have to be introduced naturally
  • reader can only handle so many characters
  •  
  • apply this to teaching programming

18
  • why teach all selections at once?
  • start with simplest
  • introduce next
  • when needed
  • when it solves a purpose
  • not syntax for the sake of completeness

19
  • the character of selection deepens but
    understandably
  • problem followed by resolution
  • a structure might exist
  • do we have to teach it?

20
  • wood or trees?
  • All those bells and whistles
  • those so-called powerful features
  • belong more to the problem set
  • than to the solution set.
  • Dijkstra

21
  • omniscient author
  • my story my way
  • dictatorial
  • also humble
  • in a tradition
  • got the story from others
  • heros

22
  • deliberate limit on structures
  • say Im doing it
  • promise Ill explain later
  • keep that promise
  •  
  • Im not on oath
  • I will lie to make things simpler
  • ie tell stories

23
Programming As Story Writing
24
  • how do we teach/encourage problem solving?
  • how do we teach/encourage problem creativity?
  • they have to
  • understand the (trivial) problem is
  • imagine a way to solve it
  • code the solution

25
  • how do story tellers learn?
  • By listening to story tellers
  • look at program as story or script
  • tell them how its been done before
  • give them examples
  • only so many plots

26
  • code reading exercises / examples
  • code writing exercises / examples
  • go hand in hand
  •  
  • The exercises are a series of McGuffins
  • new syntax/ structures linked to problem solution

27
Code Reading
  • examples
  • reworked using new structures
  • reading each others code in pairs
  • inspecting teachers code faulty examples
  • anything can be inspected

28
Code Reading
29
  • comprehension
  • précis
  • descriptive dry runs
  •  
  • important to write answer

30
-A.A. Milne
  • "Sometimes, when you area Bear of very very
    Little Brain,and you think of Things,you find
    sometimes that a Thing which seemed very
    Thingishinside you is quite different when it
    gets out into the openand has other
    peoplelooking at it."

31
Code Writing
  •  steal from creative writing
  •  
  • telegram technique
  • leads on to stubs
  • renga / exquisite corpse
  •  

32
Prewriting
  • journalling
  • free writing
  • image streaming
  • lists
  • visualization
  • brainstorming - individually or as a group
  • webbing/mapping/clustering
  • graphic organizers
  • topic or word chart

33
Testing / Debugging
  •  program as script
  • dynamic lifting off page
  •  
  • finger on page
  • line by line explanation
  • and then .
  •  
  • debugging
  • war stories
  • Dr Watson

34
Programs As Text
35
  • unconcerned with mere functionality
  • document meant to communicate with humans
  •  
  • layout
  • examples of bad layout
  • refuse to help until layout ok
  •  

36
  • meaningful names
  • Helen Sweetstory poor choice for psychopath
  • kenning
  • stories of stupid names

37
  • comments
  •  
  • aside to reader
  • show dont tell
  • celebrity
  • Lottery player

38
Problems
  • story telling too much fun
  • one mans meat
  • shaggy dog story
  •  
  • scalability
  • nursery rhymes easy
  • childe harolds pilgimage hard
  •  

39
Problems
  • complexity
  • see spot run
  • out, damned spot!
  • seeing dynamic in static
  •  

40
Objects?
  • I do believe,Though I have found them not, that
    there may beWords which are things,
  •  
  • (Childe Harold's Pilgrimage, Canto III)
Write a Comment
User Comments (0)
About PowerShow.com