We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy
Explore STEM Content
Search the community's STEM library — free to study, yours to make your own.
Software
Programming, algorithms and systems on openstem — flashcards, notes, quizzes, sketches and flowcharts shared by the community. Study free, or clone anything into your library.
Software: explore STEM content (page 25 of 25) · openstem
Quiz8 questions
What is the essential structural difference between LL(1) and LR(1) parsing?
ALL(1) builds top-down by prediction; LR(1) builds bottom-up by shift and reduceBLL(1) requires more memory than LR(1) in every caseCLR(1) cannot handle any form of arithmetic expressionDThey are two names for the same algorithm
What is 'speculative generality' and why is it a design smell?1 / 10
Adding abstraction, hooks, or parameters for hypothetical future needs that never arrive. It pays complexity cost up front against an uncertain payoff; YAGNI argues you should add flexibility only when a concrete second case forces it, since unused indirection is harder to read and to remove.
In Hexagonal Architecture (Ports & Adapters), what is the rule about dependency direction?1 / 10
The domain core defines ports (interfaces) and never depends on infrastructure; adapters (DB, HTTP, queues) depend inward on those ports. All dependencies point toward the domain, so persistence and transport are pluggable and the core is testable without them.
Catching by Type with `on` A plain `catch (e)` catches anything thrown. `on SomeType catch (e)` catches only that type, letting you stack multiple `on` clauses to handle different error types differently, with a general `catch` as a fallbac