Tips for navigating the slides:
- Press O or Escape for overview mode.
- Visit this link for a nice printable version
- Press the copy icon on the upper right of code blocks to copy the code
Imperative programming: using statements to change a program's state.
nums = [1, 2, 4]
for i in range(0, len(nums)):
nums[i] = nums[i] ** 2
Functional programming: expressions, not statements; no side-effects;
use of higher-order functions.
list(map(lambda x: x ** 2, [1, 2, 4]))
(map (lambda (n) (expt n 2)) '(1 2 4))
Programming paradigms #2
Object-oriented and data-centric programming.
innocent_bee = Bee(5)
horrible_ant = Ant(10)
(list (tree 1 nil)
(tree 2 (list (tree 1 nil) (tree 1 nil))))))
(map label (branches t))
State goals or properties of the solution rather than procedures.
calc_op: "(" OPERATOR calc_expr* ")"
- Data storage:
- Primitive/simple types: booleans, numbers, strings
- Compound types: lists, linked lists, trees
- Environments: rules for how programs access and modify named objects
- Higher-order functions: Functions as data values, functions on functions
- Recursion: approaching a problem recursively, general recursive patterns
- Mutability: mutable objects, mutation operations, dangers of mutation
- Exceptions: Dealing with errors
- Efficiency: Different programs have different time/space needs
- Abstractions, separation of concerns
- Specification of a program vs. its implementation
- Syntactic spec (header) vs. semantic spec (docstring).
- Example of multiple implementations for the same abstract behavior
- Testing: for every program, there is a test.
Remember: code isn't just read by computers, it's also read by humans.
- Programming puzzles (HackerRank, LeetCode, Euler)
- Programming contests (Advent of Code, Kaggle)
- More paradigms and languages (Web dev, Embedded)
- The open-source world: Go out and build something!
- Personal projects
- Above all: Have fun!
Future CS courses
- CS61B: (conventional) data structures, statically typed production languages.
- CS61C: computing architecture and hardware as programmers see it.
- CS70: Discrete Math and Probablilty Theory.
- CSC100: Data Science
- CS170, CS171, CS172, CS174: “Theory”—analysis and construction
of algorithms, cryptography, computability, complexity, combinatorics,
use of probabilistic algorithms and analysis.
- CS161: Security
- CS162: Operating systems.
- CS164: Implementation of programming languages
- CS168: Introduction to the Internet
- CS160, CS169: User interfaces, software engineering
- CS176: Computational Biology
Future CS courses #2
- CS182, CS188, CS189: Neural networks, Artificial intelligence, Machine Learning
- CS184: Graphics
- CS186: Databases
- CS191: Quantum Computing
- CS195: Social Implications of Computing
- EECS 16A, 16B: Designing Information Systems and Devices
- EECS 126: Probabilty and Random Processes
- EECS149: Embedded Systems
- EECS 151: Digital Design
- CS194: Special topics. (E.g.) computational photography and image
manipulation, cryptography, cyberwar.
- Plus graduate courses on these subjects and more.
- And please don't forget CS199 and research projects.
Plus EE courses...
- EE105: Microelectronic Devices and Circuits.
- EE106: Robotics
- EE118, EE134: Optical Engineering, Photovotalaic Devices.
- EE120: Signals and Systems.
- EE123: Digital Signal Processing.
- EE126: Probability and Random Processes.
- EE130: Integrated Circuit Devices.
- EE137A: Power Circuits.
- EE140: Linear Integrated Circuits (analog circuits, amplifiers).
- EE142: Integrated Circuits for Communication.
- EE143: Microfabrication Technology.
- EE147: Micromechanical Systems (MEMS).
- EE192: Mechatronic Design.
What can you do with Python?
Almost anything! Thanks to libraries!
- Webapp backends (Flask, Django)
- Web scraping (BeautifulSoup)
- Natural Language Processing (NLTK)
- Data analysis (Numpy, Pandas, Matplotlib)
- Machine Learning (FastAi, PyTorch, Keras)
- Scientific computing (SciPy)
- Games (Pygame)
- Procedural generation - L Systems, Noise, Markov
Natural Language Processing
NLP includes language modeling, spelling correction, text classification, sentiment analysis,
information retrieval, relation extraction, recommendation systems, translation question answering, word vectors,
👉🏽 Demo: Sentence trees!
NLTK Sentiment Analysis,
Dan Jurafsky's lectures and books,
Berkeley classes: INFO 159, CS 288
What do you want to do?
There are so many possible programs that haven't been made yet.
What will you make?