This course focus on teaching a variety of programming languages and their paradigms (e.g., structured, imperative, object-oriented, functional, logical, etc) in a hands-on and programming-intensive way, arming you to more deeply understand the programs you write, what the computer is doing "under the hood", and how to more rapidly learn new languages in the future. We will study four, eight, or more different programming languages (depending on how one counts), with a particular emphasis on functional programming (using Racket).
We will review object-oriented and structured programming and emphasize
principles of low-level languages by introducing C/C++. Then, we will
introduce formal semantics and the lambda calculus—
Kyle Headley (TA)
12:30-2:00p Tues, 10:00-11:30a Fri
Tuesday, Feb 26, in class
Tuesday, Apr 23, 10:45a-1:15p
Below is a (tentative) list of topics we will be covering each week. As the term progresses, some of these topics will likely change or be moved around to adapt to our progress. Such changes will be reflected here as they occur. Next to each day, I will list any readings you should do to prepare for the day’s topic(s).
Jan 8, 10
syllabus, intro to C/C++, syntax, expressions, loops, pointers, structs
Intro to C/C++, structs, unions, classes, abstract classes, interfaces, templates
Jan 15, 17
C++ review, pointers, memory management
C++Tour Ch. 2, 3.3-3.3.4
advanced C++, operator overloading, RAII, inheritance
C++Tour Ch. 4
Jan 22, 24
Virtual tables, C++’s implementation of dynamic dispatch
C++Tour Ch. 3.2
Jan 29, 31
Eloquent JS Ch 1,2
Feb 5, 7
Eloquent JS Ch 3,4,5
Feb 12, 14
lambda calculus, Racket
SICP Ch 1
Racket, immutability, HO programming in Racket
Feb 19, 21
Racket, pattern matching, CE interpreters
Feb 26, 28
Mar 5, 7
Mar 12, 14
No class: spring break
No class: spring break
Mar 19, 21
continuations, stack-passing, CPS
ANF and CPS conversion
Mar 26, 28
Apr 2, 4
Apr 9, 11
Types and contracts
Types and contracts
Apr 16, 18
MiniKanren, logic programming
MK, Will Byrd lecture
Slides and any other materials on these topics will be posted below. I will use Keynote and export pdf versions of the slides, but sometimes these will not look quite right due to animations or fonts. I may sometimes use a new slide-deck and sometimes will modify an existing slide-deck; you should prefer to view slides from your browser and hit refresh each time you do.
Basic C++ (pdf)
C++ Pointers and Memory (pdf)
Implementing class hierarchies (pdf)
Formal Semantics & IMP (pdf)
Lambda Calculus (pdf)
Racket intro (pdf)
Church encoding (pdf)
ANF and CPS (pdf)
Closure conversion (pdf)
Contracts and Types (pdf)
We will be using an auto-grader this term for your convenience—
Download a version of the auto-grader to get started with here [.tar.gz]. You will use the auto-grader both to download your starter (a set of stubbed-out files for your project with comments and directions) and to submit your finished (or partially finished) code. I will provide you a username/password via email.
Project 0: C++ lists and arrays (Due: Thursday, Jan 17, 11:59p)
Project 1: C++ allocation, inheritance, virtual tables (Due: Tuesday, Jan 29, 11:59p)
Project 3: Exercises in Racket (Due: Friday, Feb 22, 11:59p)
Project 4: Church Encoding (Due: Friday, Mar 15, 11:59p)
Project 5: Continuation-passing style (CPS) conversion (Due: Monday, Apr 1, 11:59p)
Project 6: Bottom-up closure creation (Due: Monday, Apr 15, 11:59p)
Project 7: MiniKanren: reverseo (Due: Monday, Apr 22, 11:59p)
All announcements will be made here on this page or via email over Canvas. (Please check that you’re signed-up at the start of the semester!)
Emergency announcement such as last-minute class cancelations (which should not happen often), will be announced via both this page and canvas.
Project 0 is now available.
Project 1 is now available.
Project 2 is now available.
I highly recommend perusing the first 4 chapters of the Racket guide as you learn Racket.
A practice set of questions for the midterm is posted. Practice questions fixed (typos).
Practice problem solutions are posted.
In-class coding on coroutines and generators is posted.
Project 4 deadline is extended.
Example midterm solutions are posted.
Class 4/2 canceled. Project 5 deadline is extended 3 days.
Our in class progress on Project 6 is posted.
a grade of C or better in CS 303 and CS 350; or with permission of department; or CS 501 as a CS graduate student.
3 credit hours
You must upload your assignments and projects by the due date—
Programming projects will be graded using Clang 5, Python 3.7, and Racket 7 on an Ubuntu 18.04 LTR machine, regardless of your development environment at home. If you run into issues with this, we highly recommend trying Lubuntu within a VirtualBox VM—
Office hours for the instructional staff will be posted on the course web page within a few days into the semester.
While we will provide assistance with assignments during office hours, you are responsible for developing and debugging your own programs. Do not rely on the instructional staff to make your project work. We can help you to understand the concepts of the class, not help you complete specific homework.
Important announcements will be made in class or on the class web page. Please make it a habit to check the class web page daily. You may also use the Canvas web forum to ask general questions of interest to the class as a whole, e.g., conceptual questions, administrative issues, or project clarification questions. Do not post any information that would violate the university academic integrity policy.
Assignments, projects, and exams will not be graded on a curve, however final letter grades may be. Canvas will provide you with the latest grades and statistics we’ve released so that you can gauge your own progress as we progress.
You are responsible for all material discussed in lecture and posted on the class web page, including announcements, deadlines, policies, readings, etc. During the semester we may provide ungraded practice homework exercises and solutions. While we will not collect these exercises, completing them is essential preparation for exams. You may work together on any ungraded problems given, and you may of course come to office hours for additional help.
Your final course grade will be determined according to the following percentages. Some extra-credit opportunities may be offered during the term on assignments, in projects, or on exams. Points earned as “extra credit” will be tallied for each of these three sections separately and no section can exceed full points. For example, extra credit offered on assignment 0 can help if points are lost on assignment 4, but will not restore points lost on exams.
Any request for reconsideration of any grading on coursework must be submitted within one week of when it is returned. Manual-regrading requests must be made in writing. Any coursework submitted for reconsideration may be regraded in its entirety and may factor in style or code-quality, which could result in a lower score if warranted.
Final course grades will be curved as necessary, based on each student’s total numeric score for all coursework at the end of the semester. The curve will be nondecreasing and monotonic. The goal is naturally to have little to no curve. You must recieve at least a 60% on every section (projects, labs, exams) to pass the class and I reserve the right to lower your letter grade to the lowest grade received on either projects, labs, or exams.
Projects must be submitted electronically following the instructions given in class. Projects may not be submitted by any other means (e.g., please do not email your projects to us). It is your responsibility to test your program and verify that it works properly before submitting. All projects are due at 11:59p on the day indicated on the project assignment, according to the submission servers’s internal clock, or Canvas’ internal clock. Projects will be accepted up to 48h late at a 15% penalty, and up through the final week of classes at a 30% penalty. This means that with enough effort, you should be able to improve your overall projects grade to at least 70%.
Exemptions will not be granted due to system problems, network problems, power outages, etc., so do not wait to submit a project until the night it is due and be sure to always submit your code, on time, to Canvas whether the auto-grader is working or not. You may submit multiple times up to the deadline, and only your best auto-grader submission (or most recent Canvas submission if you request manual grading) will count toward your grade. No consideration in grading will be made for errors made in transferring files or submitting the wrong version of your project. Having a working, unsubmitted version will not count; only submitted code will be be counted.
Unlike lower-level programming classes, we will not always provide you with test cases before projects are due. Instead, you will be responsible for developing your own techniques for testing your projects. To reiterate: your projects will be graded based on test cases not provided in advance. Because grading for projects is done automatically, you must follow the project specification exactly. Also, while projects will generally not be graded on style or documentation, we reserve the right to manually grade program source code for some projects. If you have any questions about how your programs should be setup in order to be graded properly, be sure to contact the TA or myself well in advance of the deadline.
Finally, any "hard coding" in a project assignment will result in a score of zero for that project, and is considered a bad-faith effort. Hard coding refers to attempting to make a program appear as if it works correctly, when in fact it does not. One example of hard coding would be printing the desired output instead of computing it. This is only one example, and if you have any questions as to what constitutes hard coding, be sure to ask ahead of time.
The class includes a midterm and a final exam. Dates for the exams are posted on the Schedule. The date of these exams is tentative and may change based on class the University Registrar. Confirmation of an exam date will be posted on the schedule at least two weeks in advance of any exam.
Besides the policies in this syllabus, the University’s policies apply during the semester. Various policies that may be relevant appear in the Undergraduate Catalog & Handbook.
If you experience difficulty during the semester keeping up with the academic demands of your courses, you may consider contacting UAB student services at (205) 934-4300 or your academic advisor. UAB’s educational counselors can help with time management issues, reading, note-taking, and exam preparation skills. If you encounter personal issues during the term and wish to speak to a counselor, UAB student counseling services is on the 3rd floor of the Learning Resource Center.
Any student who needs to be excused for an absence from a single lecture, recitation, or lab due to a medically necessitated absence shall: a) Make a reasonable attempt to inform the instructor of his/her illness prior to the class. b) Upon returning to the class, present their instructor with a self-signed note attesting to the date of their illness. Each note must contain an acknowledgment by the student that the information provided is true and correct. Providing false information to University officials is prohibited under the student code of conduct and may result in disciplinary action.
Self-documentation may not be used for the Major Scheduled Grading Events as defined below and it may only be used for only 1 class meeting during the semester. Any student who needs to be excused for a prolonged absence (2 or more consecutive class meetings), or for a Major Scheduled Grading Event, must provide written documentation of the illness from the Health Center or from an outside health care provider. This documentation must verify dates of treatment and indicate the time-frame that the student was unable to meet academic responsibilities. In addition, it must contain the name and phone number of the medical service provider to be used if verification is needed. No diagnostic information will ever be requested. The Major Scheduled Grading Events for this course include project deadlines and any midterm or final exam.
It is the University’s policy to provide accommodations for students with religious observances conflicting with exams, but it is your responsibility to inform the instructor well in advance of intended religious observances. Written notice must be provided immediately upon an exam date being announced or confirmed in order for an absence to be excused. If you have a conflict with one of the planned exams, you must inform us prior to the end of the first two weeks of the class.
For missed exams due to excused absences, the instructor will arrange a makeup exam. However, unless immediate notice is given as early as possible of the reason for any missed coursework, an excused absence may not be granted. If you might miss an exam for any other reason other than those above, you must contact the instructor in advance to discuss the circumstances. We are not obligated to offer a substitute assignment or to provide a makeup exam unless the failure to perform was due to an excused absence.
The policies for excused absences do not apply to project assignments. Projects will be assigned with sufficient time to be completed by students who have a reasonable understanding of the necessary material and begin promptly. In cases of extremely serious documented illness of lengthy duration or other protracted, severe emergency situations, the instructor may consider extensions on project assignments, depending upon the specific circumstances.
Our goal is not to make lecture attendance an official part of the class’s final grade; it is your responsibility to make lectures and to makeup material where missed. However, in serious cases of absences, we reserve the right to remove up to one final letter grade for each multiple of 5 absences from class lectures. E.g., A student earning an A- who was absent 7 times from lecture may be assigned a B- instead. Likewise, class participation is encouraged but is not a standard part of the grade. If you are inclined to use your computer to take notes or check email during class, please do not sit where you could be a distraction to others; if you need to use your phone, step out of class; if you must arrive late, please enter quietly and sit in the back. Students who are disrespectful of the environment or are disruptive to the learning process of others will be asked to leave and counted as absent.
UAB is committed to providing an accessible learning environment for everyone. Students with disabilities who have been certified by Disability Support Services as needing any type of special accommodations should see the instructor as soon as possible within the first two weeks of class. All arrangements for exam accommodations as a result of disability must be made and arranged with the instructor at least three business days prior to the exam date, or accommodations will not be made. If you have a disability but have not yet contacted DSS, they may be reached at (205) 934-4205.
Don’t cheat. Just don’t do it.
You may not share code/homework, view one another’s code/homework, share or discuss solutions. There exist tools to check for duplicate code modulo variable renaming, comments, clause ordering, etc. It’s not worth it.
Programming projects and labs are to be written individually, therefore cooperation or use of unauthorized materials on projects is a violation of the University’s Code of Academic Integrity. Any evidence of this, or of unacceptable use of computer accounts, use of unauthorized materials or cooperation on exams or quizzes, or other possible violations of the Honor Code, will be submitted to the Department and Honor Councils, which could result in an F for the course, suspension, or expulsion.
For learning the course concepts (including the programming languages), students are welcome to study together or to receive help from anyone else. You may discuss with others the project requirements, the features of the programming languages used, what was discussed in class and in the class web forum, and general syntax errors. Examples of questions that would be allowed are "Does a C++ class definition end in a semicolon?" or "What does a ’class not found’ error indicate?", because they convey no information about the contents of a project.
The CS department follows a 3-strikes policy for undergrads, a 2-strikes policy for grad students (the last two), and a 1-strike policy for researchers. The first strike results in a zero on the homework or exam, or a dropped letter grade in the course. A second strike results in an F in the course. A third strike elevates the situation to the College level and will likely result in expulsion. All honor code violations become part of your permanent academic record.
When it comes to actually writing a project assignment, other than help from the instructional staff a project must solely and entirely be your own work. Working with another student or individual, or using anyone else’s work in any way except as noted in this paragraph, is a violation of the code of academic integrity and will be reported to the department and recorded. You may not discuss design of any part of a project with anyone except the instructor or teaching assistants. Examples of questions you may not ask others might be "How did you implement this part of the project?" or "Please look at my code and help me find my stupid syntax error!" or "Please send me your code, just so I can see why mine is still crashing". You may not use any disallowed source of information in creating either their project design or code. When writing projects you are free to use ideas or very short fragments of code from published textbooks or publicly available information (e.g., github, stack overflow), but the specific source must be cited in a comment in the relevant section of the program. If you are in any way uncertain, just email me.
Violations of the Code of Academic Integrity may include, but are not limited to:
Failing to do all or any of the work on a project by yourself, other than assistance from the instructional staff.
Using any ideas or any part of another person’s project, or copying any other individual’s work in any way.
Giving any parts or ideas from your project, including test data, to another student.
Allowing any other students access to your program on any computer system.
Looking over someone’s shoulder as they work on an assignment/project. Allowing someone to look over your shoulder as you work.
Transferring any part of a project to or from another student or individual by any means, electronic or otherwise.
If you have any question about a particular situation or source then consult with the instructors in advance. Should you have difficulty with a programming assignment you should see the instructional staff in office hours, and not solicit help from anyone else in violation of these rules.
It is the responsibility, under the honor policy, of anyone who suspects an incident of academic dishonesty has occurred to report it to their instructor, or directly to the Honor Council.
Every semester the department has discovered a number of students attempting to cheat on project assignments, in violation of academic integrity requirements. Students’ academic careers have been significantly affected by a decision to cheat. Think about whether you want to join them before contemplating cheating, or before helping a friend to cheat.
You are certainly encouraged to form study groups and to discuss the ideas and concepts of the course, independent of exam/homework solutions. You are also welcome and encouraged to study and compare or discuss their implementations of the programming projects with any others after they are graded, provided that all of the students in question have received nonzero scores for that project assignment, and if that project will not be extended upon in a later project assignment.
If you have a suggestion for improving this class, don’t hesitate to tell the instructor or TA(s) during the semester. At the end of the semester, please don’t forget to provide your feedback using the campus-wide IDEA Course Evals system. Your comments will help make this class better for future students!
Although every effort has been made to be complete and accurate, unforeseen circumstances arising during the semester could require the adjustment of any material given here. Consequently, given due notice to students, the instructors reserve the right to change any information on this syllabus or in other course materials.
Some lectures include materials developed by Kris Micinski.