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