Week 1

Homework

Using Github

We don't need Github for the current assignment, but if your compciv repo was set up correctly, you should be able to take the following steps.

  1. Log into corn.stanford.edu
  2. "Clone" the repo, i.e. download it, from Github into your home directory

     git clone git@github.com:YOUR_GITHUB_USERNAME/compciv.git
    

Some tips

Remember the story of Pixar and Toy Story 2:

When in doubt, hit Ctrl-C

It's easy to forget the exact syntax of the commands. For example, this is correct:

  grep "some text" file.txt

And this is technically correct:

  grep "some text"

…except that it'll seem as if the program has just halted. It's actually waiting for your input, since you didn't tell it what file to search. In cases like these, when hitting Enter doesn't bring you to the prompt, hitting Ctrl-C will break out of whatever construct you've gotten yourself into unintentionally.

Keyboard shortcuts

As you use the command-line more often, you'll want to get figure out faster ways to get around. The ones I use the most are:

There's more shortcuts and power-tools here, via Sam Rowe.

Class logistics (Jan. 7, 2015)

If you were having trouble with the setup-prep assignment, please email me or talk to me after class and we'll get it fixed up.

The assignment for Monday is collecting the list of White House Press Briefings.

Class logistics (Jan. 5, 2015)

On Wednesday, I'll focus on showing more of the details and mechanics of working with data from the command line and general programming concepts. To prepare:

If this is all new to you, I don't expect you to "get" it on your first read-through. Or even by next week. But I want you to be familiar with it, so that it becomes less and less intimidating with each lesson.