swcarpentry / python-novice-gapminder

Plotting and Programming in Python

Home Page:http://swcarpentry.github.io/python-novice-gapminder/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move some material further up

danaikorre opened this issue · comments

In the second episode I believe that it would be more usefull to have the sections "Python is case-sensitive" and "Use meaningful variable names" right after "Use variables to store values". It would keep all the information and instructions for using and allocating variables in one place before going into printing and slicing.

I agree with doing this, moving case-sensitive stuff up to the top where it is all together and the meaningful variable names too is something I did the last time I taught this lesson (I had a shorter time frame to teach the material and was trying to condense it).

As a boost of encouragement to @dsmanufacturing , @vahtras (and to play devil's advocate), regarding issue #599, for the course at python-novice-gapminder, your point is spot on but the last iteration on gh-pages has an alert element saying "under design". When reading this and lesson design, I am naturally included to be warned that the material may not be "production ready." In the interim, have you looked at https://github.com/swcarpentry/python-novice-inflammation which talks extensively about data types, syntax, etc., especially for those using Python for data science? (I offer my comment as a fellow in computational and molecular biology, with a prior focus on functional genomics, shifting now to epigenetics). Thanks to swcarpentry! Cheers!
Milo

P.S., I will open a side issue about suggestions for NCI data sets that may be more relevant for those using swcarpentry learning tools.

I agree it would be beneficial to extend the 'Use variables to store values' section with the two bullets from 'Python is case sensitive' or just bring that section forward. An argument for merging would be that the starting underscore naming convention is already named in 'Use variables to store values' and the starting capital naming convention is only mentioned in 'Python is case sensitive'.

The example code in the 'Use meaningful variables names' section includes the print function, which is only explained after the first section, bringing it forward as is would thus likely result in confusion. In my opinion it would not detract from this section's intent to remove the print function example. On one hand it is good to remind the students to use meaningful variable names explicitly near the end of this episode, but I assume that in most courses this is one of the aspects that is repeated during the entire course by default.

I agree that it makes send to move 'Python is case sensitive' further up. Personally I would also want include a lot of examples of breaking the variable naming rules, since the error messages can be confusing (one that comes up a lot for my students is the 'Cannot assign to operator' error message from including a - instead of _ in a variable name).

I think placing 'Use meaningful variable names' at the end helps to emphasize this point and separate it from the other naming rules. Since learners won't receive an error message if they break this rule, it is more important that they internalize it. I see a lot of problems with not using meaningful variable names down the road (for example including an incorrect type in the variable name, e.g. temperature_list instead of temperature_df, and then treating a DataFrame like a list), but agree that it is not reasonable to expect students to master this without repetition and experience.