geoscripting-wur / intro2linux Goto Github PK
View Code? Open in Web Editor NEWIntroduction to Linux and using the terminal
Home Page: https://geoscripting-wur.github.io/Intro2Linux/
Introduction to Linux and using the terminal
Home Page: https://geoscripting-wur.github.io/Intro2Linux/
Right now the way the exercise is worded is rather trivial, which does not allow for good differentiation of students for scoring. (Especially silly is the bonus challenge, the answer to which is given on the very next line...)
The bonus challenge should become a part of the regular task, the students should be told to keep to the project structure, and to have the script download the file. Also important is that they make good use of Bash variables.
For the bonus challenge, they could implement a way for the user to give the input and output filenames (ideally using arguments and allowing for URLs), clean temporary files and have the script run correctly when run several times. A real bonus challenge would be to have the script never create temporary files to begin with: this would require the use of (named) pipes and would allow changing pixel size and reprojecting on a single line.
Students are confused about relative and absolute paths.
perhaps it would be clearer to explain path expansion in Linux, e.g.
. = current directory
~ = home directory
From Yneke:
o Should these be their already/prepared or should the students make them theirself?
o Add a question about how to implement wildcards
o Convert a couple of examples into a small exercise
o Just before question 5 a small script “variables.sh” is created where the gender of the user is asked. Perhaps we could include ‘nonbinary’ or ‘other’ as a third suggestion (to become more inclusive)
The lack of IDE confused a lot of people; they missed the fact that they should use gedit/RStudio for writing scripts. It seemed very clear to them once it was explained that the terminal is equivalent to the bottom pane of RStudio and the text editor is equivalent to the top pane.
It is often times confusing for those who are starting with it to grasp the differences between different components in a Linux system, as in Windows it is usually extremely opaque. Here a lot of terms are introduced, and thus an overview of them would be useful in my opinion.
In particular, I'm thinking of making a graph that differentiates OSGeo Live, Lubuntu, Ubuntu, the Linux kernel, and some of the core internals discussed in the lesson (desktop environment, X11 server, terminal emulator, bash).
Paragraph Using the GDAL library from the terminal;
fn=$(ls *.tif) can give a list of files to the variable fn if there are multiple .tif files in the given folder.
Which could give problems executing the gdal scripts as it expects to have only one file.
Either describe that you can only have one tif file in the folder or run a warning if there are multiple (and use the first file).
A few more notes:
ls -l
etc. before they get to the section about finding help. Either we can move the help section higher, or add an extra note to run man ls
as an explanation (I think it started off as something the students can try and find out by looking at the output, but the man page is very clear about it).python
, but without Mamba, it's actually available only as python3
.A student was confused because the tutorial states "Let’s download a file from the intro to raster lesson: Download the gewata.zip file from Github and unzip in the data directory.", and leaves it unclear whether a data directory has to be made by the group itself or it is created automatically.
Please make this more clear in future iterations.
The example script given in the tutorial does not follow our guidelines for good scripts, and we shouldn't be showing bad examples. So it should be updated so that it does follow the guidelines and the project structure, while still not giving away how to do the exercise.
Students still have a poor grasp of relative vs absolute file paths at this point. It might be worth dedicating a section to explain that concept.
The bonus challenge seems to work well for the purpose: it keeps real good students busy. Not many people figured out how to do it without help, but those who did thought it was rad, and this differentiates the really experienced scripters from the rest really well.
The next lesson, RProjectManagement, includes a nice section about where to find help when one is stuck with a programming task. I believe that would also be useful in the Linux lesson. The two overlap a bit (first step is usually to use a search engine in either case), but also have some differences.
In particular, distributions usually have wikis where most common issues are described. Otherwise, usual support channels are distribution IRC channels (most often simple questions are very quickly answered there, and there are convenient web interfaces to IRC) and distribution forums (for more complex questions). Ubuntu also has a Stack Exchange-like Q&A board called Ask Ubuntu. In some cases there are also mailing lists (albeit nowadays it's mostly relegated to talks between developers rather than users).
Another thing worth mentioning is what to do when one finds a bug: where and how to report it (also the importance of reporting bugs, so it gets fixed for everyone). In those cases the biggest challenge is to identify the piece of software the problem is in (can be tricky for those coming from Windows, since it's also all very monolithic unlike Linux), and whether it has already been reported. The distribution's bug tracker is usually the best starting point, the bug managers there usually redirect one to other bug trackers if the issue is not distribution-specific. Asking about where to file it on IRC is also a good option.
Perhaps it's also useful to note down and clarify the meaning of terms "upstream" and "downstream" somewhere, as it's relevant to both bugs and software projects on git in general.
I suppose this would be most clear in a paragraph, although a graph (perhaps also combining how to search for help in R projects as per the next lesson) might also be useful as an addition.
Since there is one PC per pair, most bring their own laptops; some expressed interest in knowing how to actually install OSGeoLive or such on their laptops so they can use the same environment. Some notes on that would be useful to add.
Some points on Bash that came up:
/bin/bash^M
is due to line endings, scripts copied from Windows do not run as-is on Linux and vice versa=
sign#
means a commentecho
prints things in the console, but can also be used in creative ways with file creation etc.wget
and curl
, unzip
$@
, $1
, $2
, ...cd
, use relative file paths (that's apparently a difficult concept for some, also in R), ..
means "up one"Some points that are not in the tutorial but came up and would be good to mention:
Line 1325: The referenced page is unavailable.
Line 1325 in d069ac2
When I look at the knit version (http://geoscripting-wur.github.io/Intro2Linux/), there are captions under images, which look like regular text. Originally the captions were not printed (they are supposed to be alt text, not printed under it).
Also, the image quality seems rather poor compared to the original.
I take it knitr has some options for that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.