eecs280staff / tutorials

Tools and tutorials
https://eecs280staff.github.io/tutorials/
Other
5 stars 4 forks source link

Use P1 for Command-Line Argument Example #190

Closed jamesjuett closed 2 months ago

jamesjuett commented 2 months ago

This PR updates the tutorials to use project 1 instead of project 5 (now project 4) as an example for command-line arguments. This will make it more relevant for students starting EECS 280 and is now possible that P1 uses command-line arguments.

I've targeted this to merge into p1-tutorial-updates so that the diff is clearer. If that is merged first, I'll retarget this to main. [Actually - it looks like Github was smart enough to do this automatically.]

The following images need to be updated:

github-actions[bot] commented 2 months ago

The spec from this PR is available at https://preview.sesh.rs/previews/eecs280staff/tutorials/190/.

(Available until Thu Sep 26 2024.)

jamesjuett commented 2 months ago

@awdeorio I had originally left options, as well as adding another example (because we no longer have the naturally occurring --debug example from P5), something like this:

Many programs use options, which are arguments starting with - or --, to customize their behavior. For example, -v or --verbose tells a program to print more verbose output than default.

However, I felt like it was getting too much into the territory of teaching about the general conventions for arguments, options, flags (which are really just options without parameters), etc. (a la https://stackoverflow.com/questions/36495669/difference-between-terms-option-argument-and-parameter).

For the tutorials, I think it is probably best to leave it at configuring arguments when you run in the various IDEs or debuggers. (Which covers options and flags as well, since those are just arguments that follow particular conventions.)

But, I don't have a strong preference - LMK what you think about the tradeoff. In particular, I don't have any objection to adding the word "option" to the places you suggested if you think it helps.

awdeorio commented 2 months ago

I might be nice to have an indicator for students on later projects that options are configured in the same way as arguments. From the perspective of C++, options are args, but from the perspective of the CLI, the nomenclature often has them as distinct (example).

jamesjuett commented 2 months ago

I might be nice to have an indicator for students on later projects that options are configured in the same way as arguments. From the perspective of C++, options are args, but from the perspective of the CLI, the nomenclature often has them as distinct (example).

Makes sense. I added your suggestions in dae6b75. Thanks!