APDR

Concurrency, Metaprogramming, and Debugging Lab

Algorithms, Programming, and Data Representation · Module 92313 · Chapter 89a

Predict which worker can progress, where an async task yields, what a decorator replaces, and which tool gives useful evidence. Each experiment animates the rule behind the result.

How the lab works

  1. Predict. Choose an answer before the trace runs.
  2. Rate your confidence. A sure but wrong prediction marks an idea to revisit.
  3. Reveal. Follow the execution or decision trace.
  4. Explore. Open the sandbox at any time and change the model; each completed experiment adds one lab skill.

8.1–8.2 Threads, processes, and the GIL

Watch how memory boundaries and the interpreter build change the work that can run at once.

The execution rule appears here.

Explore the runtime

8.3 Asyncio scheduling and shared state

Compare two tasks updating a counter across an await, with and without a lock.

The task schedule appears here.

Explore the schedule

8.5 Choose for the workload

Route examples by the time they spend waiting, calculating, or moving data.

The workload analysis appears here.

Explore a workload

9.2–9.3 Decorators and class creation

Trace the object passed into a decorator, then compare class hooks with metaclass control.

The metaprogramming rule appears here.

Explore the mechanism

9.4 Dynamic code and ASTs

Follow expression evaluation, statement execution, and the point where structured syntax still becomes executable code.

The code-generation rule appears here.

Explore a tool

9.5–9.6 Debugging and testing evidence

Compare a generated counterexample, a scoped mock, coverage, and a stack trace as evidence for different questions.

The debugging evidence appears here.

Explore an investigation

Your results

Personal study lab based on the Chapter 89a guide and supplied “89a.pdf”, written in my own words. Not an official FAU publication; check course details against the current notes. Made by Thanate Amornjiraporn (Focus).