google / comprehensive-rust

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
https://google.github.io/comprehensive-rust/
Apache License 2.0
27.96k stars 1.67k forks source link

Overlong slides should be split up or reworked into a smaller slide #2445

Open michael-kerscher opened 1 month ago

michael-kerscher commented 1 month ago

The original issue https://github.com/google/comprehensive-rust/issues/1464 provides arguments on why scrolling on slides should be avoided. To find slides that are interesting to rework I created https://github.com/google/comprehensive-rust/issues/2234 and wrote a small tool to evaluate the slides.

I now did a first run of the new tool and these are the longest pages where the main content element is bigger than 1333 pixels (16:9 ratio if 750 pixels is the assumed width)

https://google.github.io/comprehensive-rust/running-the-course/day-4.html 3508 https://google.github.io/comprehensive-rust/android/interoperability/with-c/bindgen.html 2117 https://google.github.io/comprehensive-rust/unsafe/writing-unsafe-functions.html 1445 https://google.github.io/comprehensive-rust/unsafe/unsafe-functions.html 1445 https://google.github.io/comprehensive-rust/unsafe-rust/unsafe-functions.html 1445 https://google.github.io/comprehensive-rust/unsafe/extern-functions.html 1445 https://google.github.io/comprehensive-rust/unsafe/calling-unsafe-functions.html 1445 https://google.github.io/comprehensive-rust/bare-metal/aps/entry-point.html 1392 https://google.github.io/comprehensive-rust/pattern-matching/let-control-flow.html 1384 https://google.github.io/comprehensive-rust/control-flow/while-let-expressions.html 1384 https://google.github.io/comprehensive-rust/android/interoperability/java.html 1376 https://google.github.io/comprehensive-rust/android/interoperability/with-c/rust.html 1358 https://google.github.io/comprehensive-rust/index.html 1339

This is how I created the result. Filter the output for exercises, print summary, etc. only output MaxHeight violations, only output height in pixel, sort by height descending and create a link

$ python ./.github/workflows/run-evaluator.py book/comprehensive-rust-en/ violations-en.csv
$ grep -Po "(?<=html/).*MaxHeight" violations-en.csv | grep -v -e print.html -e exercises/ -e exercise.html -e solution.html -e glossary.html -e structure.html | sort -h -t, -k 2 -r | sed -e "s|^|https://google.github.io/comprehensive-rust/|" | cut -d, -f 1,3 | tr ',' ' '