Introduction to Computing Fall 2015     Syllabus

1. Welcome to Computing

Resources

Installing a Linux Virtual Machine (VM)

If you have Linux running on your laptop you don't need to follow this step. You are already a pro. Otherwise follow these instructions. They are for Windows, but should work similarly on the Mac. If you are using Mac you can also take a look at these instructions.

You can then make your way to the command line, where the real fun begins.

Navigating the command line

Here are a number of useful links:

More advanced tutorials

These might be overkill to start with, but we list them here as references you may want to check out later.

Install python

There are Ubuntu-specific instructions provided in this form answer. You will get a lot of your most useful information from forum answers like this one. Follow these instructions up to make && sudo make install

You can then use pip, which comes with Python to install IPython, an interactive environment you can use for playing around (pip install "ipython[notebook]"). You can then play around with the awesome ipython notebook computational environment. We also have a public server. Don't keep any files on the public server though, it will periodically be purged.

Homework

These are exercises to be finished by next week's class. Please submit homework to Valentin as a pdf, using proper English, and proper formatting of code blocks. You are encouraged to write your responses in Markdown a mini-language that allows for easy conversion of plain text to HTML with proper code highlighting. It is super-useful (the content of this site is written in Markdown). For writing in Markdown (and also for general programming) we recommend the excellent Atom editor, which has installable packages that can convert Markdown to a variety of other formats, such such pdf (e.g., markdown-pdf, which is installable via Preferences -> Install). Of course, there are numerous other tools.

Due date

The homework is due on Thursday 24th of September at 7:30am. Please hand it to Valentin via e-mail, slack or in person till then.

  1. These are the most important linux commands you should know for sure. Describe what each one does in your own words

    • ls
    • cd
    • mkdir
    • cp
    • rm
    • ln
    • cat
    • man
    • less
  2. Which shortcuts refer to (a) the current directory (b) to the directory above the current one (c) the home folder?

  3. What is the difference between a folder and a directory?

  4. How do you remove an empty directory? What if it is not empty? Give examples.

  5. How would you find out more about a command? (List three options)

  6. What are links? How might they be useful?

  7. How would you differentiate a directory from an ordinary file on the command line. How about a link?

  8. Let's say you are working in one directory in your filesystem (e.g., /usr/local/dir1/dir2/xyzdir345), then switch to another one (cd /usr/local/foo). Now you want to go back to the previous directory, but don't want to type out the full path name. How can you do it quickly?

  9. Create two directories (let's call them A and B). Go into A and create a (soft-)link to B. Go into that link. Where are you now? Go back to the original directory and delete B. What happend to the link in A?

  10. Can you describe the difference between a hard-link and a soft-link? Compare your result from 9. with creating a hard-link to a normal file and deleting the original.

  11. What are pipes and how are they useful? Give a couple of examples using the commands in Question 1.

  12. Execute the command dmesg (if you are using Mac OSX and not Linux you might have to use sudo dmesg). How would you see only the last 50 lines. How about the first 50 lines? How would you save the output as a file? How would you search the output for a keyword? Since the command is creating a lot of output is there a way to read the output at your own pace?

  13. Why do you think using the command line might be useful? What surprised you?

Class communication

Please use Slack rather than email for class communication. You can use it to discuss problems amongst your classmates or to contact the instructors (using @sasha or @valentin to bring questions to our specific attention). We'll make channels for each of the lessons, and you can use them for discussion. You can sign up for the course Slack team using your oist.jp email account at here.