The schedule below shows the tentative dates for all class topics, readings, and assignments. You should complete all assigned reading before class on the day it is listed. Labs will be available shortly before the assigned lab day. There may be some revisions to the schedule during the semester, but I will make sure to announce these changes in class.
If you view this page with JavaScript enabled you can jump to the current week on the schedule, and you should see the next day of class highlighted in the schedule below.
We begin the class by exploring the definition of computer science and by trying to write some basic algorithms.
Topics: Introduction - What is CS. Exercise - An everyday algorithm. Debriefing on exercise. Common parts of an algorithm.
We begin to consider the content and structure of the course, exploring both our laboratory environment (Linux workstations) and mechansisms for representing and styling text.
Topics: Getting started with Linux. Generalized markup with XML. Web markup with HTML. Page styling with CSS.
We consider Racket, the programming language we will use throughout the course.
Topics: Why use programming languages. Scheme history. Scheme basics. Using DrRacket.
We consider ways to write your own procedures and why you might do so.
Topics: Review: Algorithm components. Detour: Sequencing operations. User-defined-procedures. Lambda. Compose. Section.
We explore many of the basic types in Racket and the capabilities those types provide.
Topics: Values and types. Numbers. Characters. Strings. Symbols. Lists.
We consider ways to search for patterns in text and to use the results of those searches. We also explore how to extract data from text files.
Topics: Text files. Patterns and pattern matching. Searching, replacement, and splitting. Forms of regular expressions.
We explore the whys and hows of working with others. We revisit the way in which Racket evaluates expressions. We also catch up on any confusing issues from the first few days of class.
Topics: Basics of pair programming. Benefits of pair programming. Pair programming in the classroom. Forming a code of conduct. The structure of Racket code. Parsing code. An evaluation strategy. The Racket “dictionary”. Assorted other issues.
Stuart Wray, IEEE Software
We return to Scheme’s list data structure and some ways to use lists to work with collections of data.
Topics: Context: What and why lists. Building lists. Mapping lists. Reducing lists. Sorting lists. Other list operations.
We consider how one writes procedures that make decisions.
Topics: Boolean values. True vs. truish. Predicates - procedures that return Boolean values. Combining Boolean values with and
and or
. The parts of an algorithm, revisited. Choosing between two options with if
. Optional evaluation with when
. Making multiple choices with cond
.
We consider documentation for your programs: Why to write documention, when to write documentation, how to write documentation. We also explore the 6P style of documentation that we use in this course.
Topics: The Six P’s - a strategy for documenting procedures. A few additional P’s. Practice. Verifying preconditions. The error procedure. Husk and kernel programming.
We consider testing: When, why, and how you might test the procedures and programs that you write.
Topics: Why test. Strategies for testing. RackUnit’s primary testing operations. Careful postconditions.
We consider Scheme’s random
procedure and how one might use
that procedure in generating language.
Topics: Why use randomness. The random
procedure. Simulation. Grammars. Language generation.
We consider how and why to name values within procedures.
Topics: Local bindings. The let
and let*
operations. Semantics: let
as a procedure call.
We discuss your solutions to the first examination.
Topics: Common problems. Improving style.
We consider structures that allow us to store information for quick retrieval.
Topics: Dictionaries. Key dictionary operations. Hash tables. Mutation.
We consider Racket’s techniques for creating structured data types.
Topics: Structured data. Using structs. Mutable and immutable structs.
We consider how one writes programs that process HTML and XML.
Topics: XML, revisited. Representing XML in Racket. Expressing patterns in XML. Seaching XML. Constructing new documents from old.
We consider additional ways to transform XML documents.
Topics: Replacing elements. Inserting elements. Deleting elements. Other approaches.
We explore techniques for undersatnding and correcting flaws in our programs
Topics: Approaches to debugging. Reading error messages. The DrRacket debugger. Debugging with printing.
We begin our exploration of recursion, the most general form of repetition available in Scheme. You can use recursion to both build and iterate over different kinds of values.
Topics: Background. Key ideas in recursion. Sample recursive procedures. Expressing recursion in Scheme.
We continue our exploration of the basics of recursive procedures.
Topics: Lab. Debrief.
We consider a different form of recursion, one based on the construction of recursive helper procedures that take additional parameters. Along the way, we consider the idea of tail recursion. We also explore how careless design of recursive procedures can inadvertently lead to slow execution.
Topics: Basics of helper recursion. Tail recursion. Why use tail recursion.
We discuss your solutions to the second examination.
Topics: Common problems. Improving style.
We conclude our initial forays into list recursion by looking for some common patterns in the design of recursive procedures.
Topics: Looking for patterns. Patterns of list recursion (extreme, reduce, etc.). List predicates.
We consider a slightly different kind of recursion, numeric recursion. In this technique, we once again have procedures call themselves. However, the parameter that we “simplify” at every step is a number, rather than a list.
Topics: Generalizing recursion. Numeric recursion.
We explore how and why one writes local recursive procedures.
Topics: Why have local procedures. Naming local procedures with letrec. Naming local procedures with named let. Tail recursion vs. helper recursion.
We consider pairs, the basic data type used to build lists and other structures in Scheme. We also consider why it is useful to understand about pairs.
Topics: Representing lists with pairs and cons cells. Why care about the underlying representation. Other pair structures.
We introduce the project.
Topics: About the project. Group composition and construction. Playing and brainstorming.
We revisit the topic of higher-order procedures, one of the
most important techniques in languages like Scheme. Higher-order
procedures are procedures – like map
, left-section
, or
compose
– that take other procedures as parameters, return
other procedures as values, or both.
Topics: Some program design principles. Thinking about repetition. Procedures as first-class values.
We explore techniques for analyzing the number of calls made in evaluating procedures, particularly recursive procedures. We consider why such analysis is useful.
Topics: Comparing algorithms. Two metrics: time and number of steps. Using output to count procedure calls. Tools for procedure analysis.
We consider hierarchical data structures and explore how to write procedures to process such structures.
Topics: Nested lists. Deep recursion.
We consider the general problem of searching. We explore binary search, one of the most efficient algorithms for searching.
Topics: Analyzing algorithm efficiency. The problem of searching. Divide and conquer. Destructive binary search (a demonstration). Design issues.
Groups have time to work on their projects.
Topics: Work time.
We explore the problem of sorting. When you sort a list, vector, or other collection, you put the elements in order. The order of the elements usually corresponds to the type of the elements. We might sort strings alphabetically, grades numerically, colors by brightness, and so on and so forth.
Topics: The problem of sorting. Writing sorting algorithms. Some examples. Formalizing the problem.
We move from our general exploration of sorting to the implementation of a particular sorting algorithm, insertion sort. We also explore how the running time for that algorithm varies based on the number of values we are sorting.
Topics: Insertion sort basics. Four questions about insertion sort. Analyzing insertion sort.
We continue our exploration of sorting by considering the applicability of the divide-and-conquer approach to the problem of sorting. We look at one particular divide-and-conquer algorithm, merge sort. We explore how the running time for that algorithm varies based on the number of values we are sorting.
Topics: More efficient sorting techniques. Divide and conquer, revisited. Merge sort. Analyzing merge sort.
We explore some of your projects.
Topics: Lightning presentations.
We conclude the course.
Topics: Additional lightning presentations. Comments on the final. The subject matter(s) of the course. More about the subject matter(s). Final comments.
We evaluate the class and prepare for the final.
Topics: Course evaluation / official. Course evaluation / unofficial. Review for the final.