Goal: Level up Python with functional patterns and generators, then understand how databases keep your data safe with transactions and locking.
Topics
| Day | Focus | Topics |
|---|---|---|
| Mon | Python Functions | Functions and Arguments · Lambda Functions · Map, Filter, Reduce, Zip |
| Tue | Python Advanced Functions | Closures and Nonlocal · Decorators · Generators and Iterators |
| Wed | DBMS Transactions | Transactions Deep Dive · Isolation Levels · Locking Mechanisms |
| Thu | DBMS Concurrency | Deadlocks · Optimistic vs Pessimistic Locking |
| Fri | DSA Trees | Binary Trees · Binary Search Trees · Binary Search |
Key Concepts
*args/**kwargsand how Python resolves argument order- The decorator pattern — wrapping functions to add behavior without modifying them
- Generator lazy evaluation with
yield— why it’s memory-efficient for large datasets - Isolation level tradeoffs — read committed vs serializable, and the phantom read problem
- Deadlock prevention strategies — lock ordering, timeouts, deadlock detection
- The binary search template — getting the boundary conditions right every time
Practice
- Write a
@timerdecorator that logs how long any function takes to execute - Implement a generator for the Fibonacci sequence — verify it’s lazy with
next() - Explain why READ COMMITTED is the default in PostgreSQL (hint: it’s about the throughput vs safety tradeoff)
- Implement binary search with both iterative and recursive approaches
~14 topics · ~1.5-2 hrs/day · Focus: read the linked notes, then code each concept