This class is taught by Jay McCarthy. Call him Jay.
We meet in 3718 HBLL at 11am and 12pm MWF. After November 9th, we will meet in B032 JFSB (section 1) and B135 JFSB (section 2.)
Jay McCarthy’s office hours are 1pm to 3:45pm in 3328 TMCB.
There is a mailing list hosted at Google Groups. Use it to ask non-revealing questions and receive answers, as well as general course announcements.
The fundamental tool of a computer scientist and software engineer is the programming language. Programming languages of all shapes and sizes are found under every rock in computing. There are large, mainstream languages that everyone uses regularly. But, there are also small, domain-specific languages that are like feudal lords: well-known to their subjects, but anonymous in the wider world.
Few of us will design a large mainstream language during our careers, but almost all of us will (need to) design and implement a small language. This design will be implicit and ad-hoc if we’re not educated.
This course will prepare you to understand the design of all languages and to design and implement small ones. In contrast to other courses of this nature, we will not treat programming languages like fish and try to make little boxes for them to fit in. Programming languages are not fish. Instead, we will explore the “periodic table” of languages features and concepts. In particular, this course will not teach you to program in many languages. There is too much noise in that approach that distracts from the real differences.
Overview / Racket: Numbers, Symbols, Expressions, Check Expect
Racket: Designing Programs, Functions, Conditionals, Structures
Racket: Lists, Natural Recursion
Racket: Recursive Structures / Higher-order Functions
HtDP 14 & 20
Code Review: Lists and Trees
Code Review: Rudimentary Interpreter
Code Review: Extended Interpreter
Code Review: Laziness and Infinite Data
Code Review: Laziness and Infinite Data
Web Programming, cont.
Web Programming, cont. and CPS
PLAI 21, Wilson 1
GC: Reference Counting and Mark&Sweep
GC: Stop&Copy and Generation Collection
GC: Generational, Low-level, New features
Type Soundness / Explicit Polymorphism
Macros: Compiler Extension
Macros: Compiler Extension
Final @ 11:00am
Final @ 2:30pm
Jay will not be present on days marked with a * in the Notes column.
This schedule may change.
Assignments that are late by a second will receive no credit.
This schedule may change.
My job is to help you. Please ask for help. (But read section this first.)
Sign up for the Google Group, I may have already answered questions about the assignment.
If you are having trouble understanding the basics of Racket, read the tutorial that comes with DrRacket.
If you are having trouble knowing what library functions will be useful in Racket, read the following sections of the Guide to Racket: Racket Essentials, Symbols, and Pairs and Lists. Late in the course you will find Continuations, Web Interaction, and Pattern-Based Syntax Matching useful.
If you are having trouble knowing where to start, use the design recipe from How to Design Programs.
DrRacket comes with an extensive manual and help system. The documentation is available by clicking the Help|Help Desk menu item. This will open up a browser window to your local copy of http://docs.racket-lang.org. Use the search box to find function and syntax documentation. (Everything the search box returns is clickable.)
Assignments are to be emailed to firstname.lastname@example.org.
The subject line must be: "BYU - Fall 2010 - CS 330 - x", x is the contents of the “Code” column for the assignment.
Only one email should be sent per team. If more than one is sent, I will grade the oldest one. The message body should be the names of the team members one per line.
You should attach a zip archive of your work. The archive should contain a folder with the same name as the “Code” of the assignment. Even assignments with one file should create a folder. Each assignment specifies the names of files.
The only file formats that will be accepted are files produced by DrRacket (for code) and PDFs (for written assignments).
Assignments that do not have the correct format will receive no credit.
For example, if my name were Joseph Smith, I would submit the Rudimentary Interpreter assignment as follows. I would send an email with the subject “BYU - Fall 2010 - CS 330 - rinterp”. The email would contain “Joseph Smith” as the first line. The email would have an attachment named "rinterp.zip". When extracted, it would create a directory named "rinterp" that contained two files, "wae1.rkt" and "wae2.rkt".
In the beginning of the course, we will use the free online textbook How to Design Programs (HtDP), by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi, to introduce the Racket programming language.
For the majority of the course, we will use the free online textbook Programming Languages: Application and Interpretation (PLAI), by Shriram Krishnamurthi. Eventually we will look at Paul Wilson’s survey of Garbage Collection methods later in the course.
We will not be using the textbook in the traditional way. Think of the textbook as your lecture notes. Don’t read it before a class, but refer to it afterwards. The book is superb, so you won’t need to distract yourself from the discussion by taking copious notes. (You may want to take note of your ideas and insights, but the content of the lecture will be in the textbook.)
We will use DrRacket v5.0.1 (or higher) for many programming assignments. Do not use an older version of DrRacket!
We will use three language extensions: Basic Student, Intermediate Student with Lambda, and PLAI.
To use Basic Student: Open DrRacket. From the Language menu, click Choose Language.... Expand How to Design Programs. Select Basic Student. Click OK.
To use Intermediate Student with lambda: Open DrRacket. From the Language menu, click Choose Language.... Expand How to Design Programs. Select Intermediate Student with Lambda. Click OK.
There is no midterm. There will be a final in class during the scheduled time. It is one question. It isn’t that scary though.
Each assignment is graded with a number between 0 and 1.
A presentation receives a 0 if you do not do it, a 0.5 if you do it poorly, and a 1 if you do it well.
Each question on a written assigment receives a 0 if you do not do it, a 0.5 if you do it poorly, and a 1 if you do it well.
The entire written assignment receives the average of these grades.
|> (grade-written (list 1 1 1))|
|> (grade-written (list 1 0.5 1))|
|> (grade-written (list 1 1 0 0.5))|
Every coding assignment has a point target on the table of assignments. The number of points you receive on a coding assignment, as described below, are divided by this point target to produce the assignment’s total grade.
Note: Some assignments may include code, but are not considered coding assignments. These are graded as if they are written assignments where each piece of functionality is a separate question.
– – – –
Every required function that has a purpose statement that fully explains, in a sentence or two, what the function does gives you 5 points.
Every required function that has a contract that specifies its input and output gives you 5 points.
If all non-required functions have purpose statements and contracts, you get 10 points.
Every time you overload lists, rather than creating a new data-type with define-type, you lose 20 points.
Every legitimate test of a required function gives you 2 points. If your code passes this test, you get another 2 points.
If all non-required function pass all their legitimate test cases, you get 10 points.
– – – –
Not already knowing Racket or having learned Racket with a different style are not excuses for not following these requirements. We are using the coding style from How To Design Programs for this course.
Notice that you get no credit for untested functionality, even if it is correct! We require this to encourage good software development skills, but, more importantly, to force you to show us that you know what your code is supposed to do and that you’re not getting a correct answer by guessing. We will not give full credit to untested functionality, even if it is correct!
You might think that there is no notion of “full” credit, because you are required to come up with your own test cases and there are seemingly infinite numbers of test cases you could include. This is not the case. There are only so many test cases for each assignment that are legitimate. Each assignment gives you an idea about how many that is, without telling you what they are.
Remember that good testing strikes a good balance between testing individual features and testing the program as a whole. It actually tests the program. That means not only executing the program but also checking the output to ensure it is what you expected. And it includes comments to explain the purpose of each test.
Recall that each assignment is graded with a number between 0 and 1.
The table of assignments has weights for each assignment (and the final).
Each assignment’s grade times its weight and summed is your final numeric grade.
|> (convert-to-letter 1)|
|> (convert-to-letter 0.94)|
|> (convert-to-letter 0.899999)|
|> (convert-to-letter 0.81)|
|> (convert-to-letter 0.74)|
|> (convert-to-letter 0.6999999)|
|> (convert-to-letter 0.62)|
|> (convert-to-letter 0.57)|
Most assignments for this class will be done in teams (pairs, with a single triple if enrollment is an odd number). Our assignments tend to be short on code but long on thinking, so this will give you the opportunity to fully discuss a solution with another person. You will work with three different people over the course of the semester.
Programming in teams does not mean each person writes part of the code and the team simply pastes together these contributions. Each person is responsible for every line of code, documentation, etc. turned in. This responsibility extends over written assignments as well. It includes getting or losing points for quality, being able to explain the work, and also incurring penalties in case of plagiarism or other violations. That said, we will sometimes ask you questions individually and, if you are unable to answer them, we may give you less credit than your teammates. In short, working in teams is meant to help you learn material better, not to enable you to do less work than you would have if the assignment had to be done individually.
For team projects, you may not discuss the assignment with a student not on your team.
We recommend that teams develop the software together using pair-programming techniques (of the form preached by Extreme Programming) though this is a suggestion, not a requirement. Pair-programming in a nutshell:
Both programmers share a single computer, monitor, and keyboard.
One person is the typist, the other watches what is being typed and critiques it.
Programmers switch roles at regular intervals. (Note that this is also good for preventing RSI!)
Both programmers jointly own every single line of code, no matter who typed it.
While this does require that you schedule times to work with your team, we think that pair-programming will increase your productivity and aid you in taking responsibility for all of your code.
You may not work with the same partner on multiple teams.
Once you have selected a partner please inform the course staff. If you are having difficulty finding someone to be your partner, please contact us and we will attempt to match you with another student.
We will use codewalks, a common practice at software companies, to evaluate some of your programs. A codewalk is a presentation where you, the programmer, convince us, a jury, of specific properties of your program. You accomplish this by presenting your program and answering questions about it. We are most interested in
correctness: does it do the right thing?,
extensibility: how adaptable is it to related tasks?,
robustness: is it built like a house of cards?, and
performance: does it avoid poor implementation decisions?.
Each program will receive about 30 minutes of scrutiny. The code you present must the be the same code you turned in electronically. We will not tell you if we will conduct a codewalk for an assignment until after you have turned in a solutions for it. No excuses or exceptions; you read it here.
Here is some advice from past students in the class:
“Go see Jay early when they are stuck on a project. Starts the projects early. Don’t get discouraged!”
“Don’t despair. It gets better. If you do the assignments and try to understand them, you will do better than you think you’re doing.”
“Don’t be afraid to ask for help, ’cause Jay is quite willing to answer questions.”
“Notes are not so very helpful in most of the class. Focus on understanding first.”
“Go to Jay’s office a lot.”
“Start early and ask good questions.”
“Be prepared to spend far more time on this class than you were expecting to.”
“Start projects earlier and take it from Jay McCarthy!!!”
“Learn to talk to Jay. Go up to his office. He’s unbelievably helpful.”
“Be prepared to sacrifice a lot of time for this class if you really want to understand the topics well, and to do well on the assignments.”
“Give yourself enough time to adequately finish the assignments, and use Jay!”
“Talk to the teacher! Don’t go it alone, you’ll get lost.”