Today: Last lecture, conclusions, final exam, your future in CS
First: Big thanks to Brahm and our section leaders - only with their hard work and dedication can a course like this work.
Final Exam Notes
- Final Exam in special CS time slot, Mon 3/16 9:30-11:30 am
- Corona virus: can take remotely, but at our regular time, open-note
Lots of info on course page
- Studying: like the midterm, study with a blank paper
- Final counts 3x the midterm
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 not-done work for lack of programmers
Products
Research
Films, games
- In other words, there is a programmer shortage
Story: I was on a bicycle, wearing shorts and a t-shirt stopped for a red light. The word "Python" appeared on my t-shirt. A passerby in the cross-walk stopped and asked if I was looking for work.
CS106A and You
- Now you've seen a lot of coding
- Even if you never write another line of Python
- Understand role of programmer and code
- Not intimidated that the computer is some incomprehensible magic box
- Or maybe you like coding, want to try more classes (below)
Key Ideas We've Seen 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
- Other languages: C++, Javascript .. 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
- Coding is a bit harder and more impressive
- Could take in Spring or next Fall
- 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
Scientific Python CME 193
- Python and scientific computing
- Applied (vs. CS fundamentals)
- CME193
CS106E
- Tour of computing ideas
- Not focussed on programming like CS106A
- See CS106E
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
CS Major Tracks / Concentrations
- If interested in majoring in CS
- 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
- What if you don't want to write code all the time?
- An unexpected part of CS
- Human Computer Interaction Design
- You can do an undergrad or grad emphasis in HCI
- More info: CS147 intro HCI
- aka "interaction design" - design manager
- Demo Image search: push pull handle HCI
- Door Push-Pull Handle
- 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 HCI is in the world when it is done badly
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?
- The computer seems magic
- Such neat output
- But where is the magic?
CS106A - 10 Weeks
- 10 weeks: you solve many Python problems
- 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
Where is the Insight? The Power?
Where is the power in this story?
- You are the power in this story
- You have an insight about a problem to solve in the world
- You have an idea for an algorithm
- Python is just your instrument
- Get the computer to follow your idea
- From all of us at CS106A
- You take care!