CS326 Syllabus
Sophisticated software systems play a prominent role in many aspects of our lives, and while programming can be a very creative and exciting process, building a reliable software system of any size is no easy feat. Moreover, the ultimate outcome of any programming endeavor is likely to be incomplete, unreliable, and unmaintainable unless principled methods for software construction are followed. This course explores those methods. Specific topics include: software processes; specifying requirements and verifying correctness; software architectures; concurrent, parallel, and scalable systems design; testing and debugging; and performance evaluation.
We will study these topics in the context of building iOS applications in the Swift programming language.
Prerequisites
CSCI 136 and at least one core class in the Computer Science major. You are expected to be proficient in programming in the Java language and reasoning about code correctness and performance at the level of CSCI 136. You should also be comfortable with the basics of Unix. Prior Swift experience is not necessary.
Outcomes
By the end of the course, students should be able to:
- Build medium-scale software projects in principled ways.
- Understand the role of specifications and abstractions, and how to validate that an implementation is correct via testing, verification, and formal reasoning.
- Analyze a software problem and design effective and efficient solutions.
- Apply concepts of modularity, separation of concerns, and software architectures to solve recurring design problems.
- Use contemporary programming languages and systems effectively, with a particular focus on leveraging abstraction mechanisms, Model-View-Controller UI design, concurrency, data persistence, and failure detection / recovery.
- Effectively learn and use additional new tools for building and analyzing software, including testing frameworks, debuggers, program checkers, profilers, version control, IDEs, etc.
Course Materials
- The Programmatic Programmer – 20th Anniversary Edition, Andrew Hunt and David Thomas. Addison Wesley, 2020.
- Online references and additional readings
Lecture/Lab Times
Lectures are Tuesday and Thursday 9:55 - 11:10 in TCL 206. Labs are Thursday afternoon 1:10 - 2:25 or 2:35 - 3:50 in TCL 217A.
Outline
The following is a tentative list of topics we will cover.
- Introduction to Software
- Swift and iOS Programming
- Reasoning About Code
- Abstraction and Specifications
- Testing
- Debugging
- Design and Style
- Subtyping and Extensibility
- Protocols, Extensions, and Generics
- Event-based Programming
- Design Patterns
- System Architectures
- Concurrency, Persistence, REST Protocols
- Source Version Control
Work Structure
Course work will include weekly lab programming projects, many of which will involve group collaboration, as well as reading assignments and problem sets. There will also be a large group project, midterm, and final.
Problem Sets should:
- be turned at the beginning of class on the due date,
- be clearly written or typed,
- include source code print outs for any questions involving programming,
- list any students with whom you discussed the problems (see Honor Code below), and
- be stapled, with your answers clearly marked and in the same order as the questions.
You will be asked to fix and resubmit homework not following these conventions. If your penmanship is difficult to read, please type your answers.
Programming assignments will be assigned weekly and typically due by the beginning of class on Tuesday. There is a required lab section on Thursday afternoon for you to work on these assignments. You will sometimes be required to complete initial parts of assignments before lab, and some lab sessions may also include additional exercises or class discussions. Some programs will be written in pairs. You may choose who you work with for some, but I may choose partners for others. The final project will be done in groups. All lab work will be stored in git
repositories and submitted through them. More details on how to use git
and this process will be provided later.
Late Days: Each student may use a maximum of three late days during the course of the semester. A single late day enables you to hand in a problem set or weekly lab assignment up to 24 hours after the original due date. Once those late days are used up, late work will be penalized 20% per day. You may use late days for any reason, but if you are going to use one, please email to me before the deadline with a short status update including a description of what has been completed and an outline of what steps remain. Two or three sentences should be sufficient for this.
Late days are designed to give you some flexibility, but be warned that the programming projects can be substantial and sometimes cumulative. Falling behind or failing to complete one project may substantially impact the follow-on assignments. Use late days if you need to, but plan ahead and start early. Late days may not be used for final project deadlines.
All programs will be graded on design, documentation, style, correctness, and efficiency.
Grades will be roughly determined as follows:
- Homework and Labs: 50%
- Exam: 15%
- Final Project: 35%
- Class Participation, Quizzes, etc.: 5%
Honor Code
Discussing written problems with other students in the class is permitted. However, copying of solutions is not. The work you hand in should be your own. A good rule to follow is to work through the problems with others, taking only rough notes. You should then write your solutions independently, referring to your notes as little as possible. The idea is to understand each solution well enough that you can reconstruct it by yourself. In addition, you should write on each assignment the list of people with whom you collaborated.
The same applies to programming — feel free to discuss general ideas with others, but the design and code you submit should have been written entirely by you (or your group if it is a group assignment).
I will occasionally give more detailed collaboration guidelines on some assignments. Uncredited collaborations will be considered a violation of the honor code and will be handled appropriately.
Outside references: You may refer to any course materials and the web sites listed under the Resources heading. You may use other sources as references to look for specific information — API usage, git
or XCode commands, Swift language features. You may not use other sources to look for solutions to your homework or lab questions, and you may never copy prose or code directly from another source.
Examples of information you may look for in outside sources:
- “What are the parameters for
CGRect.offsetBy
?”
- “What does the compiler error ‘Missing argument label in call’ mean?”
- “How do I declare an
enum
in Swift?” - “How do I connect a button to an action method in XCode?”
Examples of information you may not look for:
- “How do I sort a list of points by distance from origin?”
- “How do I scale an image to fit within the bounds of a rectangle?”
- “How do I write a calculator in Swift?”
- “How do I write an action method to zoom the contents of a custom view?”
Any sources of information used to complete your assignments should be cited.
Please also read the complete The CS Honor Code and Computer Usage Policy.
If in doubt as to what is appropriate, do not hesitate to ask me.
After the semester: Please do not post your solutions to the CS 326 problem sets or labs in any public forum, including public GitHub repositories. However, feel free to post your final projects anywhere you like once the semester is over.