Giter Site home page Giter Site logo

intro2linux's People

Contributors

elikreuz avatar greatemerald avatar janverbesselt avatar johanez avatar mvansluijs avatar steefdam avatar

Stargazers

 avatar

Watchers

 avatar

intro2linux's Issues

Potential improvements to the exercise

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.

Include section about path expansions

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

Minor additions

From Yneke:

  • Question: I could not find the /etc directory and the text files in the systems

o Should these be their already/prepared or should the students make them theirself?

  • Suggestion:

o Add a question about how to implement wildcards

o Convert a couple of examples into a small exercise

  • Suggestion:

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)

Clarify how to write shell scripts

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.

Graph about Linux system interrelations

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).

Multiple .tif files in folder

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).

More additions

A few more notes:

  • It's not clear how to answer the question about the difference between 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 interpreter is called python, but without Mamba, it's actually available only as python3.
  • It is not clear that the hello world script is a script that should be copied and pasted into a file, rather than run from the terminal. Same goes for the big GDAL script, some students ended up just pasting the whole thing to the terminal.

Confusion caused by exercise description

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.

Improve example script

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.

Section on where to find help

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.

Add notes on installing Linux on laptops

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.

Additional notes on Bash

Some points on Bash that came up:

  • Make it more clear what the shebang line means
    • Point out that an error about interpreter /bin/bash^M is due to line endings, scripts copied from Windows do not run as-is on Linux and vice versa
  • Variable assignments in Bash must not have spaces on either sides of the = sign
  • Some useful points for the assignment:
    • # means a comment
    • echo prints things in the console, but can also be used in creative ways with file creation etc.
    • wget and curl, unzip
    • Script arguments: $@, $1, $2, ...
    • Pipes can be used to avoid temporary files
    • Avoid cd, use relative file paths (that's apparently a difficult concept for some, also in R), .. means "up one"

Additional notes to add to the VM tutorial

Some points that are not in the tutorial but came up and would be good to mention:

  • Git GUI on Linux doesn't come with a .desktop file by default, so it's not in the menu and needs to be run from the terminal
    • How to install Git GUI on macOS?
  • File sharing is completely optional, can be done at the end of the tutorial if at all; using git is better anyway
    • NFS client does not exist in Windows 10 any more
  • Making the image persistent is important in order to not have to regenerate git keys every time (not everyone has done so)
  • Properly shutting down the VM is important: first power off, then delete, with enough time in between and never delete twice; else disks are stuck in an error state and have to be disabled and reenabled
  • RStudio on VMs tends to be a bit unstable

Outdated link

Line 1325: The referenced page is unavailable.

If you are ready and want the learn more about using GDAL from the terminal, see <a href="http://wiki.americaview.org/display/miview/Introduction+to+GDAL">here</a> for another tutorial.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.