Reliable Programming With Rust
EN.601.206 (13), Intersession 2023
Course Overview
Software reliability has long been a demand for critical systems, cloud systems, and even day-to-day applications. Yet, current software systems are written in decades-old programming languages that easily allow programmers to make mistakes, but the languages are receiving stagnant improvements to resolve those issues. Rust is a modern programming language that aims to eradicate the common programmer mistakes at compile time. This course provides students who have already acquired a basic understanding of programming with the knowledge to help them improve programming skills. We will learn about the language designs that make Rust reliable, including but are not limited to ownership, borrowing, lifetime, error handling, pattern matching, internal mutability, and concurrency designs. In addition, we will cover the implicit designs to be cautious with and the modern designs that make Rust convenient to use.
Objectives
The goal of this course is to help students build reliable software. Students will gain in-depth understanding of both the language designs that make it reliable and the principles behind software reliability. Students will be able to write reliable and efficient software in Rust. Students will also become capable to write safer code with reliability concepts in mind when writing in other programming languages. These skills will help students become more effective programmers in writing reliable and efficient software.
Format
The course is organized through lectures and homework. In each class, the instructor will talk about the designs in Rust and the rationale behind the designs. Students will work individually on assignments to practice the concept in Rust and improve their reliable programming skills.
Prerequisites
EN.600.220 (Intermediate Programming), or students should demonstrate deep understanding of the C and C++ programming language concepts. The course schedule is short and tight, and focuses more on software reliability than on language itself. It thus relies on students to have basic prior knowledge of similar concepts in other languages in order to quickly understand the context of new concepts.
Instructor
Email: yzjing ~AT~ jhu ~DOT~ edu
Office Hours: Fridays 3:00pm-4:00pm, Malone 122 or Zoom
Course Links
Home: Canvas
Forum: Campuswire
Autograder: Gradescope
Schedule
Days of week | Time | Location |
---|---|---|
Tue/Wed/Fri | 12:00pm-01:20pm | Krieger 308 |
Lectures
The schedule and topics are tentative, and may change over time. Please check the course homepage regularly for updates.
Week | Date | Lecture | Readings | Assignment |
---|---|---|---|---|
1 | 01/03 Tue | Introduction + Basics | Ch. 1, Ch. 3, Ch. 5 | HW1 |
01/04 Wed | The Three Swords (Ownership, Borrowing, Lifetime) (drafts: rendered, vec.c, vec.cpp, vec.rs) | Ch. 4 | ||
01/06 Fri | The Three Swords (Ownership, Borrowing, Lifetime) cont. | Ch. 10.3 | ||
2 | 01/10 Tue | Pattern Matching and Error Handling | Ch. 6, Ch. 9, Ch. 19 | HW2 |
01/11 Wed | Traits and Generics | Ch. 10, Ch. 18.2 | ||
01/17 Tue | Iterator | Ch. 8.1, Ch. 14.2, Ch. 16 | ||
3 | 01/13 Fri | Fearless Concurrency | Ch. 17 | |
01/18 Wed | Unsafe: Courage To The Dangerous Wild | Ch. 20.1, extended: The Rustonomicon | ||
01/20 Fri | A Glance from the Foothill | TBA | ||
4 | 01/22 Sun | All HWs due |
Note: The chapter links are based on the Rust Book experiment version from Brown University. The numbering may differ from the official version, and may differ across Rust versions.
Textbooks
The Rust Programming Language, by Steve Klabnik and Carol Nichols, in either version:
- Recommended: experimental version from Brown University (online)
- The official book (online)
- Paperback version (2nd Edition) (ISBN: 9781718503106)
Extended reading:
- Rust for Rustaceans: Idiomatic Programming for Experienced Developers, by Jon Gjengset (ISBN: 9781718501850)
- Rust Design Patterns (online)
- Rust by Example (online)
Grading
Grade system: S/U
Homework: 100%
Acknowledgments
The course syllabus, lecture and homework materials are influenced and inspired by UPenn CIS 198 and UMD CMSC388Z. Examples are derived from The Rust Programming Language, Rust by Example, Rust for Rustaceans, and the aforementioned course materials.