<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="146872" data-post-id="146872">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It could be that, sure.</p>
<p>Sadly, Dializer is by no means a home run of static analysis wins.  It’s slow and cryptic, which makes it a hassle to work with.  The information it gives is helpful, but it definitely makes you work for it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146872" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-146872" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146872"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="147170" data-post-id="147170">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Fl4m3Ph03n1x" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Fl4m3Ph03n1x/120/11709_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Fl4m3Ph03n1x
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="JEG2" data-post="23" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>Sadly, Dializer is by no means a home run of static analysis wins. It’s slow and cryptic, which makes it a hassle to work with. The information it gives is helpful, but it definitely makes you work for it.</p>
</blockquote>
</aside>
<p>True. But I still think that having <em>some</em> form of analysis is better than having none. Or perhaps you disagree with me?</p>
<p>I have the impression from the book that you use Dialyzer in your daily work - please correct me if I am wrong, I would love to know why you don’t use it (if you don’t) or what alternatives you think are better.</p>
<hr>
<p>I have a few more questions regarding the book (please keep in mind I ask as I read, I have not yet finished the whole thing).</p>
<p>On page 109 we create our first <code>GenServer</code> and we add the following callback to it:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def init(quizzes) when is_map(quizzes), do: {:ok, quizzes}
  def init(_quizzes), do: {:error, "quizzes must be a map"}
</code></pre>
<p>This translates to the following spec:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">@spec init(any) :: {:error, String.t} | {:ok, map}
</code></pre>
<p>Which according to the <code>init</code> specification (and dialyzer) is incorrect:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">The return type 
          {'error', binary()} in the specification of init/1 is not a subtype of 
          'ignore' |
          {'ok', _} |
          {'stop', _} |
          {'ok', _,
           'hibernate' | 'infinity' |
           non_neg_integer() |
           {'continue', _}}, which is the expected return type for the callback of the 'Elixir.GenServer' behaviour
</code></pre>
<p>I know I am likely missing something here. But perhaps it should be <code>def init(_quizzes), do: {:stop, "quizzes must be a map"}</code> instead ?</p>
<p>Another thing, is that I noticed you are using <code>quiz.title</code> as key for the <code>quizzes</code> map. Given that we will have many quizzes at the same time, won’t this be dangerous because it will allow key clashes?</p>
<p>What would the be the downsides of using <code>reference()</code> as an id for a quiz when creating one?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="147170" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-147170" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="147170"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="147211" data-post-id="147211">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="24" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>I have the impression from the book that you use Dialyzer in your daily work - please correct me if I am wrong, I would love to know why you don’t use it (if you don’t) or what alternatives you think are better.</p>
</blockquote>
</aside>
<p>I tend to use it when building libraries, to provide even more assurance that I’m building something robust.</p>
<p>I tend not to bother when I’m building applications, because of the previously mentioned hassle.  This is total laziness and my part and it’s bad.  Still, it’s kind of telling that the tool pushes me to this.</p>
<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="24" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>But perhaps it should be <code>def init(_quizzes), do: {:stop, "quizzes must be a map"}</code> instead ?</p>
</blockquote>
</aside>
<p>You are 100% correct.  Great catch!</p>
<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="24" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>Another thing, is that I noticed you are using <code>quiz.title</code> as key for the <code>quizzes</code> map. Given that we will have many quizzes at the same time, won’t this be dangerous because it will allow key clashes?</p>
</blockquote>
</aside>
<p>It’s a fair point.  Some tradeoffs are definitely made to make the book code easier to follow.</p>
<p>You could use references, as you suggest, but then you need to give user code some means of finding the reference they are currently interested in.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="147211" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-147211" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="147211"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="147271" data-post-id="147271">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Fl4m3Ph03n1x" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Fl4m3Ph03n1x/120/11709_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Fl4m3Ph03n1x
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="JEG2" data-post="25" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>You are 100% correct. Great catch!</p>
</blockquote>
</aside>
<p>I am glad I am somehow contributing to the great work you guys have been doing. Even though my approach may not be the best sometimes, that is always my end goal ! <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="JEG2" data-post="25" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>You could use references, as you suggest, but then you need to give user code some means of finding the reference they are currently interested in.</p>
</blockquote>
</aside>
<p>That is correct. PragDave introduced a concept in one of his courses called a Tally. A tally is a <em>special representation of the state we give to the user</em>. In this case, the state would be the quizzes map, and a tally could be a part of the map plus some extra information the user needs. This is a pattern used in FP I was not aware of before trying his courses, but I have had difficulty applying it in other places.</p>
<ol>
<li>Have you ever heard of giving tally’s to the client?</li>
<li>If so, what are your thoughts on this pattern? How would it (hypothetically) fit the mastery example (if at all)?</li>
</ol>
<hr>
<p>On page 111 you present the user with this code snippet:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def quiz_fields(), do:
  %{ mastery: 2, title: :simple_addition}
