Schedule
The course was divided into 4 days and 2 weeks, with two consecutive days per week. Each day was about 6 hours long, with a 1-hour break for lunch.
We primarily followed the schedule outlined in the original course materials. However, some sections were omitted due to their advanced nature (e.g., interior mutability and unsafe Rust) or deemed less relevant to the course objectives (e.g., testing and the module system). The time saved from these omissions was reallocated to additional exercises and discussions. We aimed to schedule most exercises just before breaks, followed by a solution discussion after the break.
Day 1
This day covered the content of the first day from the original course and the initial section of the second day, focusing on Pattern Matching. We opted to skip the Nested Arrays and Elevator Events exercises, concluding the day with the Expression Evaluation exercise.
Day 2
Leveraging the time saved from Day 1, we began Day 2 with a dedicated discussion about "why Rust." This session delved into Rust's unique features and explored how they benefit development practices. While introducing this topic later in the course might seem unconventional, we found it fostered a more technical and concrete conversation.
Some of the key topics covered included:
-
Memory Management: Rust's unique memory model eliminates memory management bugs without relying on a garbage collector.
-
Type System: Rust's rich type system allows for expressive and safe code.
- Exclusive and shared references
- Mutability in declarations/signatures.
- Rust's enums that can have data attached to them.
- Consuming functions.
- Rust's unique error handling mechanism
- Composition through traits, as opposed to object-oriented programming
We emphasized how these features help write more reliable and maintainable code.
-
Concurrency: Rust's "Fearless Concurrency" model enables safe and efficient parallel programming.
-
Zero-Cost Abstractions:
- Monomorphization
- The newtype pattern
-
Modern, Batteries Included Toolset that makes Rust development a breeze.
- Cargo
- rustfmt
- clippy
- Documentation generation
- rust-analyzer
-
Python Integration: Rust makes it easy to create Python extensions. Several prominent Python projects leverage Rust, including:
It's also easy to call Python code from Rust.
-
Industry Adoption: Rust is gaining significant traction within the industry, used by major companies and currently ranking among the top 20 most popular languages according to the TIOBE index.
-
Developer Satisfaction: Programming in Rust is fun! It is the most admired language for the 8'th year in a row according to the Stack Overflow Developer Survey. We also acknowledged some of Rust's drawbacks, including:
-
Steeper learning curve
-
Slower compilation times
-
Immature ecosystem in certain domains
The remaining portion of Day 2 followed the original course schedule, except for replacing the last ROT13 exercise with our Inventory exercise.
Day 3
This day covered the material from the original course's third day with the following exceptions:
- We skipped the sections on the Drop trait and interior mutability. but briefly discussed their existence and importance.
- We replaced the Health Statistics exercise with our Non Empty Vector exercise.
- We replaced the Protobuf parsing exercise with our Lifetimes exercise.
Day 4
We skipped the Modules, Testing and Unsafe Rust sections, leaving only the Iterators and Error Handling sections.
We added a section on how to create Python extensions using PyO3, and concluded the course with the Mini GTFS exercise.