CS61A
-
Unify mathematical notation into function calls, disassemble the interpreter and calculate the whole process of 208; Attached is the course resource and course selection list.
-
Starting from the name, assignment and def, establish the evaluation mental model of "call = new frame + bound formal parameters + executed function body".
-
Separate "return values" from "side effects": pure functions, environments, conditionals, and while loops.
-
Extract repetitive calculation patterns into parameters: from fib iterations, if_ failures, short-circuit evaluation, to summation and make_adder.
-
Frame-by-frame explanation of higher-order function calls, parent frame rules for nested defs, local scoping, lambdas, and currying using environment diagrams.
-
Complete a song in function space: waveforms, superpositions, envelopes and octave transposition.
-
Use the environment diagram to clarify the parent frame rules of closures, and then fall into search, abstract barriers, naming and traceback.
-
Use four real questions to practice "Inferring Interaction Output" and Closure Environment Diagram, and then go through the function implementation process and decorators from description, template to code.
-
Use base cases and recursive cases to define functions, rely on call frames to expand evaluation, and then use a leap of faith to verify correctness.
-
From the calling sequence of cascade to the call tree of fib and exponential repeated calculations, and then dismantling the bipartite recursive decomposition of count_partitions.
-
Unify lists and ranges with sequence abstraction: indexing, splicing, membership testing, for expansions, and deductions.
-
Putting lists, strings, and dictionaries back into the environment graph: box pointers, slicing, aggregate functions, the peculiarities of strings, dictionary keys and comprehensions.
-
Use rational numbers to get through data abstraction: constructors and selectors form a contract, and abstract barriers separate representation and use.
-
Treating trees as data abstractions: Constructors and selectors, the three components of tree recursion, and two aggregation strategies.
-
Learn how objects change over time: aliases, is and ==, variadic traps, and encapsulating state into functions.
-
Use iter/next to turn a container into a position: consume once, lazy evaluation, map/filter/zip, and the deck version of blackjack.
-
Explain the generator using the pause and resume of yield, and compare the benefits of laziness with three ways of writing partitions.
-
Taking data abstraction one step further: class statements, instance construction, properties and methods, and implicit binding of self.
-
Once obj.attr has to go through two stations: instance and class, but attributes are never searched: clarify the three rules of search, assignment and method binding.
-
Use a bank account to explain inheritance clearly: subclasses only write differences, base class attributes rely on search, and multiple inheritance depends on the parsing order to determine who to look at first.
-
Let the object answer "what string should I display as" by itself: division of labor between str and repr, evaluable representation, special methods and operator overloading.
-
Use classes to write linked lists first/rest and tree labels/branches, pair recursive structures with recursive functions, and weigh in-place modifications and new structures.
-
Replacing stopwatches with operation counting: exponential explosion of fib and linearization of memo, notation of five growth orders, and spatial accounting of active environments.
-
Use modules and interfaces to break up large programs: pluggable sorting, similarity and hierarchical dependencies, and finally use linear intersection to speed up the program three times.
-
The tools from the first twenty lectures are packed into a series of small questions: list aliasing and shallow copying, attribute lookup, comprehensions and recursive linked lists.
-
Think of the language model as a scoring function f(context, word), and go through n-gram counting, greedy generation, sampling, neural network training and human feedback alignment in sequence.
-
Lecture 27 · Midterm Examples: A question-by-question analysis of the five midterm questions
CompletedFive mid-term real questions are broken down one by one: the path of the tree, the selection sequence counting and the recursive writing method of k-ary integer decomposition.
-
Lecture 28 · Introduction to Scheme: Prefix expressions, special forms and procedural values
CompletedRelearn evaluation in a fifty-year-old language: prefix expressions, define and special forms, lambda, recursion, and hand-written evaluators.
-
Scheme's lists are linked lists: box needle diagrams of cons/car/cdr and nil, quote letting symbols themselves be values, map/filter/apply and recursively constructing subsets.
-
Writing a calculator interpreter with Scheme syntax: expression trees, calc_eval dispatch, error handling and REPL loops.
-
Lecture 31 · Interpreters: scheme_eval dispatch, frame and environment, eval/apply mutual recursion
CompletedSplit the Scheme interpreter into scheme_eval and scheme_apply: special form dispatch, procedure objects and frame chains, and two scopes.
-
Writing recursion as iteration: evaluation rules for tail position, frame multiplexing, and constant space.
-
Think of programs as lists: bidirectional channels for quote and eval, quasi-reference slots, and letting Scheme write recursive code for you.
-
Use define-macro to add new special forms to Scheme: quasi-reference spelling out code, macro expansion before evaluation, and the demarcation and cost of macros and procedures.
-
From tables, rows, and columns to select's from, where, and order by: declare the desired results and let the database decide how to calculate them.
-
Join multiple tables to check: join semantics of cross products, aliases and dot expressions, self-joins, multi-table joins and numerical/string expressions.
-
Upgrade row-by-row queries to whole table statistics: MIN/MAX/SUM/AVG/COUNT, DISTINCT, GROUP BY and HAVING.
-
Complete the entire database process: CREATE/DROP TABLE, INSERT/UPDATE/DELETE, sqlite3 connections and placeholders, commit placement, and a blackjack demonstration of two connections sharing a database.
-
Two tree questions are used to demonstrate the general process of the final example questions: reading questions, hand calculation, finding hooks, reading templates, tracking, and testing.
-
The whole lesson is concluded with an expression question called seven times: turning expressions into objects, enumerating objects into solutions, and then pulling the lens back to people and society.
-
CS61A Module · Functions and Abstractions: From Expression Evaluation to Environment Models
CompletedBlends Lectures 1–7 into one thread: expression evaluation, def and function objects, control flow, higher-order functions, environment models, and functional abstraction.
-
From function contract to self-referential recursion, to the number of nodes and tree height of the call tree: three lectures look at the trust model and cost model of recursion.
-
Tie Lecture 11–14 into one thread: sequence protocols, container representation, dictionary lookups, data abstraction, and tree recursion.
-
Tie Lecture 15–21 together: mutability brings identity, iterators and generators make execution states into objects, classes and inheritance turn lookups into protocols, and representations connect objects back to the language.
-
Integrate Lecture 22–25 into one line: use objects to combine recursive structures, use growth orders to measure costs, use decomposition to control complexity, and finally synthesize a runnable design case.
-
Integrate Lecture 28–34 into a language-making pipeline: change the syntax to look at evaluation, use linked lists and symbols to represent code, write a minimal interpreter, write the interpreter to be able to interpret Scheme, use tail calls to turn recursion into iteration, and finally let the program generate a program.
-
Four lectures are integrated into one line: declarative query, cross product join, group aggregation, and finally writing to disk and Python.
-
Integrate Lecture 26, 27, 39, and 40 into one line: language models as external tools, operational solutions to mid-term and final questions, and a panoramic view of the course at the end.
No notes with this status yet.
