RustConf 2023 - The Art and Science of Teaching Rust

Discover the art and science of teaching Rust, exploring common struggles, misconceptions, and successful interventions to improve learners' understanding of module trees, borrow checking, and memory usage.

Key takeaways
  • Students struggle with Rust module trees and re-exports, and have trouble understanding the borrow checker.
  • The diagram of borrow checker workings does not explain memory usage.
  • Most Rust learners struggle to predict potential memory usage and have trouble understanding ownership.
  • The top questions tagged with Rust on Stack Overflow show common struggles.
  • Common misconceptions include thinking that the borrow checker catches all undefined behavior, and that unsafe code is only used for foreign function interfaces.
  • Changes to the Rust book and quiz questions have been successful in improving learners’ understanding of ownership and other concepts.
  • Adding quizzes to the Rust book was a total success and helped in understanding the learning curve of the language.
  • The pedagogy for the new chapter on ownership included giving readers a clear mental model of what a pointer is and how it works in Rust.
  • The quiz questions helped in pinpointing the struggles of Rust learners with greater specificity.
  • The experimental book is still live and available for review.
  • The quiz questions and pedagogy helped in improving learners’ accuracy by an average of 19%.
  • The interventions were successful in improving accuracy in 12 out of 14 questions.