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

Automatic counters for challenges #56

Open
robertodr opened this issue Feb 10, 2021 · 4 comments
Open

Automatic counters for challenges #56

robertodr opened this issue Feb 10, 2021 · 4 comments

Comments

@robertodr
Copy link
Contributor

This is my usage scenario:

  1. I am delivering the workshop.
  2. Learners have cloned the lesson repository to follow the exercises.
  3. Exercises are organized by day in a content/code/day-N folder.
  4. Each day-N folder has subfolders with one exercise each. The folder are prefixed with a number, for easier reference. The subfolder contains an incomplete scaffold and its solution. For example:
content/code/day-2/
└── 21_automata-cxx
    ├── external
    ├── solution
    └── src

Can there be automatic counters for the challenge boxes in the lesson? Such that it's easily discoverable into which folder to navigate when one is following along on the lesson webpage. I am not even sure this is possible in Sphinx, to be honest 😅

@bast
Copy link
Member

bast commented Feb 10, 2021

So the goal is that Sphinx infers the number from a path in a directive?

@robertodr
Copy link
Contributor Author

I was more thinking LaTeX-like where \section keeps track of section numbering. So any .. challenge:: would render the box with a number on the side.
You suggestion is more advanced and would help keep the .. challenge:: in sync with changes in the underlying folder structure.

@rkdarst
Copy link
Member

rkdarst commented Apr 5, 2021

My philosophy here was "in a long-term view, we can't rely on numbers since the lesson will be continually updated", and I expected that people would keep referring to the lessons, for example watching a old video of it or referring to it with notes. So, I didn't place too high a priority on auto-numbering, since while convenient in the short term it makes problems when you want to change things. My recommendation is to use manual numbers, and where appropriate insert new numbers without changing all the numbers when it is convenient.

So... that's where this weird system of "5-Git Clone" came from. Manual numbers, which can be adjusted or you could add "5B" for example. Even if all the numbers change, by someone can look up exercise "Git Clone" and find what is hopefully it. (While interesting, I have a feeling this isn't really a working solution to the problem and no one would do it this way).

Maybe another option is each series of exercises has some numbers like 3A, 3B, 3C, so you can at least find the right area if not re-doing it.

What do you think? What's the best general option to recommend?

@bast
Copy link
Member

bast commented Apr 5, 2021

In my recent course I have used numbering and I think it can help to quickly locate the exercise.

For video recordings this can be a problem but maybe we can have both? An exercise can have a number and a name? The person in the live workshop appreciates the number because they need to find it and the breakout room closes again in 10 minutes. The person watching the video can pause it and locate the exercise by name and there the number is less important perhaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants