Functional Problem Solving (CSC 151 2014F) : EBoards

CSC151.01 2014F, Class 38: On Two-Dimensional Design


No partners! Sit wherever you'd like.

Overview

Preliminaries

Admin

Upcoming Work

Cool Upcoming Events on Campus

Extra Credit Opportunities

Academic

Peer Support

Exam Notes

On the exam, should we have *all* of our procedures check preconditions?
E.g., should str-rot13 check that str is a string containing only capital letters, or should 'shift-up' check that its input is an integer between 0 and 25, etc.?

str-rot13 should check its preconditions. The problem 3 procedures need not check their preconditions. Problem 1 says to check preconditions. On the others, it's somewhat up to you.

Does the procedure in problem 7 do anything sensible? It just seems like it has a lot of let expressions that define variables as the null list.

Yes, it does something sensible. The one let expression you see seems to be a named let.

Can I solve problem 3 using 65 as the collating sequence number for #\A?

No. You may not hard-code the 65. But that doesn't mean that you can't write concise and general code that will work equally well if the collating-sequence number for \A is 65, or 200, or 11, or whatever..

You know that (shift-down (char->integer #\A)) has to be 0, (shift-down (char->integer #\B)) has to be 1, and so on and so forth.

You also know that the letters are in sequence. So the collating sequence number for #\B is one higher than the collating sequence number for #\A, the collating sequence number for #C is one higher than the collating sequence number for #B, and so on and so forth.

Is #7 the only one that requires documentation?

Apparently.

Other Questions

Background: About the project

Two examples

You can find these in examples/project.

ellipses.rkt - straightforward, but makes compelling images

mandelbrot.rkt - Mandelbrot set

Questions and notes

General elements of design

Relationships between elements

Broader design principles

More examples