The Grand Quiz

๐ŸŽ“ The Grand Quiz

You've made it through all eight lessons. Time to prove you can think in both paradigms.

This quiz covers every lesson. 18 questions. No time limit. No partial credit. Score at the end.

Section 1: Paradigms & Pure Functions (Lessons 1โ€“2)

1. Which pair of answers best describes OOP vs FP?

2. A pure function that reads the current time:

Section 2: Functions as Values (Lesson 3)

3. [1, 2, 3, 4].filter(n => n % 2 === 1) produces:

4. What does reduce do in one sentence?

Section 3: Composition (Lesson 4)

5. In a pipeline, each stage should be:

6. Which property makes pipeline stages safely reusable?

Section 4: Immutability (Lesson 5)

7. Why is shared mutable state dangerous?

8. The reducer pattern treats state as:

Section 5: OOP Core (Lesson 6)

9. Which OOP pillar is demonstrated by a private field with public getter/setter methods?

10. "Same message, different behavior per object" is the definition of:

Section 6: Head-to-Head (Lesson 7)

11. Which statement is true about testing in each paradigm?

12. FP's main advantage for concurrency is:

Section 7: When to Use Which (Lesson 8)

13. Which is the best FP candidate?

14. Which is the best OOP candidate?

15. In "functional core, imperative shell," where does the database access live?

Section 8: Putting It Together

16. Which language is a good example of an OOP-first language that has adopted FP features?

17. The single most important takeaway of this course is:

18. You're asked to build a checkout system. The best starting architecture is:

Where to Go Next

The concepts in this course are language-agnostic โ€” here's how to practice them in the wild:

  • TypeScript/JavaScript: write your next module with zero let and only map/filter/reduce. Try Immer or Immutable.js for immutable state.
  • Python: use functools.reduce, comprehensions, and dataclasses for immutable records.
  • Kotlin or C#: lean on data classes and LINQ/collection extensions.
  • Go deep: work through Structure and Interpretation of Computer Programs (SICP), Functional-Light JS, or the Mostly Adequate Guide.
  • Practice: pick a small problem (pricing engine, log analyzer, shopping cart) and implement it twice โ€” once in each style. The contrast will teach you more than any tutorial.
Final Word: Functional and object-oriented programming are not rivals โ€” they are two lenses on the same craft. Data flows through pure functions; entities encapsulate their state; and great engineers switch between the two without ceremony. Learn both, use both, and let the problem โ€” not the dogma โ€” decide.