Functional Problem Solving (CSC 151 2015F) : Handouts

# Schedule

This is an approximate schedule. Expect topics and dates of topics to change. (I will try to keep due dates of assignments the same.)

Week 01: An Introduction to ...
Date Topic Reading Lab Work Due
01 Friday, 28 August 2015 An Introduction to Algorithms Introduction: What is CS? Exercise: An everyday algorithm. Debriefing on exercise (continues next class).
02 Monday, 31 August 2015 An Introduction to Linux Lessons from day one. Common parts of an algorithm. Getting started with Linux. The Linux Environment and Parts of Algorithms Getting Started with Linux HW 1: Introductory Survey (due 10:30 p.m. Sunday night)
03 Tuesday, 1 September 2015 An Introduction to Scheme Why use programming languages? Scheme history. Scheme basics. Parts of Algorithms, The DrRacket Program-Development Environment, Beginning Scheme, & How Scheme Evaluates Expressions (Take 1) Starting Scheme
04 Wednesday, 2 September 2015 Computing with Symbols and Numbers Values and types. Kinds of numbers. The modulo operation. Numeric Values & Symbolic Values Numeric Computation
05 Friday, 4 September 2015 RGB Colors Color palettes. RGB colors. Representing RGB colors as integers. Design and Color and RGB Colors RGB Colors Quiz 1
Week 02: Transformations and Procedure Basics
Date Topic Reading Lab Work Due
06 Monday, 7 September 2015 Transforming Colors Review: Color basics. Integer-encoded RGB colors. Computing new colors from old. An example. Transforming RGB Colors Transforming RGB Colors
07 Tuesday, 8 September 2015 Transforming Images From transforming colors to transforming images. Sectioning. Anonymous transformations. Transforming Images Transforming Images HW 2: Starting Scheme
08 Wednesday, 9 September 2015 Writing Your Own Procedures Sequencing operations in Scheme. Why define your own procedures? How to define your own procedures. Evaluating expressions in Scheme. Writing Your Own Procedures and How Scheme Evaluates Expressions (Take 2) Writing Your Own Procedures
Thursday, 10 September 2015 Optional Review Session
09 Friday, 11 September 2015 Writing Your Own Procedures, Continued Lab, continued. Questions and reflection. Writing Your Own Procedures and How Scheme Evaluates Expressions (Take 2) Writing Your Own Procedures Quiz 2
Date Topic Reading Lab Work Due
10 Monday, 14 September 2015 Side Effects: Output and Input Simple output in Scheme. Using output to trace program behavior. Reading lines of text with `read-line`. Reading Scheme values with `read`. Side effects. Output in Scheme and Simple Input Operations Side Effects
11 Tuesday, 15 September 2015 Documenting Programs and Procedures Debrief on procedures lab. Pair programming. The need for documentation. The Six P's - a strategy for documenting procedures. A few additional P's. Practice. Documenting Your Procedures and Wray: How Pair Programming Really Works HW 3: Color Transformations and Image Filters
12 Wednesday, 16 September 2015 Testing Your Procedures Why test? Strategies for testing. The primary testing operations. Testing Your Procedures with RackUnit Testing Your Procedures
Thursday, 17 September 2015 Optional Review Session
13 Friday, 18 September 2015 Testing Your Procedures, Revisited Key ideas in testing. Careful postconditions. Exhaustive testing. Making yourself more efficient. Testing Your Procedures Testing Your Procedures Quiz 3
Week 04: Other Image Models
Date Topic Reading Lab Work Due
14 Monday, 21 September 2015 Boolean Values and Predicate Procedures Boolean values. Predicates - Procedures that return Boolean values. Combining booleans with `and` and `or`. Boolean Values and Predicate Procedures Boolean Values and Predicate Procedures
15 Tuesday, 22 September 2015 Drawings as Values Representing images. Thinking about drawings through composition/decomposition. The underlying representation. Pure approaches vs impure approaches. Drawings as Values Drawings as Values Exam 1 (due 10:30 p.m. via email)
16 Wednesday, 23 September 2015 Homogeneous Lists: Making and Manipulating Groups of Drawings Context: What and why lists? Building lists. Mapping lists. Other list operations. Making and Manipulating Homogeneous Lists Making and Manipulating Lists of Drawings Exam 1 (due in class in paper form)
Thursday, 24 September 2015 Optional Review Session
17 Friday, 25 September 2015 Programming the GIMP Tools A new model of images making. Coding algorithms for drawing. Other useful techniques. The GNU Image Manipulation Program and Programming the GIMP Tools Scripting the GIMP Tools Quiz 4
Week 05: Control
Date Topic Reading Lab Work Due
18 Monday, 28 September 2015 Conditionals The parts of an algorithm, revisited. Choosing between two options with `if`. Optional evaluation with `when`. Making multiple choices with `cond`. Comparing approaches. Conditionals Conditionals
19 Tuesday, 29 September 2015 Pause for Breath HW 4: Drawing Generally and Concisely
20 Wednesday, 30 September 2015 Naming Local Values Why name things. Naming things with `let`. Naming things with `let*`. Naming procedures. Local Bindings Local Bindings
Thursday, 1 October 2015 Optional Review Session
21 Friday, 2 October 2015 Anonymous Procedures, Revisited What is a procedure? Describing procedures. Anonymous procedures. Anonymous procedures through lambda expressions. Other kinds of anonymous procedures. Anonymous Procedures Anonymous Procedures Quiz 5
Week 06: Miscellaneous
Date Topic Reading Lab Work Due
22 Monday, 5 October 2015 Images as Functions from Position to Colors Models of images. Iterating over positions: Images as functions from position to color. Blends and other positionally-computed images. Drawing simple shapes. Some strange computations. Building Images by Iterating Over Positions Building Images by Iterating Over Positions
23 Tuesday, 6 October 2015 Revisiting Lists Lists, revisited. New list operations. Drawings as values. Building Data Structures with Heterogeneous Lists Exploring Lists HW 5: Drawing with Conditionals and Anonymous Procedures; Exam 2 assigned
24 Wednesday, 7 October 2015 Recursion Basics Background. The idea of recursion. Some sample recursive procedures. Expressing recursion in Scheme. Recursion Basics Recursion Basics
Thursday, 8 October 2015 Optional Review Session
25 Friday, 9 October 2015 Recursion Basics, Continued Reflection. Questions. Recursion vs. other forms of repetition. Recursion Basics Recursion Basics Quiz 6
Week 07: Recursion
Date Topic Reading Lab Work Due
26 Monday, 12 October 2015 Preconditions, Revisited Verifying preconditions. The `error` procedure. Husk and Kernel programming. Verifying Preconditions Verifying Preconditions
27 Tuesday, 13 October 2015 Characters and Strings Representing text. Characters: The basic building blocks. Combining characters into strings. Characters and Strings Characters and Strings Exam 2 (due 10:30 p.m. via email)
28 Wednesday, 14 October 2015 Recursion with Helper Procedures Basics of helper recursion. A term: Tail recursion. Why write tail recursive procedures? Recursion with Helper Procedures Recursion with Helper Procedures Exam 2 (due in class in paper form)
Thursday, 15 October 2015 Optional Review Session
29 Friday, 16 October 2015 Recursion with Helper Procedures, Continued Further issues in helper recursion. Tail recursion. Recursion with Helper Procedures Recursion with Helper Procedures Quiz 7
Fall Break
Week 08: Recursion, Continued
Date Topic Reading Lab Work Due
30 Monday, 26 October 2015 Other Forms of List Recursion Questions and answers. Some notes on yesterday's lab. Some key ideas from the reading. List Recursion, Revisited List Recursion, Revisited
31 Tuesday, 27 October 2015 Numeric Recursion Recursion, generalized. Numeric recursion. Numeric Recursion Numeric Recursion
32 Wednesday, 28 October 2015 Naming Local Procedures Why have local procedures. Creating local procedures with `letrec`. Creating local procedures with named let. Local Procedure Bindings Local Procedure Bindings
Thursday, 29 October 2015 Optional Review Session
33 Friday, 30 October 2015 Turtle Graphics Modeling images through process: Turtle graphics. Some historical notes. Turtle graphics in MediaScheme. Turtle Graphics Turtle Graphics Quiz 8
Week 09: New Approaches
Date Topic Reading Lab Work Due
34 Monday, 2 November 2015 Iteration Reflecting on procedures and side-effects. A useful tool for repetition: `for-each`. Contrasting `map`, `for-each`, `repeat`, and recursion. Iteration Iteration
35 Tuesday, 3 November 2015 Pause for Breath Geometric Art (Optional) HW 6; Exam 3 distributed
36 Wednesday, 4 November 2015 Randomized (Unpredictable) Drawing Random art. Why use randomness. The `random` procedure. Simulation. Randomized Drawing Randomized Drawing
Thursday, 5 November 2015 Optional Review Session
37 Friday, 6 November 2015 Pairs and Pair Structures Representing lists: Pairs and cons cells. Why care about the underlying representation? Pairs and Pair Structures Pairs and Pair Structures Quiz 9
Week 10: Data Structures
Date Topic Reading Lab Work Due
38 Monday, 9 November 2015 Vectors Problems with lists. A solution: Vectors. Behind the scenes: How Scheme implements vectors. Important vector procedures. Vectors Vectors
39 Tuesday, 10 November 2015 Pause for Breath No Reading Exam 3 (due 10:30 p.m. via email); Project assigned
40 Wednesday, 11 November 2015 On Two-Dimensional Design Background: About the project. Some examples. General elements of design. Relationships between elements. Broader design principles. Some examples. Elements and Principles of Two-Dimensional Design & About the Project Exam 3 (due in class in paper form)
Thursday, 12 November 2015 Optional Review Session
41 Friday, 13 November 2015 Project Kickoff Time to form groups. A few more notes on design. Playing and brainstorming. Project Ideas Playing with Project Ideas Quiz 10
Week 11: Miscellaneous
Date Topic Reading Lab Work Due
42 Monday, 16 November 2015 Trees Thinking about trees in terms of `cons`. Thinking about trees recursively. Writing recursive tree procedures. Trees Trees Project proposal due at 10:30 p.m.
43 Tuesday, 17 November 2015 Higher-Order Procedures, Revisited Some program design principles. Thinking about repetition. Procedures as first-class values. Design Patterns and Higher-Order Procedures Design Patterns and Higher-Order Procedures Project proposal images due
44 Wednesday, 18 November 2015 Files in Scheme File basics: Data persistence and beyond. Ports. Basic file operations. Files in Scheme Files in Scheme
Thursday, 19 November 2015 Optional Review Session
45 Friday, 20 November 2015 Pause for Breath Project work time. Key techniques. No Reading Quiz 11
Week 12: Searching
Date Topic Reading Lab Work Due
46 Monday, 23 November 2015 Analyzing Procedures Comparing algorithms. Two related metrics: Time and Number of steps. Counting procedure calls by printing. Tools for analysis. Analyzing Procedures Analyzing Procedures
47 Tuesday, 24 November 2015 Association Lists Storing information in tables. Representing table entries as lists. Representing tables as lists. Association lists: Scheme's standard table representation. Implementing key association list procedures. Association Lists Association Lists Project due
48 Wednesday, 25 November 2015 Binary Search The problem of searching. Analyzing algorithmic efficiency. Making searching more efficient using divide-and-conquer. A demo: Destructive binary search. Considering the parameters to binary search. Search Algorithms Exam 4 distributed
Thanksgiving Break
Week 13: Project Reflections
Date Topic Reading Lab Work Due
49 Monday, 30 November 2015 Project Assessment: Images Reviewing images: The "big picture". Reviewing images: Policies for doing individual images. Image review. Debrief, if appropriate.
50 Tuesday, 1 December 2015 Project Assessment: Algorithms Additional images. Debriefing from image analysis. Clever code: How'd you do that? Code crits: Why'd you do that?
51 Wednesday, 2 December 2015 Binary Search Lab Exploring the search API. Remaining questions. Search Algorithms Binary Search
Thursday, 3 December 2015 Optional Review Session
52 Friday, 4 December 2015 An Introduction to Sorting The problem of sorting. Writing sorting algorithms. Examples: Insertion, selection, etc. Formalizing the problem. No Reading Quiz 13
Week 14: Wrapup
Date Topic Reading Lab Work Due
53 Monday, 7 December 2015 Insertion Sort Insertion sort basics. Four questions about insertion sort. Analyzing insertion sort. Sorting Insertion Sort Exam 4 (due 10:30 p.m. via email)
54 Tuesday, 8 December 2015 Merge Sort More efficient sorting techniques. Divide and conquer, revisited. Merge sort. Analyzing merge sort. Merge Sort Merge Sort Exam 4 (due in class in paper form)
55 Wednesday, 9 December 2015 Recap The subject matter(s) of the course. Topics within each subject matter. Looking behond the class.
Thursday, 10 December 2015 Optional Review Session
56 Friday, 11 December 2015 Wrapup Course evaluation. Comments on the final. Final comments.