Skip to content
/ mastery Public

The quiz project "Mastery" from "Designing Elixir Systems with OTP"

Notifications You must be signed in to change notification settings

H12/mastery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastery

This is the Elixir OTP project the book "Designing Elixir Systems with OTP" walks you through creating. The book is fantastic, and does a great job slowly introducing the tenets of architecting an OTP application.

That said, the end-point of the book leaves the app with a little to be desired (in my opinion, at least). Namely...

  • The tests don't have 100% coverage
  • The app blows up if a user provides a non-string answer
  • The validators always return :ok when the last field in the pipe is valid, even if earlier fields aren't
  • Mastery invokes GenServer.call directly instead of delegating to QuizManager
  • The Proctor is unnecessarily coupled to QuizManager for building quizzes and adding templates
    • Note: It's also coupled to QuizManager for removing quizzes, but that's necessary because quiz removal functionality is not on the public API provided by Mastery.ex

This repo includes fixes for these problems.

That "validators always return :ok" one is particularly insidious, because it means all the quiz titles the book has you use throughout (e.g. :simple_addition) are technically invalid, as the validators stipulate titles are supposed to be non-blank binaries.

Acknowledgements

As mentioned above, the book this project came from is titled Designing Elixir Systems with OTP, and I found it to be a highly-instructive read. If you're interested in checking it out, here's its listing on PragProg.

About

The quiz project "Mastery" from "Designing Elixir Systems with OTP"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages