Skip to content

Lecture Review: Major Restructuring of Advanced Python Programming Section, Task 2-3#218

Merged
mmcky merged 24 commits intomainfrom
restructure-advanced
Sep 28, 2022
Merged

Lecture Review: Major Restructuring of Advanced Python Programming Section, Task 2-3#218
mmcky merged 24 commits intomainfrom
restructure-advanced

Conversation

@HumphreyYang
Copy link
Copy Markdown
Member

@HumphreyYang HumphreyYang commented Sep 10, 2022

Hi @jstac and @mmcky,

I finished task 2 and task 3 of #210.

Here is a summary of what I have done:

  1. Restructure:

  2. Additions:

    • I wrote an exercise for the namespace in 6.5. Exercises
    • I added namespace into the summary section 6.4. Summary
    • I added necessary transitions between sections.

Please kindly review these changes, and let me know if there is anything I need to change.

  1. About moving Advanced Python Programming to Introduction to Python

    • As we have discussed before @jstac in previous meeting, we might be able to move the three lectures under Advanced Python Programming to Introduction to Python. However, during the review, I found a lot of knowledge involved in lectures under Advanced Python Programming is discussed in the scientific library lectures. For example, the lecture on debugging involves some levels of understanding of np.array and matplotlib.pyplot.subplots (see this section). Therefore, for the sake of clarity, it may be better if we leave the entire structure unchanged, or we can rewrite some of them without assumed knowledge.

Could you also give your suggestions on this issue?

Many thanks in advance.

@HumphreyYang HumphreyYang changed the title Lecture Review: Restructuring Advanced Python Programming Section, Task 2-3 Lecture Review: Major Restructuring of Advanced Python Programming Section, Task 2-3 Sep 10, 2022
```{index} single: Python; Handling Errors
```

Errors are problems within a program that stops the program from running further.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"stops" -> "stop"

Is this true? If they are caught in a try-except block, then execution continues?

@jstac
Copy link
Copy Markdown
Contributor

jstac commented Sep 13, 2022

Perhaps we should change the title "OOP I: Introduction to Object Oriented Programming" to "OOP I: Names and Objects"

@jstac
Copy link
Copy Markdown
Contributor

jstac commented Sep 13, 2022

"Every object is bound by its name"

Is this statement true? What about anonymous functions?

How about "Zero, one or many names can be bound to a given object" ?

@jstac
Copy link
Copy Markdown
Contributor

jstac commented Sep 13, 2022

it may be better if we leave the entire structure unchanged, or we can rewrite some of them without reassumed knowledge.

Thanks for the thoughtful recommendation. Let's do as you say. Please see the comments above.

@HumphreyYang HumphreyYang marked this pull request as draft September 14, 2022 10:51
@HumphreyYang HumphreyYang linked an issue Sep 14, 2022 that may be closed by this pull request
3 tasks
@github-actions github-actions bot temporarily deployed to commit September 14, 2022 11:13 Inactive
@github-actions github-actions bot temporarily deployed to commit September 17, 2022 12:54 Inactive
@github-actions github-actions bot temporarily deployed to commit September 17, 2022 13:35 Inactive
@HumphreyYang HumphreyYang marked this pull request as ready for review September 17, 2022 13:38
@github-actions github-actions bot temporarily deployed to commit September 17, 2022 13:47 Inactive
@github-actions github-actions bot temporarily deployed to commit September 17, 2022 14:01 Inactive
@jstac
Copy link
Copy Markdown
Contributor

jstac commented Sep 19, 2022

Thanks @HumphreyYang .

@mmcky , would you mind to help review this PR? Another set of eyes would be very helpful.

PS I can't see an active deployment above --- I might be missing it.

@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented Sep 19, 2022

Thanks @HumphreyYang .

@mmcky , would you mind to help review this PR? Another set of eyes would be very helpful.

PS I can't see an active deployment above --- I might be missing it.

Thanks @HumphreyYang once you have made updates re: @jstac comments above - please tag me as a reviewer and I will do a second round review.

@jstac they seem less obvious these days. You can click on Netlify and Details to see the deployment at the bottom of the GitHub Actions window.

@HumphreyYang HumphreyYang requested a review from mmcky September 20, 2022 00:01
@HumphreyYang
Copy link
Copy Markdown
Member Author

Thanks @HumphreyYang .
@mmcky , would you mind to help review this PR? Another set of eyes would be very helpful.
PS I can't see an active deployment above --- I might be missing it.

Thanks @HumphreyYang once you have made updates re: @jstac comments above - please tag me as a reviewer and I will do a second round review.

@jstac they seem less obvious these days. You can click on Netlify and Details to see the deployment at the bottom of the GitHub Actions window.

Hi @mmcky, I have updated the lecture based on the review, could you please have a look at the current version and check if there are any changes I need to make?

Copy link
Copy Markdown
Contributor

@mmcky mmcky left a comment

Choose a reason for hiding this comment

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

Thanks @HumphreyYang I have added some inline suggestions and changes.

@HumphreyYang HumphreyYang marked this pull request as draft September 21, 2022 05:36
@github-actions github-actions bot temporarily deployed to commit September 21, 2022 08:10 Inactive
@github-actions github-actions bot temporarily deployed to commit September 21, 2022 09:53 Inactive
@HumphreyYang HumphreyYang marked this pull request as ready for review September 21, 2022 09:55
@jstac
Copy link
Copy Markdown
Contributor

jstac commented Sep 21, 2022

Thanks for collaborating @HumphreyYang and @mmcky .

Please ping me directly (put a comment with @jstac) when you are ready for me to review.

@github-actions github-actions bot temporarily deployed to commit September 22, 2022 05:56 Inactive
@github-actions github-actions bot temporarily deployed to commit September 22, 2022 06:07 Inactive
@HumphreyYang HumphreyYang requested a review from mmcky September 22, 2022 06:44
@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented Sep 22, 2022

@jstac I think this is ready for review

If you just want to see the names, you can type

```{code-cell} python3
dir(math)[0:10]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add a comment # show the first 10 names

* They have their own namespace called `__builtins__`.

```{code-cell} python3
dir()[0:10]
Copy link
Copy Markdown
Contributor

@jstac jstac Sep 27, 2022

Choose a reason for hiding this comment

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

please add comment

# show the first 10 names in `__main__`

```

```{code-cell} python3
dir(__builtins__)[0:10]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

# show the first 10 names in `__builtins__`

@jstac
Copy link
Copy Markdown
Contributor

jstac commented Sep 27, 2022

Great work @HumphreyYang !

You've made some really big improvements here. I'm really pleased.

@mmcky , many thanks for the careful review and all those suggestions.

Just some very minor requests above. Also, in the lecture on debugging, could @HumphreyYang please mention that a visual debugger is available in JupyterLab: https://jupyterlab.readthedocs.io/en/stable/user/debugger.html

You might add it as a note, if you like.

(This is the best reason I've seen for switching to Jupyterlab. It seems they have been putting a lot of effort into the debugger.)

@HumphreyYang , could you please add those small comments above, plus the mention of the visual debugger, and then ping @mmcky so he can merge.

@mmcky , let's remember to tell @natashawatkins when this is published so that she can tweet the improvements.

@github-actions github-actions bot temporarily deployed to commit September 28, 2022 01:23 Inactive
@HumphreyYang
Copy link
Copy Markdown
Member Author

Hi @mmcky,

Could you also have a look at the latest deployment here as well, and merge it if it looks good to you?

Many thanks!

@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented Sep 28, 2022

visual debugger is available in JupyterLab: https://jupyterlab.readthedocs.io/en/stable/user/debugger.html

Oh this looks good. @jstac in discussions with Rowan and the Curvenote team -- it looks like the jupyterlab myst extension is coming along nicely. this is another reason I think our switch is pretty imminent. I am starting to use it locally with the single notebook view.

@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented Sep 28, 2022

Thanks @jstac for review and @HumphreyYang for all your work on this. This looks great.

@mmcky mmcky merged commit ba924f5 into main Sep 28, 2022
@mmcky mmcky deleted the restructure-advanced branch September 28, 2022 02:40
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.

Restructuring Advanced Python Programming Section

3 participants