Skip to content

Notes on Course Material #18

Closed
Closed
@coastalwhite

Description

@coastalwhite

Hey, I decided to look through the Course Material and have some questions and comments which hopefully can help the course forward. Overal I agree with most of the structure.

Target Audience

What is the actual target audience of the course? Is it targeting first year's students or students later in their university life? My current impression is that is trying to target both, which is fine but is probably quite a lot more difficult.

To deal with these differences in the audience experience, it may be interesting to provide a block with most programming syntax and semantics sections with 4-5 tabs. This should try to explain it which the readers specific context and give the professors good resources depending on the context at the university.

One tab should explain the concept as if the reader has no programming experience, others should explain it as if the reader is coming from a specific programming language. As far as I know the most common languages to learn first at university are C, Python, Java and JavaScript. We can compare basic concepts to how they are in those languages.

A1

The A1 module mostly seems fine to me. One of the parts I maybe agree a bit less with is the Move Semantics. Personally, I would take this chance to explain the rationale for the Borrow Checker and also explain the Drop semantics (not the Drop trait). I feel like most people would agree this is one of the major mechanisms that sets rust apart from other programming languages and having people familiar with it seems like something you want to do as soon as possible. Later you could link back onto this and explain things in a little more detail. Meanwhile students may connect some dots and detect some patterns themselves.

Some others small things:

  • rustc --explain is really useful
  • Some exercises with theoretical questions about the borrow checker

A2

This is probably the module I have the most comments about.

  • Personnally, I would explain lib vs bin and the module system in this section as I feel like they are both extremely vital to looking at any form of rust code.
  • I would move opt-levels and LTO to module B. These things are extremely domain specific and just distract from the important basics. Same for cross-compilation.
  • SemVer is extremely widely used in Rust. It should at least be mentioned here, I reckon.
  • Mention the rustonomicon in module F and not here.
  • Just provide a list of commonly used crates (serde, rand, libc, nix, syn, quote, proc_macro(2)) and explain why not everything is in the std

A3

  • Maybe do mention into & from with the casting but don't explain them detailed as of yet. Just plant the seed that there might be a method that is used in most situations.
  • Maybe add a part about const contexts.
  • Small part on macro_rules! since these are widely used
  • Leave out union here and explain that in F with the unsafe and FFI parts

B

  • Part on normal headers in documentation. Already partly included in Rust API guidelines

C

  • Mention Rayon
  • Maybe reference the book by Mara Bos on the topic

D

  • Explain the different memory models that can be used while programming rust. This is mostly from the Jon Gjengset video on unsafe rust. I do think this is quite important but may take a long time to explain properly. Maybe there are some external resources that do this already and we can link to those.

E

  • Part on WebAssembly

A0

Maybe, it is an idea to have an A0 module that is specifically for universities trying to use Rust as their intro to programming class. This may be out of the scope of this project, let me know.

This module can explain some of the more general and basic programming concepts. This could cover motivations for items and introduce working code without to much explanation as to what they are. Providing a lot of space for the student to infer their own patterns. I need to do more research into how other courses do this, but right now some of the items I think it should introduce are:

  • Variables
    • Numbers (unsigned, signed, floating point)
    • Chars and strings
    • Groups of structures
  • Control Flow
  • Loops
  • Functions
  • Input / Output
  • Compartimentilization
  • Examples of common domains
    • Web
    • Systems
    • Embedded
  • Common problems
    • max / min
    • serialisation
    • parsing
    • sorting

Thoughts

I think it will be very difficult to balance time and what to explain where.

I would love to help writing parts of this course. I would love to hear your opinions on these items and if you agree with some, I can send a PR with those changes. Also, if you would like me to look into some specifics let me know. If you would like to have me start writing on some topic, also let me know. Again, would love to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions