YoVDO

A Tale of Teaching Rust - Experiences and Insights

Offered By: Rust via YouTube

Tags

Rust Courses Concurrency Courses Memory Safety Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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

Related Courses

Paradigms of Computer Programming – Fundamentals
Université catholique de Louvain via edX
Paradigms of Computer Programming – Abstraction and Concurrency
Université catholique de Louvain via edX
Computing: Art, Magic, Science - Part II
ETH Zurich via edX
Concurrency
AdaCore via Independent
Java Fundamentals for Android Development
Galileo University via edX