1 / 70

The TeachScheme! Project

The TeachScheme! Project. Adelphi University Brown University Northeastern University University of Chicago University of Utah Worcester Polytechnic Institute. The Revolution. Two principles:. Shift away from machine details.

abby
Download Presentation

The TeachScheme! Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The TeachScheme! Project Adelphi University Brown University Northeastern University University of Chicago University of Utah Worcester Polytechnic Institute

  2. The Revolution Two principles: Shift away from machine details Emphasis on correctness over efficiency (ie, focus on program design)

  3. What’s Wrong withMachine-Oriented Languages? • Make students waste time on unimportant and uninteresting details • Force students to confront issues they are not prepared for • and ... machine arithmetic, pointers and memory addresses, even i/o

  4. What Computer Scienceis Not About The computer! Just as biology isn’t “microscope science” and writing isn’t “pen science” ...

  5. What’s This AboutProgram Design?

  6. Why Am I Here? • The TeachScheme! Project: Outreach program hosted by six universities • Specially designed for high schools • Provides all material -- books, software, etc -- free of charge

  7. What Teachers Experience

  8. Scheme 90% Problem-solving vs 10% Syntax K.I.S.S.Keep It Simple Syntactically C++/Pascal 10% Problem-solving vs 90% Syntax

  9. The Golden Rule ofScheme Syntax ( ) Operation List-of-Arguments or ( Operation Arg1 )

  10. The Golden Rule ofScheme Syntax ( ) Operation List-of-Arguments or ( Operation Arg1 Arg2)

  11. The Golden Rule ofScheme Syntax ( ) Operation List-of-Arguments or ( Operation Arg1 Arg2 . . . Argn )

  12. An Example From Arithmetic 4 + 5 ( Operation Arg1 Arg2 )

  13. Example #1 (cont’d) 4 + 5 ( Operation Arg1 Arg2 ) ( )

  14. Example #1 (cont’d) 4 + 5 ( Operation Arg1 Arg2 ) ( + )

  15. Example #1 (cont’d) 4 + 5 ( Operation Arg1 Arg2 ) ( + 4 )

  16. Example #1 (cont’d) 4 + 5 ( Operation Arg1 Arg2 ) ( + 4 5 )

  17. Example #1 (cont’d) 4 + 5 ( + 4 5 )

  18. Another Arithmetic Example ( 4 + 5 ) · 6

  19. Example #2 (cont’d) ( 4 + 5 ) · 6 ( )

  20. Example #2 (cont’d) ( 4 + 5 ) · 6 ( * )

  21. Example #2 (cont’d) ( 4 + 5 ) · 6 ( * ( + 4 5 ) )

  22. Example #2 (cont’d) ( 4 + 5 ) · 6 ( * ( + 4 5 ) 6 )

  23. Example #2 (cont’d) ( 4 + 5 ) · 6 ( * ( + 4 5 ) 6 )

  24. An Example From Algebra 4 + 5 f( x ) = x + 5

  25. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 )

  26. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 ) ( )

  27. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 ) ( define )

  28. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 ) ( function-name input-name ) ( f x )

  29. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 ) ( define ( f x ) )

  30. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 ) ( output-rule ) ( + x 5 )

  31. Example #3 (cont’d) f( x ) = x + 5 ( Operation Arg1 Arg2 ) ( define ( f x ) ( + x 5 ) )

  32. Example #3 (cont’d) f( x ) = x + 5 ( define ( f x ) ( + x 5 ) )

  33. Algebra Pascal Programf(Input, Output) ; Var x : Integer ; Begin Readln(x); Writeln (x + 5) End . f (x) = x + 5 Scheme ( define( f x ) (+ x 5 ) ) Algebra vs Scheme vs Pascal

  34. Design

  35. D3: Data Drive Design(A Non-Numeric Example) Consider program guest, which determines whether a friend’s name is in a party’s invitation list.

  36. Mathilde . . . John . . . Is Mathilde In The List? No Yes Look in the Rest of the List

  37. Mathilde Sherry . . . . . . Is Mathilde InThe Rest of the List? No Yes Look in the Rest of the List

  38. Pattern To Algebra

  39. Algebra guest ( name, list ) =

  40. Algebra guest ( name, list ) =

  41. Algebra guest ( name, list ) = if list is empty

  42. Algebra guest ( name, list ) = no if list is empty

  43. Algebra guest ( name, list ) = no if list is empty if name = first ( list )

  44. Algebra guest ( name, list ) = no if list is empty yes if name = first ( list )

  45. Algebra guest ( name, list ) = no if list is empty yes if name = first ( list ) otherwise

  46. Algebra guest ( name, list ) = no if list is empty yes if name = first ( list ) guest ( name, rest ( list )) otherwise

  47. Algebra guest ( name, list ) = Scheme ( define ( guest name list ) )

  48. Algebra guest ( name, list ) = Scheme ( define ( guest name list ) )

  49. Scheme ( define ( guest name list ) ( cond )) Algebra guest ( name, list ) =

  50. Algebra guest ( name, list ) = if list is empty if name = first ( list ) otherwise Scheme ( define ( guest name list ) ( cond ))

More Related