Closed GBruening closed 4 years ago
Nothing against Gary's code, but I'd put money on attendees encounting system compatibility issues when they try to execute these Python scripts. That's the most common issue I've dealt with teaching high school and college CS classes. I could refactor Gary's code to be cross compatible with Python versions 2 and 3, and doesn't depend on third-party packages that the user has to remember to install. Then attendees could do this whole tutorial with the Python version that shipped with their Macbook.
We specifically say use the anaconda distribution of python. That should remove all the compatibility issues if they get the latest version of anaconda.
Do you know which functions won't work with python 2.7?
Regarding this PR, issue #9, and issue #22, I think we should hold off on python/R scripts until we at least get some survey results back (setting 26th-ish cutoff). It may just be an enhancement and not a priority. When we cross this bridge, I think ease of download (full anaconda vs miniconda vs just the python that comes with your machine) and compatibility should be prioritized. The focus of this tutorial is version control, and the simplest examples could be typos in *.txt files; no need to get carried away just yet.
So the point of the first scripts is that the DON"T run. The base scripts we give them are supposed to have errors in them. The whole point of the first breakout session is to debug these 5 scripts, and push the commits. The errors are supposed to be super simple.
While the main script is probably the more 'correct' way, depending on how familiar they are with python steve's method (while better) is also harder to read for new people maybe?
I mean even your solution doesn't compile without errors.
Is there a bug list? I'm re-introducing intentional errors now.
Look at the Matlab scripts and try to make the bugs the same. I'll try to list them in a sec
Script 1 - I think it was color = 'orange' should error out, just need to put in the RGB value Script 2 - SHould be .'cvs' file, they'll change to '.csv' Script 3 - The '= -999' will be changed to '== 999' Script 4 - The bug is that the axis should be flipped. This hsouldn't error, but will plot incorrectly. Script 5 - The datetime should be month, and they'll change it to year.
All that sounds fine to me. Those Python scripts include a hashbang #!
that specifies their executable, so you don't actually need to preface each command with python
. But if users do, it will still work. So it's all good.
Ok, I'm gonna merge now. 🤞
I saw the #!
, but couldn't get it working without the explicit python
in win10 anaconda powershell. On my mac I got it working without 'python' after troubleshooting some permission denied
errors.
Did a few things