-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write our own summaries of std types' API surface #2248
Comments
I didn't know about the I'm a little wary of duplicating that information, and I think there's some value to navigating the std docs, warts and all. Maybe it would make sense to add sliides or sub-slides for the limited points you highlighted, but still link to the docs for the details. Maybe a good perspective is to think what students should recall a week after the course: "oh, HashMap has some entry API to avoid double-lookups -- I'll go find that on std.rs" or "I think you can have mut references to different parts of a slice -- there are split methods for slices that do that." In any case, I'd prefer students refer back to std to fill in what they've forgotten, rather than the course slides. |
I do notice that I fairly consistently lose some amount of students/attention when doing the dive into the standard library API docs, but I still think it's important to show a large swath of the available functionality so that students know what's out there. Avoiding rewriting built-in functionality is important for becoming productive in Rust as a beginner. We do definitely want to ensure students familiar with the API docs as those will be their source of reference moving forward for both the stdlib and ecosystem crates, but with the amount of very similar methods present on some of these types I think some structure could help for breaking up the monotony when teaching. For example, slices have 21
I think it's better to address this combinatorial explosion with a structured explanation prepared beforehand so I'm not scrolling haphazardly while students try to find their bearings. Just poking at this because it's fresh in my head from my current course session. |
I think one of the observations at the foundation of this class is that it is very hard to watch someone else scroll something onscreen. So, scrolling through a So I agree regarding structure. Maybe a few quick slides that cover a few common "ideas" (like splitting) would be a good level -- without going into the details of all 26 methods. |
Yes, this was actually given as course feedback recently — this section seems to have a lot of one-way communication, which makes it hard to follow for the students.
I would probably tone it way down, to be honest. I would want people to know about the most commonly used types, such as |
Currently our section on std library types consists of a slide for each type with an example, and when teaching this is nice as an intro but gets followed up by a dive into the API docs at https://std.rs/ to cover more comprehensively all the API surface that students should know.
We focus on:
into_boxed_slice
,leak
, andsplit_at_mut
)Pattern
trait and UTF-8Deref
implsHashMap
Entry
APIBut there's a lot that we have to scroll past and ignore because it's boring, rarely useful, unstable, etc..
It would be nice to have our own summaries of these APIs that present things with emphasis on what we care about and skip the stuff that doesn't matter for teaching.
I don't think these will likely fit into small slides, so maybe someone with opinions on slide heights/scrolling should opine here.
The text was updated successfully, but these errors were encountered: