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:

  1. Build medium-scale software projects in principled ways.
  2. Understand the role of specifications and abstractions, and how to validate that an implementation is correct via testing, verification, and formal reasoning.
  3. Analyze a software problem and design effective and efficient solutions.
  4. Apply concepts of modularity, separation of concerns, and software architectures to solve recurring design problems.
  5. 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.
  6. 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

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.

  1. Introduction to Software
  2. Swift and iOS Programming
  3. Reasoning About Code
  4. Abstraction and Specifications
  5. Testing
  6. Debugging
  7. Design and Style
  8. Subtyping and Extensibility
  9. Protocols, Extensions, and Generics
  10. Event-based Programming
  11. Design Patterns
  12. System Architectures
  13. Concurrency, Persistence, REST Protocols
  14. 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:

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:

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:

Examples of information you may not look for:

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.