IntermediateSystems Thinking
Lab: think in systems
Apply systems thinking, abstraction, data structures, and complexity to concrete decisions.
Lab · optionalFundamentalsIntermediate10 min
Recommended first
By the end of this lesson you will be able to:
- Distinguish pure transformations from side effects
- Reason about abstraction layers and coupling
- Choose a data structure based on the dominant operation
- Estimate algorithmic complexity for a loop pattern
Optional scenario lab. Practice the systems-thinking moves — see flows, choose structures, and estimate costs — the way you would in a real code review.
Scenarios: thinking in systems
- 1.A function takes two numbers and returns their sum — no logging, no globals, no I/O. If you call it with the same inputs a thousand times, what happens?
- 2.You change a low-level utility function and four unrelated modules break. The most likely cause is:
- 3.You call
db.findUser(id)without knowing whether the underlying storage is PostgreSQL, SQLite, or an in-memory map. This is an example of: - 4.Your code frequently checks whether a username already exists in a growing collection of thousands. Which structure gives the best performance?
- 5.A function loops over every item in a list of n items, and for each one loops over the list again. Its time complexity is roughly:
The habit: see any piece of code as inputs → transformation → outputs, track the side effects, and let the dominant operation choose the structure.
Finished reading? Mark it complete to track your progress.