Functional Problem Solving (CSC 151 2016S) : 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 Monday, 25 January 2016 An Introduction to Algorithms Introduction: What is CS? Exercise: An everyday algorithm. Debriefing on exercise (continues next class).
02 Tuesday, 26 January 2016 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
03 Wednesday, 27 January 2016 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
Thursday, 28 January 2016 Optional Review Session
04 Friday, 29 January 2016 Computing with Symbols and Numbers Values and types. Kinds of numbers. The modulo operation. Numeric Values & Symbolic Values Numeric Computation Quiz 1
Week 02: Transformations and Procedure Basics
Date Topic Reading Lab Work Due
05 Monday, 1 February 2016 RGB Colors Color palettes. RGB colors. Representing RGB colors as integers. Design and Color and RGB Colors RGB Colors
06 Tuesday, 2 February 2016 Transforming Colors Review: Color basics. Integer-encoded RGB colors. Computing new colors from old. An example. Transforming RGB Colors Transforming RGB Colors HW 2: Poking Holes in Algorithms
07 Wednesday, 3 February 2016 Transforming Images From transforming colors to transforming images. Sectioning. Anonymous transformations. Transforming Images Transforming Images
Thursday, 4 February 2016 Optional Review Session
08 Friday, 5 February 2016 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 Quiz 2
Date Topic Reading Lab Work Due
09 Monday, 8 February 2016 Writing Your Own Procedures, Continued More about procedures. Lab, continued. Questions and reflection. Writing Your Own Procedures and How Scheme Evaluates Expressions (Take 2) Writing Your Own Procedures
10 Tuesday, 9 February 2016 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
11 Wednesday, 10 February 2016 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
Thursday, 11 February 2016 Optional Review Session
12 Friday, 12 February 2016 Testing Your Procedures Why test? Strategies for testing. The primary testing operations. Testing Your Procedures with RackUnit Testing Your Procedures Quiz 3
Week 04: Other Image Models
Date Topic Reading Lab Work Due
13 Monday, 15 February 2016 Testing Your Procedures, Revisited Key ideas in testing. Careful postconditions. Exhaustive testing. Making yourself more efficient. Testing Your Procedures Testing Your Procedures
14 Tuesday, 16 February 2016 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)
15 Wednesday, 17 February 2016 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 (cover sheet due in class)
Thursday, 18 February 2016 Optional Review Session
16 Friday, 19 February 2016 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
17 Monday, 22 February 2016 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
18 Tuesday, 23 February 2016 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 HW 4: Drawing Generally and Concisely
19 Wednesday, 24 February 2016 Naming Local Values Why name things. Naming things with `let`. Naming things with `let*`. Naming procedures. Local Bindings Local Bindings
Thursday, 25 February 2016 Optional Review Session
20 Friday, 26 February 2016 Collage - Copy and Paste Collage. The Gimp PDB. Copying and pasting. Scaling. Rotation. Collage Collage Quiz 5
Week 06: Miscellaneous
Date Topic Reading Lab Work Due
21 Monday, 29 February 2016 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
22 Tuesday, 1 March 2016 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 HW 5; Exam 2 assigned
23 Wednesday, 2 March 2016 Revisiting Lists Lists, revisited. New list operations. Drawings as values. Building Data Structures with Heterogeneous Lists Exploring Lists
Thursday, 3 March 2016 Optional Review Session
24 Friday, 4 March 2016 Characters and Strings Representing text. Characters: The basic building blocks. Combining characters into strings. Characters and Strings Characters and Strings Quiz 6
Week 07: Recursion
Date Topic Reading Lab Work Due
25 Monday, 7 March 2016 Recursion Basics Background. The idea of recursion. Some sample recursive procedures. Expressing recursion in Scheme. Recursion Basics Recursion Basics
26 Tuesday, 8 March 2016 Recursion Basics, Continued Reflection. Questions. Recursion vs. other forms of repetition. Recursion Basics Recursion Basics Exam 2 (due 10:30 p.m. via email)
27 Wednesday, 9 March 2016 Preconditions, Revisited Verifying preconditions. The `error` procedure. Husk and Kernel programming. Verifying Preconditions Verifying Preconditions Exam 2 (cover sheet due in class)
Thursday, 10 March 2016 Optional Review Session
28 Friday, 11 March 2016 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 Quiz 7
Week 08: Recursion, Continued
Date Topic Reading Lab Work Due
29 Monday, 14 March 2016 Recursion with Helper Procedures, Continued Further issues in helper recursion. Tail recursion. Recursion with Helper Procedures Recursion with Helper Procedures
30 Tuesday, 15 March 2016 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 Wednesday, 16 March 2016 Pause for Breath
Thursday, 17 March 2016 Optional Review Session
32 Friday, 18 March 2016 Numeric Recursion Recursion, generalized. Numeric recursion. Numeric Recursion Numeric Recursion Quiz 8
Spring Break
Week 09: New Approaches
Date Topic Reading Lab Work Due
33 Monday, 4 April 2016 Naming Local Procedures Why have local procedures. Creating local procedures with `letrec`. Creating local procedures with named let. Local Procedure Bindings Local Procedure Bindings
34 Tuesday, 5 April 2016 Turtle Graphics Modeling images through process: Turtle graphics. Some historical notes. Turtle graphics in MediaScheme. Turtle Graphics Turtle Graphics Exam 3 distributed
35 Wednesday, 6 April 2016 Iteration Reflecting on procedures and side-effects. A useful tool for repetition: `for-each`. Contrasting `map`, `for-each`, `repeat`, and recursion. Iteration Iteration
Thursday, 7 April 2016 Optional Review Session
36 Friday, 8 April 2016 Randomized (Unpredictable) Drawing Random art. Why use randomness. The `random` procedure. Simulation. Randomized Drawing Randomized Drawing Quiz 9
Week 10: Data Structures
Date Topic Reading Lab Work Due
37 Monday, 11 April 2016 Pairs and Pair Structures Representing lists: Pairs and cons cells. Why care about the underlying representation? Pairs and Pair Structures Pairs and Pair Structures
38 Tuesday, 12 April 2016 Vectors Problems with lists. A solution: Vectors. Behind the scenes: How Scheme implements vectors. Important vector procedures. Vectors Vectors Exam 3 (due 10:30 p.m. via email); Project assigned
39 Wednesday, 13 April 2016 Pause for Breath No Reading Exam 3 (cover sheet due in class)
Thursday, 14 April 2016 Optional Review Session
40 Friday, 15 April 2016 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 Quiz 10
Week 11: Miscellaneous
Date Topic Reading Lab Work Due
41 Monday, 18 April 2016 Project Kickoff About the project, revisited. Group composition. Time to form groups. Playing and brainstorming. Project Ideas Playing with Project Ideas
42 Tuesday, 19 April 2016 Trees Thinking about trees in terms of `cons`. Thinking about trees recursively. Writing recursive tree procedures. Trees Trees HW 6
43 Wednesday, 20 April 2016 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
Thursday, 21 April 2016 Optional Review Session
44 Friday, 22 April 2016 Files in Scheme File basics: Data persistence and beyond. Ports. Basic file operations. Files in Scheme Files in Scheme Quiz 11
Week 12: Searching
Date Topic Reading Lab Work Due
45 Monday, 25 April 2016 Pause for Breath Project work time. Key techniques. No Reading Project proposal due at 10:30 p.m.
46 Tuesday, 26 April 2016 Analyzing Procedures Comparing algorithms. Two related metrics: Time and Number of steps. Counting procedure calls by printing. Tools for analysis. Analyzing Procedures Analyzing Procedures Project proposal images due
47 Wednesday, 27 April 2016 Binary Search Analyzing algorithmic efficiency. The problem of searching. Making searching more efficient using divide-and-conquer. A demo: Destructive binary search. Considering the parameters to binary search.
Thursday, 28 April 2016 Optional Review Session
48 Friday, 29 April 2016 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
Week 13: Project Reflections
Date Topic Reading Lab Work Due
49 Monday, 2 May 2016 Binary Search Lab Exploring the search API. Remaining questions. Search Algorithms Binary Search Exam 4 Distributed
50 Tuesday, 3 May 2016 An Introduction to Sorting The problem of sorting. Writing sorting algorithms. Examples: Insertion, selection, etc. Formalizing the problem. No Reading Project due
51 Wednesday, 4 May 2016 Insertion Sort Insertion sort basics. Four questions about insertion sort. Analyzing insertion sort. Sorting Insertion Sort
Thursday, 5 May 2016 Optional Review Session
52 Friday, 6 May 2016 Merge Sort More efficient sorting techniques. Divide and conquer, revisited. Merge sort. Analyzing merge sort. Merge Sort Merge Sort Quiz 13 (cancelled)
Week 14: Wrapup
Date Topic Reading Lab Work Due
53 Monday, 9 May 2016 Project Assessment: Images Reviewing images: The "big picture". Reviewing images: Policies for doing individual images. Image review. Debrief, if appropriate.
54 Tuesday, 10 May 2016 Project Assessment: Algorithms Additional images. Debriefing from image analysis. Clever code: How'd you do that? Code crits: Why'd you do that? Exam 4 (due 10:30 p.m. via email)
55 Wednesday, 11 May 2016 Recap The subject matter(s) of the course. More about the subject matter(s). Looking beyond the course. Exam 4 (cover sheet due in class)
Thursday, 12 May 2016 Optional Review Session
56 Friday, 13 May 2016 Wrapup Comments on the final. Course evaluation. Final comments.