deep approach
Last edited: August 8, 2025a student approach to learning where learning outcomes are driven by student’s own experience to deeply drive educational results independenlty
Defensive Programming
Last edited: August 8, 2025Facts
- Everybody writes bugs
- Debugging sucks
Defensive Programming Tools + Techniques
- Use language features
- Specs, documentations, Test-Driven Development, unit testing
- Fail fast and loudly
- Systematic debugging
- Investing in tools
Use Language Features
- Descriptors: static, final, pub./priv.
- Type checking: prevent type errors
- Automatic array bounds checking
- Memory management
- Compiler optimization
Key idea: know what language features are available, why/when to use them. don’t work against the language in circumventing them
Specs, Docs., TDD, Unit Tests
- How should it work: specs
- How does it work: docs
- How will I know it works: TDD
- How do I know it still works: unit tests
These all force you to think about your code before!! you write it so then you can correct them as soon as possible.
degrees of belief
Last edited: August 8, 2025degrees of belief help us quantify how much we believe some event \(A\) is more/less plausible than some event \(B\).
Let us take two statements:
- \(A\) Taylor gets Nobel Prize in Literature
- \(B\) Han shot first
For instance, if we want to express “I think its more likely that Taylor gets the prize than Han shot first”:
\begin{equation} A \succ B \end{equation}
axioms of degrees of belief
universal comparability
for two statements \(A, B\), only three states can exist:
Deliberative Alignment
Last edited: August 8, 2025demand paging
Last edited: August 8, 2025- use efficient page maps too translate virtual to physical addresses
- kick things off to disk when memory runs out
Every process has its own page map.
demand paging
Key idea: physical representation of virtual memory does not have to be on actual memory.
- if memory fills out, kick a page to disk
- if the program asks for memory again, kick another page to disk and load its memory back
Keep in memory the information that’s being used, kick the rest to swap space/"paging file". Ideally: we have a performance of main memory and capacity of disk.
