Lab 2

  1. Agenda
    1. Get SCF accounts set up
    2. re-emphasize some stuff from the past couple weeks
      1. quiz
      2. reading1
    3. Mention more git basics we never explicitly covered
      1. merging (esp. merge conflicts)
      2. branches
    4. More python intro
      1. Get up to flow control in lecture notes before Tuesday
  2. SCF account forms
    1. http://scf.berkeley.edu/cgi-bin/ingrid.cgi
    2. Distribute forms
    3. log in to server
      1. $ ssh @.berkeley.edu
      2. acct_name is on the form
      3. change password and enter required info
    4. sign and collect forms
  3. Quiz 1 results
    1. Go question by questions
      1. go over results spreadsheet (names are blacked-out)
    2. man | grep
    3. apropos
  4. Assignment submission notes
    1. I will be crontab-ing my pulls of your work directories, so from here on out the deadlines will be strictly enforced
      1. If you submit something at 9:01 PM, I will not see it
  5. Reading 1 results
    1. Must include your take - a summary is not enough
    2. Formatting issues
      1. No name (ruins blind functionality), no title/author/header (wastes words)
      2. 80 char limit
        1. limitations of fold
        2. .vimrc colorcolumn option
      3. Run through grading script to show how formatting issues show up in grader
    3. Some insights
      1. Optimization
        1. The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; ****premature optimization is the root of all evil*** (or at least most of it) in programming”*. –Donald Knuth, Turing Award acceptance speech
      2. Paralysis by analysis - There are so many tools and so much info, how do you know what you should be doing, and when
        1. Don’t be afraid to just try things (git should make you braver)
        2. Collaboration is your friend
        3. Incorporate info in small, but constant chunks
      3. You can overdo it with the comments
        1. One school of thought even pushes for code that’s so self-descriptive, comments are unnecessary
      4. Myth: People with CS backgrounds are uninterested in other fields
        1. It is important for people in their fields to know the basics of CS so that interesting ideas and concepts can be effectively communicated to people with stronger CS backgrounds
  6. More git basics
    1. Who’s been burned by git yet?
      1. commit early and often
      2. beware commands where you can truly lose work
        1. reset –hard
        2. checkout –
    2. branching, merging (esp. merge conflicts)
    3. In-class demo: hello-world + branching example
    4. Interactive demo: pow function - merge conflict over github
  7. Follow intro python lecture notes up to control-flow and do exercises in groups.