code


sort by: Relevancy | Title try advanced search for more options

  1. Students give feedback about what problems they are having with machine code. Most problematic topic seems frames. Richard revises: what *is* a frame? how is a frame used? roles of the calling function and the called function. what is the return address and how is it used? what is the frame pointer and how is it used?

  2. Backtracking Pseudocode, Sudoku Solver, Sudoku Code, Cryptarithmetic, Dumb Solver, Smarter Solver, Looking for Patterns, Introduction to Pointers, Single Pointer Operations

  3. Review and discussion of sudoku code from last lecture. Backtrack vs brute force. Course waffles. Stacks, "the stack" in memory, Buffer overflows. Also: the course ENGG1000, wiki textbook (idea from hong kong). Predicates, comparing with TRUE. Stack overflow.  

  4. Tim explains pass by reference and the link between arrays and pointers. Using sample code we see that C passes arrays into functions *by reference*, unlike all the other types we have seen so far.  

  5. Topics: Welcome to CS106A, Course Staff, Why is the class called Programming Methodology?, Are you in the right class?, Class Logistics, Assignments and Grading, Extensions, Midterm and Final, Grade Breakdown, The Honor Code, Why Karel?

  6. Hamming codes, parity bits, magic. Detecting errors when transmitting information. Even better: correcting errors.  

  7. Strings, elements and layout of a c program. using gcc, comments, ints, printf, scanf, main, #include, printing newlines. Discussion of clarity. also: about transistors, compiling, machine code  

  8. How a C function call is implemented in machine code. frames. role and responsibilities. Abstraction revisited. Scope revisited. This is the first part of lecture 12.  

  9. Heap Management - How Information about Allocations are Stored in the Heap, Result of Freeing Memory Improperly, Actual Sizes of Heap Allocations - Nearest Power of 2, Management of Free Blocks on the Heap by Storing Addresses in the Blocks of Free Memory, Algorithms for Choosing Which Free Block to Allocate, How the Heap's Free List Can Be Updated When Memory is Freed, How Adjacent Free Blocks Are Combined To Avoid Fragmentation, Compacti...more

  10. Selection Sort, Live Demo: Working/execution of the Code, Selection Sort Analysis, Insertion Sort Algorithm, Live Demo: Working/execution of Insertion Sort, Insertion Sort Analysis, Insertion vs Selection, Quadratic Growth of the Algorithm, Merge Sort, Merge Sort: Working/execution Demo, Merge Sort Code Explanation, Merge Sort Analysis, Quadratic vs Linear Arithmetic, Sort 'Race', Quick Sort Idea