Programming Elixir Chapter 17 Notes

OTP: Servers

Dave discusses an alternate component-based approach to writing GenServers. This consists of modules in three files:

  • A public API to hide the GenServer complexity.
  • The GenServer interface.
  • Implementatation.

The public API is just a wrapper to the GenServer functions and the GenServer functions are just a wrapper to the implementation. This hides the GenServer call/cast complexity and isolates the implementation.

I like this approach, but think that breaking it into three files is too complex. If the public API is only a wrapper to the GenServer API and the GenServer API is only a wrapper to the implementation, we can easily put them into a single file.

My approach implements the GenServer in two files:

  • Public API which calls the GenServer functions.
  • Implementation
[Read More]

Things are Starting to Click!

OrganizingAProject-4

Back in college I struggled with Calculus; had a hard time grasping the concept of the day. After a semester break, I’d ace the test reviewing previous topics. Just took awhile for the concepts to settle into my brain.

I’m experiencing a similar effect with Elixir. Came back after a few days and was able to make significant progress on Chapter 13’s Formatting a Table exercise.

Things are starting to click.

[Read More]

IEx and Mix Notes

Further side-quest to become comfortable with IEx/mix/dbg/pry. Learning commandline debugging since I’ve not been able to figure out how to launch a debuggable commandline program from VSCode.

[Read More]