hsf-training / hsf-training/cpluspluscourse

About stl exercise

Open
#454 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
TeX
Stars
313
Forks
104
PR merge metrics
No merged PRs in 30d

Description

As currently written, the students starts with std::generate, which is complex because
of the need of some internal persistent state. Several solutions:

  • find another generation algorithm which do not require internal state.
    why not directly random values ?
  • move it as intermediary/advanced later step.
    By the way, I strongly disagree with the current solution, based on an object-function class. You will frigthen beginners and let them think that the good old code is better ! It is far from perfect, but one can avoid this with an internal static int, or capture by reference an external int.
    Or we should declare as a requirement the knowledge of object-functions ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the STL exercise and its current use of std::generate and the object-function class. Compare the proposed alternatives and the exercise's intended beginner progression, then resolve whether the topic should be simplified, moved later, or explicitly require object-function knowledge; done means the exercise has a decided, beginner-appropriate approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.