Skip to content
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

Things to fix on 1st/2nd/3rd day of advanced course #352

Closed
hageboeck opened this issue Oct 12, 2022 · 5 comments · Fixed by #523
Closed

Things to fix on 1st/2nd/3rd day of advanced course #352

hageboeck opened this issue Oct 12, 2022 · 5 comments · Fixed by #523
Assignees
Labels
Advanced Content for the "advanced" course

Comments

@hageboeck
Copy link
Contributor

hageboeck commented Oct 12, 2022

  • Lambda part might be hasty
  • Slide 243 (lambdas) goes to unique_ptr, custom deleters and cuda whereas smart pointers will be introduced much later.
  • Template part is probably too complicated as well
  • Didn't have enough time for RNGs
  • Why are our spans not const in the "Usage" slide?
@bernhardmgruber
Copy link
Contributor

clang-format

  • question form the audience: how do I specify my own style? (not use --style=LLVM). Maybe add one more example or line saying that by default clang-format will try to find a .clang-format file.
  • should we talk more about IDE integration? like how people should setup their VSCode, or vim etc?
  • should we mention pre-commit hooks?

godbolt:

  • mention usefulness for sharing links/code snippets

  • mention other supported tools? (like running clang-tidy, cppinsights or quickbench from godbolt)

  • mention support for other languages?

  • Fix latex \cpp command to not eat trailing space

  • mention IWUY (include what you use)

@bernhardmgruber bernhardmgruber changed the title Things to fix on 2nd day of advanced course Things to fix on 2nd/3rd day of advanced course Oct 13, 2022
@bernhardmgruber
Copy link
Contributor

During concurrency:

  • Typeset decltype using \texttt
  • Mention std::thread::detach? Detached threads are killed after main returns! That's important to know.
  • Very nice to show the AdePT example for std::async. should we put a simplified version on the slides?
  • Better example for thread_local? Where it actually has an advantage over a local variable.
  • thread_local slide: jthread::join() could be replaced by wrapping an appropriate scope around and let the jthread join in dtor.
  • condition_variable notify_all vs. notify_one

@bernhardmgruber
Copy link
Contributor

What I collected myself when rehearsing:

  • explain left vs right fold + associativity
  • do we ever explain lvalue and rvalue?
  • add a slide on expansion loci and that we do not need a comma before ...
  • constexpr if deserves a bit more demonstration of its power

@bernhardmgruber bernhardmgruber changed the title Things to fix on 2nd/3rd day of advanced course Things to fix on 1st/2nd/3rd day of advanced course Oct 13, 2022
@bernhardmgruber
Copy link
Contributor

my notes from the first day:

  • avoid putting a using namespace ...; declaration into a header file, especially not on the global namespace!
  • Mentioned on slide Pointers vs References: std::optional<T&>. Unfortunately, this is not allowed :/ boost::optional allows it.
  • range-based loop slide: show what the compiler generates under the hood! cppinsights?
  • the operator() of a lambda is also inline by default
  • there was a question about lifetime extension of a temporary by a const reference, maybe add that to the slides?
  • discussion of = default; on special member functions. it does not force the generation. compiler only generates them if they are not ill-formed
  • static_assert is available since C++11, only the version without a message is C++17
  • MyNS is probably not the best choice for a namespace.
  • Hidden Friends and ADL "Accidental conversion example" is not clear enough. maybe split to another slide and contrast a working/non-working example?
  • add a link to https://cdecl.org/
  • Guilherme: s/Real life example/Example/ in this slide (some constexpr slide)
  • noexcept specifier slide: put guideline (Use noexcept on leaf functions...) in a good practice box
  • noexcept operator: add an example definition of f above the constexpr bool callCannotThrow = noexcept(f())
  • we should finally add a slide on value categories (r-value, l-value, x-value)

@stale
Copy link

stale bot commented Oct 13, 2023

This issue or pull request has been automatically marked as stale because it has not had recent activity. Please manually close it, if it is no longer relevant, or ask for help or support to help getting it unstuck. Let me bring this to the attention of @klieret @wdconinc @michmx for now.

@stale stale bot added the stale label Oct 13, 2023
@hageboeck hageboeck added the Advanced Content for the "advanced" course label Mar 28, 2024
@stale stale bot removed the stale label Mar 28, 2024
@hageboeck hageboeck self-assigned this Jun 19, 2024
hageboeck added a commit to hageboeck/cpluspluscourse that referenced this issue Aug 21, 2024
We tell students to extensively use const, but the spans demo would
have allowed changing values in the original containers.

Fix hsf-training#352
hageboeck added a commit to hageboeck/cpluspluscourse that referenced this issue Aug 21, 2024
The example was mentioned to be difficult to read.

Fix hsf-training#352.
hageboeck added a commit that referenced this issue Aug 22, 2024
The example was mentioned to be difficult to read.

Fix #352.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Advanced Content for the "advanced" course
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants