neuroinformatics-unit / course-software-good-practice

Slides for NIU collaborative coding and software development good practices
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Make slides for October 2024 course #20

Open alessandrofelder opened 2 weeks ago

alessandrofelder commented 2 weeks ago

Goal

Update the slides for this year's courses

Constraints

We only have 1.5 hours, so we need to reduce the amount of content, and maybe move some of it to homework.

alessandrofelder commented 2 weeks ago

Suggested implementation plan:

I am suggesting this because:

The downside:

What do you think @lauraporta ?

lauraporta commented 1 week ago

Thanks @alessandrofelder for writing these notes. One hour and a half is not much to go through this material. I see that the suggested implementation goes through:

  1. how can I work best with my own custom software
  2. how can I collaborate to other open source projects

These two might be for an audience with different skillsets, as point 2 expects people to already be able to follow good software practices (at least that's how I see it). Also, by briefly introducing the files in the cookiecutter, I am scared that we are trying to cover too much in a short time.

I advocate to focus only on point 1 and expand on what we covered last time either by talking about tests and/or writing documentation. I am saying this because the cookiecutter creates templates for many objects that are cryptic to a new user and the course could feel more complete if we end up filling in the folders tests/ and docs/. Do you think that the coding time will slow down the course a lot?

I can see that the contribution to a real life project adds a lot of value... Maybe we can do a short non-interactive demo as you suggested.

It will be more hands on and will retain different sections of the material of last year... What do you think?

alessandrofelder commented 1 week ago

Yea, I think that's fair... I am worried that just showing: "Oh look in this folder, you can write some tests for your software" is not useful either, unless we also talk about what to test, how to test, etc...

Do you think that the coding time will slow down the course a lot?

Not sure. Depends how energetic the students are: it is day four of the computational course, 4pm-5:30pm and they will just have absorbed the confusing interface of git, possibly for the first time. So it may all be a bit much?

lauraporta commented 1 week ago

Please remind me... are they being introduced to git by Steve just before? One option is to translate what they learnt with git to the GitHub interface. Although that's not much... What if instead of introducing directly the tools we do a guided open discussion? We can pose problems and talk though together on how frequent issues can be solved in the best way, in order to make the necessities of certain tools self evident and possibly trigger their own self-learn journey. Is this an utopia?

alessandrofelder commented 1 week ago

are they being introduced to git by Steve just before?

yes, git and Github (according to Steve's slides from last year), so we can build on that. schedule and link to slides from last year are online

alessandrofelder commented 1 week ago

we do a guided open discussion?

It's an option. Again, I am a bit wary of

How we strike this balance is the question we'd want to answer in this issue, I think.

alessandrofelder commented 1 week ago

I think we ~have a choice between

lauraporta commented 1 week ago

I am persuaded, ok!

alessandrofelder commented 1 week ago

Laura suggests, as part of "go deep into e.g. packaging and code organisation" to describe it as a journey of growth, of the package.

  1. you have your analysis script, and you notice some repetition -> you make something a function
  2. you get a new project, and notice that that want to re-use that function in a different folder -> you structure as a package, and pip install -e .[dev]
  3. Your friends want to use it too -> they clone your repo and also pip install -e .[dev] (and contribute)
  4. The whole world wants to use it -> you publish your package on PyPI

(depending on time, just mention these things as part of a final discussion)

  1. Lots of research depends on your function, and you start getting a lot of questions about it -> you start documenting it
  2. People start submitting bug reports, and you are constantly changing your code: how do you make sure the bugs don't appear again? -> you write some tests
alessandrofelder commented 1 week ago

Plan for slides we discussed (please correct/complete @lauraporta )

adamltyson commented 1 week ago

The journey/story idea is very nice. It might be good to also frame testing around reproducibility, catching errors before publication etc (some people may not care about external bug reports).