Your computer & you: a primer on command-line interfaces & IDEs
Python for Psychologists - Winter term 2022
Peer Herholz (he/him)
Research affiliate - NeuroDataScience-ORIGAMI lab at MNI, MIT, McGill & BRAMS
Member - BIDS, ReproNim, Brainhack, UNIQUE, CNeuroMod
@peerherholz
28/10/2022
Michael Ernst
Phd student - Neurocognitive Psychology at Goethe University Frankfurt
M-earnest
Recap of the last session
Your expectations for this session
What are your expectations for this session?
https://i.imgflip.com/2w2rmv.jpg
Objectives for this session
https://media.makeameme.org/created/look-at-the-25f4b725ed.jpg
Outline for this session
CLI/programming?
https://twitter.com/OfficeMemes_/status/1298982572848869380/photo/1
GUI vs. CLI - interacting with machines
User (you)
- input -
machine
- data processing -
result(s)
- output -
Nature
GUI vs. CLI - an example
https://giphy.com/gifs/colbertlateshow-stephen-colbert-surprise-late-show-l0HlO3BJ8LALPW4sE
We will dive right in!
Everyone gets 5 min to do the following:
“addams_family/pugsley”
“addams_family/gomez”
“addams_family/fester”
GUI vs. CLI - the frustration
https://giphy.com/gifs/computer-ron-swanson-parks-and-recreation-ktcUyw6mBlMVa
These tasks are anything but fun...now imagine you have to do this for hundreds of data samples/task/etc. … isn’t there a different way that is more feasible, faster, less prone to errors?
Well, say no more!
GUI vs. CLI - the old question: why programming?
https://giphy.com/gifs/the-simpsons-computer-confused-citBl9yPwnUOs
https://giphy.com/gifs/error-WhFfFPCEDXpBe
vs.
GUI vs. CLI - the old question: why programming?
GUI vs. CLI - the old question: why programming?
interaction
mouse/keyboard
application windows
keyboard
response in CL
ease of use
(mostly) easy across levels of expertise
easy if experienced
memory
high memory usage due to rendering, etc.
low memory usage given directness
precision
low
high
speed
low
high
vs.
GUI vs. CLI - the old question: why programming?
advantages
easier for beginners
ok for simple one-time tasks
more control
faster/more efficient
complex & repetitive task
reproducibility (if done right)
scripting/programming
stability
disadvantages
vs.
limited capacities
slow/less efficient
not reproducible
cumbersome to perform complex/repetitive tasks
(steep) learning curve
Outline for this session
CLI/programming?
https://twitter.com/OfficeMemes_/status/1298982572848869380/photo/1
How & where to use CLI/programming? - shell
By Emx - Wikimedia Foundation, GPL, https://commons.wikimedia.org/w/index.php?curid=509725
Von Chealer - Eigenes Werk, GPL, https://commons.wikimedia.org/w/index.php?curid=2945062
https://www.fullstackpython.com/img/logos/zsh.jpg
http://www.kornshell.com/kornshell.gif
…...
How & where to use CLI/programming? - jupyter notebooks
How & where to use CLI/programming? - jupyter notebooks
How & where to use CLI/programming? - Integrated development environment
Microsoft, Public domain, via Wikimedia Commons
BY Serogen (Diskussion) - Own work, MIT, https://commons.wikimedia.org/w/index.php?curid=95805188
Visual Studio Code
Recap for this session
Were your expectations for this session fulfilled?
Questions you could/should ask based on this session
Are there cases where GUI based point-and-click is sufficient?
How can I incorporate the different tools into my research workflow?
When should shell, jupyter notebooks/lab or IDEs be utilized?
Can different tools be combined across/within workflows?
https://giphy.com/gifs/season-17-the-simpsons-17x6-xT5LMB2WiOdjpB7K4o