Today: Last lecture, conclusions, final exam, your future in CS
Final Exam Notes
- Final Exam in special slot, Mon Dec 9th, 9:00-11:00 am (2 hours)
- Study material at final-links.html
- 2 hours, closed note
- Bluebook, Closed-note code-writing, like the midterm
- Studying: like the midterm, study with a blank paper
- Final counts 3x the midterm
- Nick office hours all this week
- Feel free to chat about CS or anything (or email me)
Mon 3:00-4:00
Wed 2:00-4:00
Fri 2:00-4:00
Lots of Need for Programmers
- How many programmers are in there in the US?
Approx 1% of the population works as programmers
For comparison approx 12% of population works in health care
Lots of health care is IMHO a sign of a wealthy society
- Lots of not-done work for lack of programmers
Products
Research
Films, games
Story: I was wearing shorts, t-shirt, and Tevas on a bike, stopped for a red light. The word "Python" appeared on my t-shirt. A passerby in the cross-walk asked if I was looking for work.
There are many problems in the world which are currently unsolved due to lack of programmers. Problems in the for-profit world, problems in the non-profit world, in research, in art ... lots of potential programming areas. There is a scarcity of programmers.
CS106A Message vs. The Movies
- CS department fear - CS is what you see in the movies
Arcane, mysterious, impossible
People err, discount the possibility of CS
- CS106A message:
Many endeavors can use some code ala CS106A
If you enjoy CS106A, think about CS106B, see where it leads
Python - Programmer Efficient, Big
- Python is "programmer efficient"
- You have idea .. express it in Python with minimum hassle
- This makes Python very popular (going to be popular forever)
- Python does not run the fastest (C++, Java)
- Python has a very large number of features
- CS106A teaches the most important, core features
- You are set up to learn other parts of the language you need.
Code Ideas in Python
- Code ideas we've seen in Python
- Storing data
ints, floats, strings, lists, dicts
- Language features:
functions, parameters, strings, loops, if-logic, collections
- Good programming style:
Divide and conquer, decomposition
Testing functions
Readability
Your Second Programming Language
- Java, Javascript, C++ .. have those same elements!
ints, loops, strings, if-statements, ..
- Computer languages are 80% similar to each other
- Different syntax - superficial
- Your second language is surprisingly easy to learn
(you may be skeptical)
- Python has a "light" syntax
other languages have more to type in
- C++ or Java .. easy to pick up
Here is some C++ code
// comments start with 2 slashes
int i = 0; // declare type of var
while (true) { // curly braces
i += 1; // same as py, semicolons
if (i == 100) { // same as py + braces
break;
}
i += "Hello"; // error detected
// int/string types different,
// Error is flagged at edit-time:
// *earlier* than python, an improvement
}
- C++ code looks different
- Actually mostly familiar
- Picking up C++ will be no problem
- Advantage of heavier syntax: more auto error checking
- Also C++ runs much faster than Python
- Disadvantage: more to type in
Possible Next Steps
Most Stanford students take 1 or 2 CS classes and then get on with their lives.
Next "CS106" CS106B
- The next step in CS - mixture of coding and CS
- Could take in Winter or Spring
- Has section leaders
- Many non-CS-majors take this
- More powerful algorithms
- Uses C++ language - don't worry about this
- Recursion (beautiful) .. e.g. solving a maze
A sort of jaw-dropping idea when you get it
- Really understand: hash table (dict), sorting algorithms
- More hands-on use of memory
CS106C
CS for Social good - Survey course on applications of fundamental computer science concepts from CS 106B/X to problems in the social good space (such as health, government, education, and environment). Each week consists of in-class activities designed by student groups, local tech companies, and nonprofits.
explore courses.
Take concurrently with CS106B.
Scientific Python CME 193
- Python and scientific computing
- Applied (vs. CS fundamentals)
- CME193
Think About Section Leading
- Section Leader program - amazing thing at Stanford
- Section leaders are drawn from students who have completed CS106B
Don't need to be a CS major
- Section leaders - like code, like helping people
- Open secret: SLs pick up fantastic skills
debugging, organizing ideas, public speaking, confidence
Map of CS Major
- Programming core sequence:
CS106A, CS106B, CS107, CS110
- CS Mathematical core sequence:
CS103, CS109, CS161 (integer mathematics, probability)
- Then there are more courses in an area of concentration
What is CS Integer Mathematics?
- Integer mathematics (vs. calculus real-number)
- Hash Table (dict) - how is this so fast?
- Integer mathematics - int div and mod (// %)
- Not so much: integrals, differential equations
- Calculus is not the ceiling, it's a branch
- Integer mathematics is its own domain
- Relates to list/string algos we've done
- Personal take:
I was tired of Calculus, but integer mathematics seemed neat and applied
- CS106B shows a little integer mathematics
CS Major Tracks / Concentrations
- After the core...
- Undergraduate CS concentration areas:
Artificial Intelligence (AI)
Human Computer Interaction (HCI)
Systems
Graphics
Biocomputation, (others)
- Choose a concentration, take advanced courses in that area
- HCI - call this one out, since most don't realize this field exists (below)
- CS Minor is a good deal
up through CS107 and CS109 + 2 electives
this gives a strong CS background
Minor is a better idea than double-major
Human Computer Interaction - HCI Design
- Human Computer Interaction Design
- You can do an undergrad or grad emphasis in HCI
- In CS, but concentrate on design instead of coding
- More info: CS147 intro HCI
- aka "interaction design" - design manager
- Demo Image search: push pull handle HCI
- https://99percentinvisible.org/article/norman-doors-dont-know-whether-push-pull-blame-design/
- The appearance communicates to the subconscious
- Great design works without the user thinking!
(analogy: film making to create an emotion in the audience)
- Mostly we notice how terrible HCI is in the world
You click a control, and are surprised by what happens
- Open Question: what is the greater drag on human potential on earth:
Missing software, not coded up yet
Software with bad HCI design
Symbolic Systems Major
A sibling to the CS major - similar intellectual domains but less focus on coding
An interdisciplinary major that uses the lenses of CS, Philosophy, Psychology and Linguistics to study systems that use symbols to represent information. As a symsys major, you can focus your studies in AI, Neuroscience, Natural Language, Philosophical Foundations or even design your own concentration.
Brahm is a Symsys major!
Big Data - Machine Learning
- Two hot areas
- Big Data
- Machine Learning
- See these in our assignments
"Mimic" Project - Modeling
- Mimic program
- Look at lots of text
- Crunch it down into a dict/list structure
- That's a "model" of the data
- Like an in-memory summary of the input
- Then use the model for ... generating random text
- Could use the model for other purposes, e.g. recognition
Modeling - Self Driving Car
- I'm a self-driving-car optimist .. it's going to happen
- Side fact: number of Americans killed in auto accidents per year: 37,000
Used to be over 50,000 on a smaller population, seat belts were a big help
Seat-belts are an example of a real quantitate policy improvement
The auto market was not getting there on its own
- Self driving car:
- Input: cameras, laser-range finder
- Model: 3-d model of objects around the car
- Object recognition: what's a person, what's a tree, what's bicycle
- How might those objects behave
- Self driving car: build model, use it to drive
- An extremely hard problem to do accurately
- This is totally going to happen IMHO
- Funny story: difficult case is bike on rack on back of car .. looks like bike crossing the lane!
A difficult, rare case that needs to work right too
Where is the Magic in CS?
Computer programs are so powerful, such neat output, we think the computer is magical. That's only half right.
- CS106A day 1: computer is not intelligent, no insight
- Then 10 weeks: you solve many Python problems
- Today .. complete the story
- e.g. Ghost algorithm
- 1. Have algorithm idea about colors
- 2. Express the idea as code
- 3. Computer: run loops, lists, numbers ..
- What does Python know?
- Python code knows nothing
- Python is mechanical, does what it's told
lists, ints, indexes, +, <
No insight
Where is the Insight? The Power?
- It's you
- Insight about a problem to solve in the world
- Idea for an algorithm
- Idea for how carve up some data
- Idea for art expression
- Python is just your instrument
- To get the computer to follow your idea
- Go get em!