</code></pre>
<p>Here you create this function that helps us create a quiz by setting some fields. As you can see in this map, the <code>title</code> field is an atom, yet on page 49 you specify the <code>quiz.title</code> is of type <code>String.t</code>. In a discussion we had previously, you mentioned using Strings for scenarios where the input comes from users is better because we don’t fill up the atom’s table (and avoid a crash).</p>
<p>Am I missing something here? Could you please elaborate on your decision to use an atom for the title instead of a String ?</p>
<hr>
<p>On page 118 you append errors to the list of errors instead of prepending. In the first chapters you specifically recommend prepending to lists rather than appending to them. Could you help me understand the benefits of  taking a different approach here?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="147271" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-147271" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="147271"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="147350" data-post-id="147350">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="26" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>That is correct. PragDave introduced a concept in one of his courses called a Tally. A tally is a <em>special representation of the state we give to the user</em> .</p>
</blockquote>
</aside>
<p>Sorry, but I’m not familiar with this definition of a <em>Tally</em>.  I tried to Google it, but I don’t think I’m finding the right concept.</p>
<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="26" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>Am I missing something here? Could you please elaborate on your decision to use an atom for the title instead of a String ?</p>
</blockquote>
</aside>
<p>I think this is just a symptom of having two authors.  I intended for the title to be a string for the reasons mentioned.  My co-author wrote the code using atoms, which to be fair does seem just fine for the tests he uses them in.  I guess we should say either is allowed.</p>
<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="26" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>On page 118 you append errors to the list of errors instead of prepending. In the first chapters you specifically recommend prepending to lists rather than appending to them. Could you help me understand the benefits of taking a different approach here?</p>
</blockquote>
</aside>
<p>It felt important to me to keep the errors in the order they are encountered and I really doubt we’re going to be dealing with large enough lists of errors that performance would suffer.  I made a calculated exception here.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="147350" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-147350" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="147350"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="148361" data-post-id="148361">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Fl4m3Ph03n1x" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Fl4m3Ph03n1x/120/11709_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Fl4m3Ph03n1x
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for your detailed replies!<br>
It is truly inspiring to have someone answer all my questions. I know I can be a bit heavy sometimes, but I want you to know I really appreciate all the time you are spending in answering them!</p>
<p>I will keep on reading and for sure keep on posting!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="148361" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-148361" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="148361"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="148579" data-post-id="148579">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Fl4m3Ph03n1x" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Fl4m3Ph03n1x/120/11709_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Fl4m3Ph03n1x
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>On page 122 you have this code snippet for a file called <code>mastery.ex</code></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def build_quiz(fields) do
  with :ok &lt;- QuizValidator.errors(fields),
       :ok &lt;- GenServer.call(QuizManager, {:build_quiz, fields}), 
  do:  :ok, else: (error-&gt; error)
end
</code></pre>
<p>What caught my attention here is the call <code>GenServer.call(QuizManager, {:build_quiz, fields})</code>.</p>
<p>Why have the authors decided to make a <code>GenServer.call</code> instead of using the Public API <code>QuizManager</code> already offers, namely the <code>build_quiz</code> function previously defined?</p>
<p>Could someone help me understand the technical reasons behind this decision? (performance issues, usage issues, etc).</p>
<hr>
<p>In page 122 ins the function <code>add_template</code>, since we are not validating the title, what would keep me from setting the title as a function or some other thing? Did the authors decided to not validate the title because such a validation was not needed?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def add_template(title, fields), do:
    with  :ok &lt;- TemplateValidator.errors(fields),
          :ok &lt;- GenServer.call(QuizManager, {:add_template, title, fields}),
    do: :ok
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="148579" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-148579" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="148579"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="148624" data-post-id="148624">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="29" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>Could someone help me understand the technical reasons behind this decision? (performance issues, usage issues, etc).</p>
</blockquote>
</aside>
<p>I think this is just a simple error on our part.  Thanks for catching it.</p>
<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="29" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>Did the authors decided to not validate the title because such a validation was not needed?</p>
</blockquote>
</aside>
<p>Titles are really just for the creator.  It’s the name you give a thing so you can refer back to it later.  The system doesn’t really care what it is.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="148624" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-148624" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="148624"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="148645" data-post-id="148645">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Fl4m3Ph03n1x" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Fl4m3Ph03n1x/120/11709_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Fl4m3Ph03n1x
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="JEG2" data-post="30" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>I think this is just a simple error on our part. Thanks for catching it.</p>
</blockquote>
</aside>
<p>If this is the case I would like to point out that the <code>add_template</code>, <code>select_question</code> and <code>answer_question</code> functions of the <code>mastery.ex</code> file all have the same issue.</p>
<hr>
<p>On a separate note, why doesn’t the public API of <code>QuizManager</code> have a function to start it?<br>
Currently if you want to spin up a <code>QuizManager</code> you need the following code:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def start_quiz_manager, do:
    GenServer.start_link(QuizManager, %{}, name: QuizManager)
</code></pre>
<p>My question is, why not have a public function in the API for that as well?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def start_quiz_manager, do:
    QuizManager.start() #inside it calls GenServer.start_link(QuizManager, %{}, name: QuizManager)
</code></pre>
<p>If the purpose of the public API of <code>QuizManager</code> is to hide the gritty details and the low levels calls to <code>GenServer</code>, why wasn’t a <code>start</code> function also added for the public API?</p>
<p>Would love to have your opinion !</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="148645" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-148645" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="148645"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
    <div class="postbit" id="148663" data-post-id="148663">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="31" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>If this is the case I would like to point out that the <code>add_template</code> , <code>select_question</code> and <code>answer_question</code> functions of the <code>mastery.ex</code> file all have the same issue.</p>
</blockquote>
</aside>
<p>OK, I actually took the time to look this time and I was wrong about us being wrong.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20">  (It’s hard for me to check exact pages, because my local book is in a different state than your beta book.)</p>
<p>We start off showing these bare calls and save the API wrapping for the next chapter so we can use it to address other concerns like dynamic supervision.  Keep reading.  We get there!</p>
<aside class="quote no-group" data-username="Fl4m3Ph03n1x" data-post="31" data-topic="21626">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>On a separate note, why doesn’t the public API of <code>QuizManager</code> have a function to start it?</p>
</blockquote>
</aside>
<p>Same answer.  It’s in the next chapter.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="148663" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/designing-elixir-systems-with-otp-pragprog/21626/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-148663" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="148663"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #31"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/21626/load_more?page=4">Load more posts (37 remaining)</a>
</div></template></turbo-stream>