Suggestions: 1. Do examples beforehand 2. Treat rustc as a teacher 3. Don't fake it
7
Rust Playground The (New) Rust Book Rustlings Godbolt
8
The Class
9
All data has an owner Ownership can be moved Old owner can't use data Simple types can be copied
10
Aliasing XOR Mutability
11
Emphasize the rules Give lots of examples Show some complex cases
12
Sometimes you need code that's generic over lifetimes
13
Assignment: do the move semantics Rustlings exercises
14
Threads w/out data races
15
Introduce the key stdlib types: Arc, Rc, Mutex, RwLock
16
Make clear that Rust stops data races, not race conditions
17
Assignment: solve the Dining Philosophers problem
18
Safety & Security
19
Explain Safe Rust & Unsafe Rust
20
Unsafe Rust can't trust Safe Rust
21
Safety lies at the module boundary
22
Safety has an impact on security
23
Assignment: find a CVE that could have been stopped by Rust
24
The Results
25
Ended the series with a post-Rust survey
26
And the syntax was weird
27
Students felt Rust was really powerful
28
Students felt more confident than they did with C++
29
The ergonomics initiative will help new Rustaceans!
30
Conclusion
Description:
Explore a conference talk from RustConf 2017 that delves into the experience of teaching Rust to undergraduate students. Learn about the key concepts of Rust that are valuable for programmers across all languages and language designers. Discover how a group of 26 novice programmers, most familiar with only one language, grasped Rust's concepts and their current perceptions of the language. Gain insights into effective methods for teaching Rust, including the use of practical examples, leveraging the Rust compiler as a teaching tool, and utilizing resources like the Rust Playground and Rustlings exercises. Understand the importance of ownership, aliasing, mutability, and lifetimes in Rust programming. Examine the approach to teaching threads without data races and introducing key standard library types. Investigate the impact of Rust's safety features on security and the distinction between Safe and Unsafe Rust. Analyze the results of a post-Rust survey, revealing students' increased confidence compared to C++ and their perception of Rust's power despite its initial learning curve.
Read more
A Tale of Teaching Rust - Experiences and Insights