Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

A Tale of Teaching Rust - Experiences and Insights

Rust via YouTube

Overview

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.

Syllabus

Intro
The Pitch
Week 3: Explain why it matters
The Plan
What's the approach?
Suggestions: 1. Do examples beforehand 2. Treat rustc as a teacher 3. Don't fake it
Rust Playground The (New) Rust Book Rustlings Godbolt
The Class
All data has an owner Ownership can be moved Old owner can't use data Simple types can be copied
Aliasing XOR Mutability
Emphasize the rules Give lots of examples Show some complex cases
Sometimes you need code that's generic over lifetimes
Assignment: do the move semantics Rustlings exercises
Threads w/out data races
Introduce the key stdlib types: Arc, Rc, Mutex, RwLock
Make clear that Rust stops data races, not race conditions
Assignment: solve the Dining Philosophers problem
Safety & Security
Explain Safe Rust & Unsafe Rust
Unsafe Rust can't trust Safe Rust
Safety lies at the module boundary
Safety has an impact on security
Assignment: find a CVE that could have been stopped by Rust
The Results
Ended the series with a post-Rust survey
And the syntax was weird
Students felt Rust was really powerful
Students felt more confident than they did with C++
The ergonomics initiative will help new Rustaceans!
Conclusion

Taught by

Rust

Reviews

Start your review of A Tale of Teaching Rust - Experiences and Insights

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.