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

Feedback on execute code lesson #100

Open
lwasser opened this issue Jan 15, 2025 · 0 comments
Open

Feedback on execute code lesson #100

lwasser opened this issue Jan 15, 2025 · 0 comments

Comments

@lwasser
Copy link
Member

lwasser commented Jan 15, 2025

We got a bit of feedback on the execute code lesson from @stefanv that we can integrate into a future version of the execute code lesson! it's below. i just want to document it now that the lesson is merged. ✨

In teaching material, I would try very hard to present One Way of doing something. I know it's tempting to describe all the various ways that code may be executed in Python, but it very quickly becomes overwhelming to a newcomer. When reviewing such material, you have to put on the I-Know-Absolutely-Nothing hat, and then try and read a paragraph like:

Python script.
There are two other ways to execute Python code from the command line, both of which work for code that has been formatted as a package.

You can execute modules using their import name
You can execute packages using a main.py file
You can execute functions named commands using project scripts

Overwhelming, because now you really have to have a fine-grained understanding of the difference between modules, packages, and functions.

Whereas learning to run python myfile.py is pretty easy, and covers most use-cases.

Limit the number of distractions. A newcomer doesn't need to know about "side-effects" etc. If you teach them what they need to do, they may run across those things eventually, and may have to figure it out. But, meanwhile, they'll have a very straightforward working example to return to.

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

1 participant