JuliaHEP / JuliaHEP-2023

Materials for the JuliaHEP 2023 Workshop
https://juliahep.github.io/JuliaHEP-2023/
Creative Commons Attribution 4.0 International
4 stars 4 forks source link

Reduce distraction in tutorial #12

Closed Moelf closed 10 months ago

Moelf commented 10 months ago

My past experience giving Julia tutorials to physicists suggests that you may want to reduce the type of content that would beg the "Why" type of questions.

For example:

It's distraction in the sense that it divert physicists focus -- they don't know if it's just random facts/quirks about Julia or actually critical to understanding the code, because they are not familiar with typical Julia code base yet.

I think we should focus on most idiomatic patterns in Julia, and the most important big pictures. Different syntax and construct can be explained on the fly later when they run into them.

aoanla commented 10 months ago

Sure - I think for the binary operators, it's probably most worth noting the "ones that are surprising" [so, definitely mentioning that ^ is exponentation, and probably calling out a few "Unicode"/LaTeX markup operators (like xor, also because it's what ^ is used for in C, C++ etc).

For the functions, I'm torn - obviously, anonymous functions are important. "one-line" function definitions are probably less so - there's not a lot of functions you can fit on one line, after all. (I do think our "example function" could just start with a docstring added, and we could merge my "documenting functions" bit into the first "how to function" part.)