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

'initial' contribution #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mdolling-gfz
Copy link

I'd like to make a initial commit to this lesson.
It is dead for several years now, but honestly I kinda need this lesson and think it is helpful for many others as well.

Main goal here is to get things started and discuss, if the contents are fine.


Thanks for contributing! If this contribution is for instructor training, please send an email to [email protected] with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.

Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at [email protected].


@nbrinckm
Copy link

Hi Max,

I really like the idea of - at least - starting to resuscitate the python intermediate lesson.
Currently I have a question open on adding / at least mentioning the pdb in the python beginners workshop in the debugging section.
As discussed there, there are already issues with time & complexity, so I guess adding the pdb there is kind of unlikely.

Because of that the pdb may be an topic for the intermediate lesson as well.

Comment on lines +3 to +6
Azalee Bostroem, Trevor Bekolay, and Valentina Staneva (eds):
"Software Carpentry: Programming with Python." Version 2016.06, June
2016, https://github.com/swcarpentry/python-novice-inflammation,
10.5281/zenodo.57492.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you

  • Adapted the Citation

Comment on lines +31 to +42
| 1 | [Python Fundamentals][episode01] | 30 | What basic data types can I work with in Python?<br>How can I create a new variable in Python?<br>Can I change the value associated with a variable after I create it? |
| 2 | [Analyzing Patient Data][episode02] | 60 | How can I process tabular data files in Python? |
| 3 | [Visualizing Tabular Data][episode03] | 50 | How can I visualize tabular data in Python?<br>How can I group several plots together? |
| 4 | [Repeating Actions with Loops][episode04] | 30 | How can I do the same operations on many different values? |
| 5 | [Storing Multiple Values in Lists][episode05] | 30 | How can I store many values together? |
| 6 | [Analyzing Data from Multiple Files][episode06] | 20 | How can I do the same operations on many different files? |
| 7 | [Making Choices][episode07] | 30 | How can my programs do different things based on data values? |
| 8 | [Creating Functions][episode08] | 30 | How can I define new functions?<br>What’s the difference between defining and calling a function?<br>What happens when I call a function? |
| 9 | [Errors and Exceptions][episode09] | 30 | How does Python report errors?<br>How can I handle errors in Python programs? |
|10 | [Defensive Programming][episode10] | 30 | How can I make my programs more reliable? |
|11 | [Debugging][episode11] | 30 | How can I debug my program? |
|12 | [Command-Line Programs][episode12] | 30 | How can I write Python programs that will work like Unix command-line tools? |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you

  • Updated the lesson outline

- "What did we learn in the Previous workshop?"
objectives:
- "Recap the Python novice Workshop"
- "Write a short program using python novice knowledge."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a creative process. While it is a nice way of getting the participants into the flow, it is very hard to select a good task that everyone can solve in the given time.

  • Make sure that it requires no previous expert knowledge on any topic (besides python).
  • Structure the task into multiple small consecutive sub-tasks that guide the learner

questions:
- "How can I improve my coding style?"
- "What is a style guide"
- "How can I test, if my coding style goes well with a style guide"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "How can I test, if my coding style goes well with a style guide"
- "How can I test if my coding style goes well with a style guide"

Superfluous ,

- "How can I test, if my coding style goes well with a style guide"
objectives:
- "Learn about style guides."
- "Learn, how a linter works."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "Learn, how a linter works."
- "Learn, what a _linter_ does."

I suggest a slightly different wording, to not raise expectation regarding learning about the internal functioning of linters.

objectives:
- "Learn about style guides."
- "Learn, how a linter works."
- "Test your program from the previous section with a linter"
Copy link

@fer-rum fer-rum Mar 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "Test your program from the previous section with a linter"
- "Validate a program with a linter"

Better reserve the word test for actual (unit) testing. It is important to not confuse learners by using the same word in different contexts.

Further, while you may use a previous program for the exercise, I would suggest to keep the title brief and not overly specific.

Comment on lines +6 to +7
- "How do I use more complex data structures"
- "Why is it useful?"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "How do I use more complex data structures"
- "Why is it useful?"
- "What are complex data structures?"
- "How and when to use them?"

This is still a bit fuzzy. While developing this episode, clarify which data structures you intend to cover (probably list, dict, tuple? )

Comment on lines +6 to +7
- "What is an API?"
- "How get I automatically retrieve data from an API?"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "What is an API?"
- "How get I automatically retrieve data from an API?"
- "What is an API?"
- "How to retrieve data from an API?"

Automatically is superfluous here. Automation is why one writes a program after all

Comment on lines +1 to +12
---
title: Remote Data and APIs
teaching: 40
exercises: 15
questions:
- "What is an API?"
- "How get I automatically retrieve data from an API?"
objectives:
- "Download data from an API."
keypoints:
- "TODO"
---
Copy link

@fer-rum fer-rum Mar 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selecting a good API for this task is going to be a challenge.
It must be public, easy to grasp to not distract from the main matter, have a high availability so it does not get impeded by a whole room of people suddenly experimenting on it. You can not count on an API that is self-hosted due to the effort that comes with it.

Consider that for the API all these requests may appear to come from the same domain and it might trigger DDOS protection if something unexpected happens (I forgot to terminate a loop once…)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this topic is too advanced for an intermediate course?

Comment on lines +6 to +7
- "What is a 'class'?"
- "Why is it useful?"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question of usefulness should be intertwined with the what is… part, because the answer to what is x usually is x is the solution to problem y. I suggest to give problem y first and then present classes as the solution.

Additionally, I would suggest to put classes directly after complex data structures as the pinnacle of the latter.

Comment on lines +6 to +7
- "Who can I share my python code for other to easily use?"
- "How can I create Python code across multiple files?"
Copy link

@fer-rum fer-rum Mar 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "Who can I share my python code for other to easily use?"
- "How can I create Python code across multiple files?"
- "How to share my _python_ code for others to use more easily?"
- "How to create _python_ code across multiple files?"

@@ -0,0 +1,11 @@
---
title: Python GPU usage
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While useful, this is a very complex topic. Python on GPU could be a whole workshop on its own.

@@ -0,0 +1,11 @@
---
title: Asynchronous Programming in Python
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do recommend to teach exception handling as a prerequisite.

Also beware: This is a very complex topic with huge potential for things that can go wrong. You will have to at least mention things like deadlocks and thread starvation because they are common pitfalls and pretty hard to debug..

@fer-rum
Copy link

fer-rum commented Mar 9, 2020

As you probably noticed, I went over the curriculum you had planned 😄
That is a good starting point.

My suggestion would be to focus a bit more on the "overlooked" basic skills, that are vital for the productive writing of high-quality code.

  • How to use a debugger
  • How to write unit tests
  • How to handle exceptions
  • How to static type and use a type checker (e.g. mypy)

Asynchronous programming and working on a GPU are too far beyond the scope of an intermediate learner in my opinion.

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

Successfully merging this pull request may close these issues.

3 participants