<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>David R. MacIver's Blog</title>
  <link href="https://drmaciver.com/notebook/feed.xml" rel="self" />
  <link href="https://drmaciver.com/" />
  <updated>2026-02-23</updated>
  <id>https://drmaciver.com/</id>
  <author>
    <name>David R. MacIver</name>
  </author>
  
  <entry>
    <title>Temporary processing loops as a sometimes replacement for background threads</title>
    <link href="https://drmaciver.com/notebook/2026/02/temporary-processing-loops-as-a-sometimes-replacement-for-background-threads/" />
    <id>https://drmaciver.com/notebook/2026/02/temporary-processing-loops-as-a-sometimes-replacement-for-background-threads/</id>
    <updated>2026-02-23</updated>
    <content type="html">


&lt;p&gt;There’s a trick I’ve used twice now, and I figure any trick worth
using twice is worth writing up. I’ve never seen anyone else using it,
possibly because it’s not actually very useful, or is secretly a bad
idea for reasons that I’m unaware of. It’s obvious enough that I’d be
surprised if it was original to me, but I also expect most other people
haven’t seen it either.&lt;/p&gt;
&lt;p&gt;The basic idea is this: Suppose you have a bunch of tasks running in
different threads, and you need some sort of background thread running
to keep them happy. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In &lt;a href=&#34;https://github.com/DRMacIver/shrinkray&#34;&gt;shrinkray&lt;/a&gt;
the tasks are attempts to apply patches to a test case, and the
background thread is a sort of “merge queue” which is responsible for
trying to combine successful patches together.&lt;/li&gt;
&lt;li&gt;In a recent project, I have a number of communication channels, and
messages coming in from them on a single connection, and the background
thread is reading those messages, figuring out where they need to go,
and dispatching them to a queue for the right channel.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;…those are actually the only two examples I have right now. I could
probably imagine more, but those are the ones I’ve concretely tried this
in.&lt;/p&gt;
&lt;p&gt;In any case, in both of these the background thread was sortof a pain
in the ass. In the shrinkray case, there was a bunch of lifecycle
management I had to worry about (the “thread” was actually a trio task,
and in some of these use cases it was annoying to scope it to a
nursery). In the messages case, it was viable, but it was difficult to
debug and I wanted it to work in a language with kinda shit threading,
so I’d rather not use a background thread if I didn’t have to.&lt;/p&gt;
&lt;p&gt;Anyway, there turns out to be a common trick: In both of these cases,
we are doing a thing in the calling thread, and that thing will return
back to us only once the background thread has got to processing our
particular need.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In shrinkray, we only care that the merge queue has run for long
enough to either accept or reject the patch.&lt;/li&gt;
&lt;li&gt;In the message processing case, we only care that the dispatcher has
run for long enough that there is at least one message in our
inbox.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a result, in both of these cases, we are essentially blocking
until the dispatcher thread has got to our particular need. Which means
there doesn’t need to be a dispatcher thread at all - we can just
temporarily become it. Look at me, I’m the dispatcher thread now.&lt;/p&gt;
&lt;p&gt;let’s look at some pseudocode for this. Here is how our message
dispatcher might work with a background thread:&lt;/p&gt;
&lt;div class=&#34;sourceCode&#34; id=&#34;cb1&#34;&gt;&lt;pre class=&#34;sourceCode python&#34;&gt;&lt;code class=&#34;sourceCode python&#34;&gt;&lt;span id=&#34;cb1-1&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-1&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb1-2&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-2&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;channels: &lt;span class=&#34;bu&#34;&gt;dict&lt;/span&gt;[&lt;span class=&#34;bu&#34;&gt;str&lt;/span&gt;, SimpleQueue] &lt;span class=&#34;op&#34;&gt;=&lt;/span&gt; {}&lt;/span&gt;
&lt;span id=&#34;cb1-3&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-3&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb1-4&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-4&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;span class=&#34;kw&#34;&gt;def&lt;/span&gt; run_dispatcher():&lt;/span&gt;
&lt;span id=&#34;cb1-5&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-5&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;    &lt;span class=&#34;cf&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;va&#34;&gt;True&lt;/span&gt;:&lt;/span&gt;
&lt;span id=&#34;cb1-6&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-6&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;        msg &lt;span class=&#34;op&#34;&gt;=&lt;/span&gt; get_message()&lt;/span&gt;
&lt;span id=&#34;cb1-7&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-7&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;        channnels[msg.&lt;span class=&#34;bu&#34;&gt;id&lt;/span&gt;].put(msg)&lt;/span&gt;
&lt;span id=&#34;cb1-8&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-8&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb1-9&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-9&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;Thread(target&lt;span class=&#34;op&#34;&gt;=&lt;/span&gt;run_dispatcher).start()&lt;/span&gt;
&lt;span id=&#34;cb1-10&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-10&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb1-11&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-11&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;span class=&#34;kw&#34;&gt;def&lt;/span&gt; get_messsage(&lt;span class=&#34;bu&#34;&gt;id&lt;/span&gt;: &lt;span class=&#34;bu&#34;&gt;str&lt;/span&gt;):&lt;/span&gt;
&lt;span id=&#34;cb1-12&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb1-12&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;    &lt;span class=&#34;cf&#34;&gt;return&lt;/span&gt; channels[&lt;span class=&#34;bu&#34;&gt;id&lt;/span&gt;].get()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And with inline processing:&lt;/p&gt;
&lt;div class=&#34;sourceCode&#34; id=&#34;cb2&#34;&gt;&lt;pre class=&#34;sourceCode python&#34;&gt;&lt;code class=&#34;sourceCode python&#34;&gt;&lt;span id=&#34;cb2-1&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-1&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb2-2&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-2&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;channels: &lt;span class=&#34;bu&#34;&gt;dict&lt;/span&gt;[&lt;span class=&#34;bu&#34;&gt;str&lt;/span&gt;, SimpleQueue] &lt;span class=&#34;op&#34;&gt;=&lt;/span&gt; {}&lt;/span&gt;
&lt;span id=&#34;cb2-3&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-3&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb2-4&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-4&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;lock &lt;span class=&#34;op&#34;&gt;=&lt;/span&gt; Lock()&lt;/span&gt;
&lt;span id=&#34;cb2-5&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-5&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span id=&#34;cb2-6&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-6&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&lt;span class=&#34;kw&#34;&gt;def&lt;/span&gt; get_messsage(&lt;span class=&#34;bu&#34;&gt;id&lt;/span&gt;: &lt;span class=&#34;bu&#34;&gt;str&lt;/span&gt;):&lt;/span&gt;
&lt;span id=&#34;cb2-7&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-7&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;    queue &lt;span class=&#34;op&#34;&gt;=&lt;/span&gt; channels[&lt;span class=&#34;bu&#34;&gt;id&lt;/span&gt;]&lt;/span&gt;
&lt;span id=&#34;cb2-8&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-8&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;    &lt;span class=&#34;cf&#34;&gt;while&lt;/span&gt; queue.empty():&lt;/span&gt;
&lt;span id=&#34;cb2-9&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-9&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;        &lt;span class=&#34;cf&#34;&gt;with&lt;/span&gt; lock:&lt;/span&gt;
&lt;span id=&#34;cb2-10&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-10&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;            msg &lt;span class=&#34;op&#34;&gt;=&lt;/span&gt; get_message()&lt;/span&gt;
&lt;span id=&#34;cb2-11&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-11&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;            channnels[msg.&lt;span class=&#34;bu&#34;&gt;id&lt;/span&gt;].put(msg)&lt;/span&gt;
&lt;span id=&#34;cb2-12&#34;&gt;&lt;a aria-hidden=&#34;true&#34; href=&#34;#cb2-12&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;    &lt;span class=&#34;cf&#34;&gt;return&lt;/span&gt; queue.get()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The shrinkray one &lt;a href=&#34;https://github.com/DRMacIver/shrinkray/blob/9115fed50c0cff24604fde7c5794607ab4fc70ec/src/shrinkray/passes/patching.py#L69&#34;&gt;looks
a bit different&lt;/a&gt; because the merge queue operates on many patches at
a time rather than being single message like the dispatcher case, but is
basically the same principle: Check if we need to become the merge
thread, if we do start doing that until our patch is merged or rejected,
and if not just wait on the (guaranteed to be running) merge thread
until we get to that point.&lt;/p&gt;
&lt;p&gt;Do you need this trick? No, probably not. But it has solved a genuine
need for me twice, so maybe you’ll be the third time it was useful.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Speeding up conditional sampling with divide and conquer</title>
    <link href="https://drmaciver.com/notebook/2025/10/speeding-up-conditional-sampling-with-divide-and-conquer/" />
    <id>https://drmaciver.com/notebook/2025/10/speeding-up-conditional-sampling-with-divide-and-conquer/</id>
    <updated>2025-10-12</updated>
    <content type="html">


&lt;p&gt;I got myself into a bit of a mess trying to explain why a particular
result was true the other day, so this is my write up of a proof.&lt;/p&gt;
&lt;p&gt;Suppose you’re sampling from some language model (large or otherwise)
and you want to apply a constraint &lt;span class=&#34;math inline&#34;&gt;\(h\)&lt;/span&gt;. That is, you’ve got some random
variable &lt;span class=&#34;math inline&#34;&gt;\(S\)&lt;/span&gt;, and you want to sample
a random variable &lt;span class=&#34;math inline&#34;&gt;\(T\)&lt;/span&gt; such that &lt;span class=&#34;math inline&#34;&gt;\(P(T = t) \propto P(S = t) h(t)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;One way to achieve this is rejection sampling: You just repeatedly
sample from IID copies of &lt;span class=&#34;math inline&#34;&gt;\(S\)&lt;/span&gt; until
you get one that satisfies &lt;span class=&#34;math inline&#34;&gt;\(h\)&lt;/span&gt;.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;I’m playing a bit fast and loose with random variables
here and just assuming you can take IID copies of any of them. Really
our “random variables” of interest are randomized programs.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The problem with this is that it’s potentially very slow. It might
require a lot of samples from &lt;span class=&#34;math inline&#34;&gt;\(S\)&lt;/span&gt;,
especially if you make bad choices on your initial choices of characters
in the sequence.&lt;/p&gt;
&lt;p&gt;Here’s a way of improving the performance , if for each character
&lt;span class=&#34;math inline&#34;&gt;\(c\)&lt;/span&gt;, we can calculate &lt;span class=&#34;math inline&#34;&gt;\(a(c) = P(h(S) | S \text{ starts with }
c)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;We do this by reweighting the probability of each start character
&lt;span class=&#34;math inline&#34;&gt;\(c\)&lt;/span&gt; by &lt;span class=&#34;math inline&#34;&gt;\(\tau(c)\)&lt;/span&gt;, so we choose &lt;span class=&#34;math inline&#34;&gt;\(c\)&lt;/span&gt; with probability proportional to &lt;span class=&#34;math inline&#34;&gt;\(P(S \text{ starts with } c) \tau(c)\)&lt;/span&gt;. If
&lt;span class=&#34;math inline&#34;&gt;\(c\)&lt;/span&gt; is the special EOS token, we
stop, otherwise we then recursively apply this method to the rest of the
string, reweighting the next character in a similar way (with newly
calculated probabilities).&lt;/p&gt;
&lt;p&gt;The advantage of this method is that we never have to backtrack or
repeat ourselves: Our reweighting of the characters automatically takes
the constraint into account without having to ever start over again.&lt;/p&gt;
&lt;p&gt;The disadvantage is that we have to get these &lt;span class=&#34;math inline&#34;&gt;\(\tau\)&lt;/span&gt; reweights from somewhere, which may
or may not be possible in general. I’m interested in some special cases
where it’s easy because the condition has a nice simple structure that
just comes from deleting prefixes, but we won’t go into that here.&lt;/p&gt;
&lt;p&gt;The reason this works is essecially a light variant of the &lt;a href=&#34;https://www.cambridge.org/core/journals/combinatorics-probability-and-computing/article/abs/probabilistic-divideandconquer-a-new-exact-simulation-method-with-integer-partitions-as-an-example/85C6175903F96D32609D1BF6820A4664&#34;&gt;Probabilistic
divide and conquer method&lt;/a&gt;, which rests on the following lemma:&lt;/p&gt;
&lt;p&gt;Suppose we have discrete random variables &lt;span class=&#34;math inline&#34;&gt;\(A, B\)&lt;/span&gt; on &lt;span class=&#34;math inline&#34;&gt;\(U,
V\)&lt;/span&gt;, with joint law &lt;span class=&#34;math inline&#34;&gt;\(q\)&lt;/span&gt; and
some constraint &lt;span class=&#34;math inline&#34;&gt;\(h: U \times V \to \{0,
1\}\)&lt;/span&gt; with &lt;span class=&#34;math inline&#34;&gt;\(Z = E(h(A, B)) &amp;gt;
0\)&lt;/span&gt;, and we want to sample from the conditional distribution
&lt;span class=&#34;math inline&#34;&gt;\(A, B | h(A, B)\)&lt;/span&gt;. That is, we want
random variables &lt;span class=&#34;math inline&#34;&gt;\(X, Y\)&lt;/span&gt; such that
&lt;span class=&#34;math inline&#34;&gt;\(P(X = x, Y = y) = \frac{q(x, y) h(x,
y)}{Z}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Construct &lt;span class=&#34;math inline&#34;&gt;\(X, Y\)&lt;/span&gt; as follows:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;Sample &lt;span class=&#34;math inline&#34;&gt;\(X\)&lt;/span&gt; such that &lt;span class=&#34;math inline&#34;&gt;\(P(X = x) = P(A = x | h(A, B))\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Then sample &lt;span class=&#34;math inline&#34;&gt;\(Y\)&lt;/span&gt; such that &lt;span class=&#34;math inline&#34;&gt;\(P(Y = y) = P(B = y | h(A, B), A =
x)\)&lt;/span&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you can do this, then &lt;span class=&#34;math inline&#34;&gt;\(P(X = x, Y = y)
= \frac{q(x, y)}{Z}\)&lt;/span&gt; as desired.&lt;/p&gt;
&lt;p&gt;In the original PDC paper they describe this as a simple application
of Bayes’ formula, which maybe it is but I then got myself into a muddle
trying to prove it. In the end I found it easier to go back to just a
straightforward definition of conditional probability. First, &lt;span class=&#34;math inline&#34;&gt;\(P(X = x, Y = y)  = P(X = x) P(Y = y | X =
x)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;We now calculate these two quantities:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
P(X = x) &amp;amp;= P(A = x | h(A, B)) \\
&amp;amp;= \frac{P(A = x, h(A, B))}{P(h(A, B))} \\
&amp;amp;= \frac{P(A = x, h(A, B))}{Z} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
P(Y = y | X = x) &amp;amp;= P(B = y | A = x, h(A, B)) \\
&amp;amp;= \frac{P(B = y,  A = x, h(A, B))}{P(A = x, h(A, B))} \\
&amp;amp;= \frac{q(x, y) h(x, y)}{P(A = x, h(A, B))} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So then multiplying these together we get:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
P(X = x, Y = y)  &amp;amp; = P(X = x) P(Y = y | X = x) \\
&amp;amp; = \frac{P(A = x, h(A, B))}{Z} \frac{q(x, y) h(x, y)}{P(A = x, h(A,
B))} \\
&amp;amp; = \frac{q(x, y) h(x, y)}{Z} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;As desired.&lt;/p&gt;
&lt;p&gt;This result is practically trivial, and it’s not obvious a priori
that sampling this way is in fact any easier than the original
constrained sampling problem, but the observation of PDC is that
sometimes it is, and that when it is it can be a huge speed
improvement.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;I’m playing a bit fast and loose with random variables
here and just assuming you can take IID copies of any of them. Really
our “random variables” of interest are randomized programs.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Types of enjoyment</title>
    <link href="https://drmaciver.com/notebook/2025/08/types-of-enjoyment/" />
    <id>https://drmaciver.com/notebook/2025/08/types-of-enjoyment/</id>
    <updated>2025-08-26</updated>
    <content type="html">


&lt;p&gt;This post is inspired by a recent conversation with &lt;a href=&#34;https://contemplatonist.substack.com/&#34;&gt;Amber&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I was explaining the idea of Type 2 Fun&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; -
things that are only fun in retrospect - and in reflection from the
conversation I think I’ve decided that the concept is stupid.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;I hate the term, although it does at least have the
saving grace compared to many Type 1/2 distinctions that at least “Type
1” just means “the normal thing people mean by this word”.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The problem is quite straightforward: It implicitly conflates “fun”
with “something you enjoyed and want to do again”, and those are
obviously different things. People enjoy all sorts of strong emotions
all the time, and it doesn’t have to be fun in order for them to do so.
Fun is a very specific emotional response, and is only one among many
that people enjoy. I couldn’t - and don’t want to - draw a specific
boundary around what is and isn’t fun, but I do think for example that
“fun” has a sort of lightheartedness, perhaps an element of
exhilaration, to it that is not present in most forms of enjoyment.&lt;/p&gt;
&lt;p&gt;One of Amber’s examples was weight lifting. Weight lifting
&lt;em&gt;can&lt;/em&gt; be fun, but you can also enjoy it in other ways - it can be
satisfying, it can be energising without being fun, it can calm you down
when you’re angry. There are loads of other positive effects.&lt;/p&gt;
&lt;p&gt;A similar example for me is massage. Getting a massage is certainly
not fun.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt; A massage may or may not be pleasant
- there’s certainly a nice fluffy relaxing sort of massage you can get
that I’m sure some people enjoy a lot.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt; At
the moment I’m very into traditional Thai massage, which is a sort of
pressure-massage-meets-assisted yoga. Quoth my most recent masseuse
“…why do you like this? Nobody picks this one. People normally come to
us for oil massage. Doesn’t it hurt?”. Yes, of course it hurts. The
trick is not to mind. And I do enjoy getting a very heavy massage - Thai
or otherwise. It hurts, but it in a very satisfying way.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;I mean, ahem, depends on the type of massage. But the
type of massage I routinely get certainly isn’t.&lt;/p&gt;&lt;/aside&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;It mostly makes me grumpy.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I don’t think this is masochism, at least not exactly. It’s not the
fact that it hurts that I’m enjoying, but there’s a very no-pain-no-gain
feeling associated with it.&lt;/p&gt;
&lt;p&gt;Another example is very frustrating games. I recently played (the
first two parts) of &lt;a href=&#34;https://icely.itch.io/icwp-interactive&#34;&gt;Increasingly Cursed
Wordle&lt;/a&gt;. A huge part of the enjoyment of this game is the incredibly
angry noises you make when you figure out certain colours.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt;
These are noises of genuine anger, or at least irritation, and that is
part and parcel of the experiences of enjoyment.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;Purple/Green results in especially entertaining
diatribes.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Playing Upwords with my dad is similar. I’ve got a running joke that
every game of Upwords is unusually bad. Honestly I’ve never seen such an
awful board. Ugh, why do we play this game? And then we play it
again.&lt;/p&gt;
&lt;p&gt;In the moment none of these experiences are “fun”. They’re not fun in
retrospect either. But they are &lt;em&gt;satisfying&lt;/em&gt;, and that is the
experience that we are trying to get out of them.&lt;/p&gt;
&lt;p&gt;There are other ways to enjoy things than that too. For example,
people read incredibly depressing novels, or watch sad films. They may
end up sobbing at them! There might be some degree of satisfaction in
that, but if so it’s a very different sort than that you’ll get from
Increasingly Cursed Wordle or Upwords, which I think is different again
from the satisfaction you get from a massage.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-5&#34;&gt;&lt;a href=&#34;#fn-5&#34; id=&#34;fnref-5&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-5&#34; type=&#34;checkbox&#34;/&gt;
It’s an experience of catharsis perhaps.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-5-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;5 &lt;/span&gt;&lt;p&gt;I’m not sure about lifting weights. I think that’s
different again. Maybe a more similar example to lifting weights for me
is breath holding, which feels more like Slay the Spire or Upwords than
it does like a massage.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;“Interest” is another one. I once read “Atomic Accidents: A History
of Nuclear Meltdowns”, and although I’m somewhat reluctant to use the
word “enjoy” for it, I think it’s the right word.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-6&#34;&gt;&lt;a href=&#34;#fn-6&#34; id=&#34;fnref-6&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-6&#34; type=&#34;checkbox&#34;/&gt; The
book was horrifying and fascinating and I could not put it down.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-6-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;6 &lt;/span&gt;&lt;p&gt;Except for the radium chapter, which left me wanting to
hide under my desk and cry.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I think this generalises, and there are very few emotional
experiences that people &lt;em&gt;don’t&lt;/em&gt; enjoy in a safe environment. I
tried to come up with counterexamples - e.g. disgust seemed like an
obvious choice, but actually there are lots of ways people enjoy
disgust.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-7&#34;&gt;&lt;a href=&#34;#fn-7&#34; id=&#34;fnref-7&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-7&#34; type=&#34;checkbox&#34;/&gt; For example some people &lt;a href=&#34;/2022/04/delight-in-the-imperfect&#34;&gt;love sharing timezone
facts&lt;/a&gt;.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-7-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;7 &lt;/span&gt;&lt;p&gt;Only some of them sexual. e.g. a lot of people look at
things that gross them out. Although oddly I think in that case they
&lt;em&gt;are&lt;/em&gt; having fun.&lt;/p&gt;&lt;/aside&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;I hate the term, although it does at least have the
saving grace compared to many Type 1/2 distinctions that at least “Type
1” just means “the normal thing people mean by this word”.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;I mean, ahem, depends on the type of massage. But the
type of massage I routinely get certainly isn’t.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;It mostly makes me grumpy.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;Purple/Green results in especially entertaining
diatribes.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-5&#34;&gt;&lt;p&gt;I’m not sure about lifting weights. I think that’s
different again. Maybe a more similar example to lifting weights for me
is breath holding, which feels more like Slay the Spire or Upwords than
it does like a massage.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-5&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-6&#34;&gt;&lt;p&gt;Except for the radium chapter, which left me wanting to
hide under my desk and cry.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-6&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-7&#34;&gt;&lt;p&gt;Only some of them sexual. e.g. a lot of people look at
things that gross them out. Although oddly I think in that case they
&lt;em&gt;are&lt;/em&gt; having fun.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-7&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Notes on a slightly failed spellcrafting attempt</title>
    <link href="https://drmaciver.com/notebook/2025/08/notes-on-a-slightly-failed-spellcrafting-attempt/" />
    <id>https://drmaciver.com/notebook/2025/08/notes-on-a-slightly-failed-spellcrafting-attempt/</id>
    <updated>2025-08-25</updated>
    <content type="html">


&lt;p&gt;A concept I’ve found very useful in the past is what David Chapman
describes as velleity:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A “velleity” is a wish so weak that it does not occur to you to act
on it. These are desires you instantly dismiss because they do not match
your picture of what you think you want. They seem nonsensical,
unexpected, and do not fit into your plans. But they are shadow-tracks
of passions you do not know you have. Pursuing them, you will capture
your desire.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As &lt;a href=&#34;/2025/08/stable-attention-as-a-prerequisite-for-skill&#34;&gt;mentioned
in my last post&lt;/a&gt;, I’m struggling a bit with figuring out what it is I
actually want at the moment. Or, perhaps that’s not quite right, I know
what I want but it isn’t what I want to want and I’m looking for some
expansion.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Even there I’m not sure it’s &lt;em&gt;really&lt;/em&gt; what I
want. There’s definitely a desire to disappear off into a mathematics
hole but I’m not sure it manifests in a way that’s… a fully coherent set
of desires.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I thought I’d go on a velleity hunt, so I attempted the following
exercise:&lt;/p&gt;
&lt;p&gt;Take a blank piece of paper and at the top of it write “What do I
want?”&lt;/p&gt;
&lt;p&gt;Start writing a list of things. Whenever you get to the end, mentally
think “and…” and try to autocomplete it some more.&lt;/p&gt;
&lt;p&gt;When writing down things you want, be careful about shoulds. You’re
allowed to put down outcomes you want, that doesn’t mean you want the
action. e.g. my list ended up containing “for my room to be tidy” and
“to write more newsletter posts”. These are things I genuinely want.
Note it &lt;em&gt;doesn’t&lt;/em&gt; say “tidy my room”, or “write (some specific
newsletter post)”. At the moment I genuinely do want the outcomes, but
the actual specific actions required to achieve them don’t seem remotely
appealing.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;Actually having written that down I notice I &lt;em&gt;do&lt;/em&gt;
have some level of desire to clean my room. Not a lot, but some. I might
do five minutes or so after I finish writing this.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;In general, don’t write down things you don’t want, but do write down
things you &lt;em&gt;complicatedly&lt;/em&gt; want. It’s OK to want things and
decide not to do them, or not to do them yet, because you have other
competing wants or practical constraints.&lt;/p&gt;
&lt;p&gt;Anyway, I don’t want to say that this exercise was &lt;em&gt;bad&lt;/em&gt;
exactly. It prompted some useful introspection, but it was mostly kinda
sad and depressing if I’m honest. A lot of what I want right now is
apparently “be less burdened”, or “do things that distract me from
problems”, or “not need to keep doing specific things that distract me
from problems but seem net negative”. This is perhaps a useful insight
to have but lacks much in the way of positive direction.&lt;/p&gt;
&lt;p&gt;I suspect the exercise as designed is actually very poor for hunting
velleities, and the best way to find them starts from a process of
creation more than discovery. A prompt like “Here are some stupid things
I could do…” is more likely to find quiet desires hidden in the noise
than starting from a question like “What do I want?”, because the latter
risks the big things crowding out the small things.&lt;/p&gt;
&lt;p&gt;But I’ll save further experiments for another day.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Even there I’m not sure it’s &lt;em&gt;really&lt;/em&gt; what I
want. There’s definitely a desire to disappear off into a mathematics
hole but I’m not sure it manifests in a way that’s… a fully coherent set
of desires.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;Actually having written that down I notice I &lt;em&gt;do&lt;/em&gt;
have some level of desire to clean my room. Not a lot, but some. I might
do five minutes or so after I finish writing this.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Stable attention as a prerequisite for skill</title>
    <link href="https://drmaciver.com/notebook/2025/08/stable-attention-as-a-prerequisite-for-skill/" />
    <id>https://drmaciver.com/notebook/2025/08/stable-attention-as-a-prerequisite-for-skill/</id>
    <updated>2025-08-24</updated>
    <content type="html">


&lt;p&gt;As is traditional when trying to recover from a drought of writing,
I’m going to write about not writing.&lt;/p&gt;
&lt;p&gt;Specifically, my current difficulty with writing seems to be
primarily… what to write about.&lt;/p&gt;
&lt;p&gt;Some context: Part of why I’ve been having “difficulty writing” is
that over the last couple of months I’ve been very into mathematics. The
difficult thing hasn’t actually been writing. I’ve had very little
difficulty writing about mathematics, or figuring out new and
interesting bits of mathematics. Much of this hasn’t happened in
particularly public places, but it has happened.&lt;/p&gt;
&lt;p&gt;I think there are at least two reasons for this, but they happened at
the same time. One of them is that I’ve started a new job which very
much needs me to be good at maths, so I’ve been dusting off a lot of old
mathematical skills and applying them. This has been great,
honestly.&lt;/p&gt;
&lt;p&gt;The other reason is that at more or less the same time I started on
Wellbutrin. My initial experience of it was also pretty great, my
ongoing experience is… more mixed, but I think still positive.&lt;/p&gt;
&lt;p&gt;Whatever the reason, the last couple of months have seen me with a
&lt;em&gt;very&lt;/em&gt; strong preference for &lt;a href=&#34;/2023/08/two-types-of-work&#34;&gt;crunchy work over squishy
work&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Something I noticed almost immediately on starting it is that I lost
a skill, which is the ability to tell myself stories in my head. I
tend(ed) to do this a lot, especially when trying to fall asleep, and
within a few days of starting Wellbutrin it seemed nearly impossible to
do. I could start just fine - coming up with a premise for a story and
starting to tell it isn’t any more difficult, but the problem is that I
would lose the train of thought. I’d tell myself a story for a minute or
two, and then I’d start thinking about something else.&lt;/p&gt;
&lt;p&gt;Unfortunately being able to do something for only short snatches at a
time before losing the thread is pretty indistinguishable from not being
able to do the thing&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Especially when holding attention is the main point of
the activity, as it is when trying to use this to fall asleep.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Ironically I got distracted from writing this right after writing
that sentence. I’m trying to use a secondary anchor to keep focus, and
it is helping, but not perhaps as much as I’d like.&lt;/p&gt;
&lt;p&gt;I originally titled this post “Holding interest as a prerequisite for
skill”, but actually that’s not right. What’s needed is
&lt;em&gt;attention&lt;/em&gt;. Holding interest is one way to maintain attention,
but it’s not the only way. You should, ideally, be able to hold
attention on something regardless of whether you find it
interesting.&lt;/p&gt;
&lt;p&gt;And when you can’t, the skill usually falls apart. I think this is
the mechanism behind the “I can only do things I find interesting”
problem a lot of us with or vaguely in the direction of ADHD have, but I
think it’s a general phenomenon: If you want to be good at something,
you first need to be able to hold your attention on doing the thing.&lt;/p&gt;
&lt;p&gt;Some skills eventually you grow out of needing attention on them and
can do by rote, but most things will go better if you can pay attention
to them.&lt;/p&gt;
&lt;p&gt;This is true even for things that you &lt;em&gt;can&lt;/em&gt; do without paying
attention to. I’ve noticed, for example, that Pilates goes &lt;em&gt;much&lt;/em&gt;
better for me if I’m paying attention to the actual physical act I’m
performing and how it feels than it does if I’m designing algorithms in
my head. I’m often designing algorithms in my head anyway, so I’m not
all that good at Pilates. I can still do the exercises, but not
necessarily well. I do it anyway because doing Pilates badly is better
than not doing Pilates, but the difference is noticeable.&lt;/p&gt;
&lt;p&gt;I think part of the problem with the storytelling, and the writing,
is that as my brain went maths brained, there was no longer a thread of
interest holding my attention on the task, and as a result my mind
wanders off the idea whenever I try.&lt;/p&gt;
&lt;p&gt;I think there’s a motivation component to it too. Certainly part of
the problem is that I’m choosing not to write rather than just not
writing. But, at least in theory, &lt;a href=&#34;/2025/03/well-you-gotta&#34;&gt;I
can solve that problem&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I don’t have to want to write in order to write, but also it’s more
complicated than that. I &lt;em&gt;do&lt;/em&gt; want to write, I just don’t find
any particular thing I want to write appealling, but that doesn’t mean I
won’t appreciate the result in the end. I could choose to write, I just
need to be able to maintain the thread while doing so.&lt;/p&gt;
&lt;p&gt;I don’t quite know how one cultivates this skill of holding attention
without interest. Maybe it’s something meditation should help with (it
certainly sounds like it should be), but I suspect also it’s just a case
of doing the thing until it feels natural, so let’s see if some more
daily writing fixes it.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Especially when holding attention is the main point of
the activity, as it is when trying to use this to fall asleep.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Understanding through calculation</title>
    <link href="https://drmaciver.com/notebook/2025/06/understanding-through-calculation/" />
    <id>https://drmaciver.com/notebook/2025/06/understanding-through-calculation/</id>
    <updated>2025-06-01</updated>
    <content type="html">


&lt;p&gt;I’m in the process of trying to derust my maths skills, so I’m going
to try posting about mathematics every day for June and see if that
helps.&lt;/p&gt;
&lt;p&gt;One of the things I’ve been noticing with a lot of what I’ve been
reading (which has mostly been about probability) is that there are a
lot of points where you want to prove some result, and the way you do
that is just a bunch of algebra, and I tend to get… not exactly lost,
but unsatisfied. I can understand the calculation, and I could even
recreate it, but I don’t feel like I understand &lt;em&gt;why&lt;/em&gt; the result
is true more at the end than I did at the beginning.&lt;/p&gt;
&lt;p&gt;I pointed at part of this in &lt;a href=&#34;/2025/04/algebra-and-insight&#34;&gt;algebra and insight&lt;/a&gt;, where a
result that was very easy to prove through calculation became much
easier to understand by reformulating the problem with an insight.
Crucially, that insight &lt;em&gt;didn’t actually reduce the amount of
calculation&lt;/em&gt;, but it replaced a completely opaque calculation with
one that was more about confirming the insight actually worked.&lt;/p&gt;
&lt;p&gt;Thing is… I don’t think you can get away without doing any
uninformative calculations. Calculations are important, and sometimes
what you need is an actual concrete result, and you need to calculate to
do that. I think probably you can mine most calculations for insight,
but I don’t think there’s any particularly deep reason that &lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 = 318\)&lt;/span&gt;, that’s just what you
get when you run the calculation.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;This isn’t entirely true, as a whole bunch of mental
arithmetic comes down to breaking numbers down and seeing how they fit
together. For example, this one is clearly true because &lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 = 3 \times 100 + 3 \times 6 = 300 +
18 = 318\)&lt;/span&gt;. So it’s not that the insights don’t exist, it’s more
like the claim doesn’t feel like it needs justifying. The fact that
&lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 = 318\)&lt;/span&gt; is more or less
allowed to stand on its own. It still needs checking, and if I’d told
you for example that &lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 =
315\)&lt;/span&gt; you should immediately have a suspicious reaction to that,
so the true answer in some ways needs less insight than the false
answer. I’m not sure what point I’m making and I think I’m sortof
disagreeing with the main thrust of my argument at this point. I think
what I mean to say is that this sort of calculation is one you might
reasonably feel comfortable leaving insightless.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;But I ran into an interesting example in the opposite direction this
morning, where the key to understanding something that I’d been
struggling with because I lacked insight was just shut up and calculate,
and &lt;em&gt;after doing the calculation the result was obvious&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Here’s the problem:&lt;/p&gt;
&lt;p&gt;Suppose you’ve got some quantity &lt;span class=&#34;math inline&#34;&gt;\(\mu =
\sum\limits_{n \geq 0} \mu_n\)&lt;/span&gt;, and you have unbiased (but not
necessarily independent) estimators &lt;span class=&#34;math inline&#34;&gt;\(X_i\)&lt;/span&gt; for the summands, i.e. &lt;span class=&#34;math inline&#34;&gt;\(E(X_i) = \mu_i\)&lt;/span&gt;.How do you construct an
unbiased estimator for &lt;span class=&#34;math inline&#34;&gt;\(\mu\)&lt;/span&gt;?&lt;/p&gt;
&lt;p&gt;Here’s an easy version that I learned from &lt;a href=&#34;https://alexlew.net/&#34;&gt;Alex Lew&lt;/a&gt;’s PhD thesis.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;You’re going to be hearing about Alex a lot in these
posts I suspect, as a nontrivial amount of what I’m trying to do right
now is to mainline his entire body of work until I understand all the
bits of it I care about.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;First, take some random positive integer valued variable &lt;span class=&#34;math inline&#34;&gt;\(N\)&lt;/span&gt;, with &lt;span class=&#34;math inline&#34;&gt;\(P(N=n) = q(n)\)&lt;/span&gt;, such that &lt;span class=&#34;math inline&#34;&gt;\(q(n) &amp;gt; 0\)&lt;/span&gt; for all &lt;span class=&#34;math inline&#34;&gt;\(n \geq 0\)&lt;/span&gt;. Sample a value &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; from it, sample &lt;span class=&#34;math inline&#34;&gt;\(x_n\)&lt;/span&gt; from &lt;span class=&#34;math inline&#34;&gt;\(X_n\)&lt;/span&gt; and return &lt;span class=&#34;math inline&#34;&gt;\(\frac{x_n}{q(n)}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Why does this work? Well, it’s part of a general phenomenon of things
that work, called &lt;a href=&#34;https://en.wikipedia.org/wiki/Importance_sampling&#34;&gt;importance
sampling&lt;/a&gt; but we can do the calculation directly:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
E(\frac{X_N}{q(N)}) &amp;amp; = E(\sum\limits_{n} P(N = n) \frac{X_n}{q(n)})
\\
&amp;amp; = E(\sum\limits_{n} q(n) \frac{X_n}{q(n)}) \\
&amp;amp; = E(\sum\limits_{n} X_n) \\
&amp;amp; = \sum\limits_{n} E(X_n) \\
&amp;amp; = \sum\limits_{n} \mu_n \\
&amp;amp; = \mu \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Basically, dividing by &lt;span class=&#34;math inline&#34;&gt;\(q(n)\)&lt;/span&gt;
“cancels out” the frequency with which we sample &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;, and so as a result we get exactly the
expectation we want. I’m not sure how it looks to you, but for me this
calculation very much ends with me feeling like I get the result.&lt;/p&gt;
&lt;p&gt;Something Alex pointed out to me is that in the case we’re interested
in, you more or less have to evaluate the &lt;span class=&#34;math inline&#34;&gt;\(X_i\)&lt;/span&gt; in sequence.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;
This makes this method quite wasteful, because it ignores all of the
information you get from the first &lt;span class=&#34;math inline&#34;&gt;\(n -
1\)&lt;/span&gt; coefficients.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;Specifically they’re all unbiased estimators for &lt;span class=&#34;math inline&#34;&gt;\(Y^n\)&lt;/span&gt; for some random variable &lt;span class=&#34;math inline&#34;&gt;\(Y\)&lt;/span&gt;, and you calculate &lt;span class=&#34;math inline&#34;&gt;\(X_n\)&lt;/span&gt; from &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; independent draws of &lt;span class=&#34;math inline&#34;&gt;\(Y\)&lt;/span&gt;.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Instead, he pointed out that the following method works, which he
described as a “&lt;a href=&#34;https://en.wikipedia.org/wiki/Horvitz%E2%80%93Thompson_estimator&#34;&gt;Horvitz-Thompson
like estimator&lt;/a&gt;”:&lt;/p&gt;
&lt;p&gt;Draw &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; from &lt;span class=&#34;math inline&#34;&gt;\(N\)&lt;/span&gt;, sample &lt;span class=&#34;math inline&#34;&gt;\(x_i\)&lt;/span&gt; from &lt;span class=&#34;math inline&#34;&gt;\(i =
0, \ldots, n\)&lt;/span&gt;, and return &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 0}^n \frac{x_i}{P(N \geq
i)}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I’ve spent about a week stumped about why this works. I haven’t been
thinking about it constantly, but when I have I’ve been trying to gain
insight into it. In particular this is apparently understandable as an
application of Alex’s &lt;a href=&#34;https://arxiv.org/abs/2203.02836&#34;&gt;RAVI
framework&lt;/a&gt;&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt;, and I was very much failing to get
how that worked here.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;Which is still very much at the stage where I stare at
the calculations and Don’t Quite Get It for me. All of the pieces make
sense, but I haven’t got it to cohere into something I can actually use
yet.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;But this morning, I realised that if you frame it the right way
(which Alex had already more or less said and I’d failed to realise) you
can just shut up and calculate and it’s easy then.&lt;/p&gt;
&lt;p&gt;Here’s how it works: First, draw some random finite set of integers
&lt;span class=&#34;math inline&#34;&gt;\(S\)&lt;/span&gt;, according to whatever
distribution you like.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-5&#34;&gt;&lt;a href=&#34;#fn-5&#34; id=&#34;fnref-5&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-5&#34; type=&#34;checkbox&#34;/&gt; For our use case it will be &lt;span class=&#34;math inline&#34;&gt;\(S = \{0, \ldots, N\}\)&lt;/span&gt; but the result
doesn’t depend on that.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-5-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;5 &lt;/span&gt;&lt;p&gt;But, crucially, independently of the &lt;span class=&#34;math inline&#34;&gt;\(X_i\)&lt;/span&gt;.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Now, construct the random variable &lt;span class=&#34;math inline&#34;&gt;\(T =
\sum\limits_{i \in S} c_i X_i\)&lt;/span&gt; for some coefficients &lt;span class=&#34;math inline&#34;&gt;\(c_i\)&lt;/span&gt; that we’ll choose later. Now:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
E(T) &amp;amp;= E(\sum\limits_{i \in S} c_i X_i) \\
&amp;amp;= E(\sum\limits_{i \geq 0} 1_{i \in S} c_i X_i) \\
&amp;amp;= \sum\limits_{i \geq 0} E(1_{i \in S} c_i X_i) \\
&amp;amp;= \sum\limits_{i \geq 0} c_i E(1_{i \in S}) E(X_i)) \\
&amp;amp;= \sum\limits_{i \geq 0} c_i P(i \in S) \mu_i \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, in order to get &lt;span class=&#34;math inline&#34;&gt;\(E(T) = \mu\)&lt;/span&gt;,
we just have to pick &lt;span class=&#34;math inline&#34;&gt;\(c_i = \frac{1}{P(i \in
S)}\)&lt;/span&gt;. When we substitute in the choice &lt;span class=&#34;math inline&#34;&gt;\(S = \{0, \ldots, N\}\)&lt;/span&gt;, this gives us our
desired estimator.&lt;/p&gt;
&lt;p&gt;Again, I don’t know if you’ll feel the same way, but for me this
calculation is &lt;em&gt;extremely clear&lt;/em&gt;. I feel like I now get why this
estimator works, and it works precisely because the calculation says it
does. I think some of this is because I worked out the details for
myself, but I do also think that in some sense the calculation is both
clear and the only way that you can possibly get a result like this.&lt;/p&gt;
&lt;p&gt;I do feel like there’s still some need for insight there. For example
I think this would have been much less clear (although would have still
worked just fine) if I’d used the specific instance of the set based
random variable instead of the general one.&lt;/p&gt;
&lt;p&gt;There’s maybe also a little bit of a question of how you figure out
that such an estimator is reasonable in the first place. Guess and check
is a perfectly valid method, but it does feel a little bit unsatisfying.
On the other hand, I think given the linearity of expectation and the
law of conditional expectation, it’s pretty reasonable to expect that
&lt;em&gt;something&lt;/em&gt; like this would work, so I’m not sure.&lt;/p&gt;
&lt;p&gt;Either way, I think probably part of derusting my mathematics&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-6&#34;&gt;&lt;a href=&#34;#fn-6&#34; id=&#34;fnref-6&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-6&#34; type=&#34;checkbox&#34;/&gt; is going to be getting comfortable
with gaining understanding through calculation, and figuring out when
and how that works.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-6-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;6 &lt;/span&gt;&lt;p&gt;Actually I’m not sure this even counts as derusting. I
feel like calculation has always been the part of mathematics I was
worst at.&lt;/p&gt;&lt;/aside&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;This isn’t entirely true, as a whole bunch of mental
arithmetic comes down to breaking numbers down and seeing how they fit
together. For example, this one is clearly true because &lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 = 3 \times 100 + 3 \times 6 = 300 +
18 = 318\)&lt;/span&gt;. So it’s not that the insights don’t exist, it’s more
like the claim doesn’t feel like it needs justifying. The fact that
&lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 = 318\)&lt;/span&gt; is more or less
allowed to stand on its own. It still needs checking, and if I’d told
you for example that &lt;span class=&#34;math inline&#34;&gt;\(3 \times 106 =
315\)&lt;/span&gt; you should immediately have a suspicious reaction to that,
so the true answer in some ways needs less insight than the false
answer. I’m not sure what point I’m making and I think I’m sortof
disagreeing with the main thrust of my argument at this point. I think
what I mean to say is that this sort of calculation is one you might
reasonably feel comfortable leaving insightless.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;You’re going to be hearing about Alex a lot in these
posts I suspect, as a nontrivial amount of what I’m trying to do right
now is to mainline his entire body of work until I understand all the
bits of it I care about.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;Specifically they’re all unbiased estimators for &lt;span class=&#34;math inline&#34;&gt;\(Y^n\)&lt;/span&gt; for some random variable &lt;span class=&#34;math inline&#34;&gt;\(Y\)&lt;/span&gt;, and you calculate &lt;span class=&#34;math inline&#34;&gt;\(X_n\)&lt;/span&gt; from &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; independent draws of &lt;span class=&#34;math inline&#34;&gt;\(Y\)&lt;/span&gt;.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;Which is still very much at the stage where I stare at
the calculations and Don’t Quite Get It for me. All of the pieces make
sense, but I haven’t got it to cohere into something I can actually use
yet.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-5&#34;&gt;&lt;p&gt;But, crucially, independently of the &lt;span class=&#34;math inline&#34;&gt;\(X_i\)&lt;/span&gt;.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-5&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-6&#34;&gt;&lt;p&gt;Actually I’m not sure this even counts as derusting. I
feel like calculation has always been the part of mathematics I was
worst at.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-6&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>How to cook frozen chips</title>
    <link href="https://drmaciver.com/notebook/2025/05/how-to-cook-frozen-chips/" />
    <id>https://drmaciver.com/notebook/2025/05/how-to-cook-frozen-chips/</id>
    <updated>2025-05-04</updated>
    <content type="html">


&lt;p&gt;One of my… I don’t quite want to say guilty pleasures. Lazy foods,
comfort foods, something like that, is frozen chips. Or french fries if
you prefer. Or waffle fries. Really most sorts of frozen potato
product.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; Because I can’t eat wheat, they end
up being probably my second most common choice of carb after rice.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Frozen baked and roast potatoes don’t count and are
mostly disappointing. They’re not very good, and not that hard to do
from fresh. The only real advantage of them is that they keep forever,
which is admittedly a pretty big advantage when you want to improvise
something out of stores.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;One interesting thing about these products is that they are very much
a lazy meal, but they respond extremely well to a little bit of effort.
If you take the default path of just pouring them out from the bag into
the pan and putting them in the oven, you’ll get something a bit
disappointingly soggy. If you spend about 5 minutes of prep time, you
can get something genuinely very good.&lt;/p&gt;
&lt;p&gt;Here’s how to do it right:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;Place them individually in the pan so that they are well separated
with an air gap between each chip.&lt;/li&gt;
&lt;li&gt;Drizzle a bit of oil over them.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/li&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;It occurs to me on writing this that actually it would
be better to toss them in oil first. Slightly more &lt;a href=&#34;/2025/03/how-i-clean-my-kitchen-at-the-end-of-the-day&#34;&gt;washing up
to do&lt;/a&gt;, but probably worth it.&lt;/p&gt;&lt;/aside&gt;
&lt;li&gt;Sprinkle with salt.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;&lt;/li&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;Again, if tossing with oil, add the salt at that
point.&lt;/p&gt;&lt;/aside&gt;
&lt;li&gt;Cook them &lt;em&gt;for the amount of time it says on the packet&lt;/em&gt;, or
even slightly less.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You probably believe that the amount of cooking time on a chip packet
is almost always a lie and they need longer, and it is, but if they’re
properly separated then they cook more evenly and need less time, and if
you’ve added fat you’ve significantly improved the heat transfer rate.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt; If you do the usual thing of adding
10 minutes to the cooking time you’ll get burnt chips.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;I think the salt helps too because it draws moisture out
faster, but I’m not sure.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;This actually works even better if you use animal fats. For example,
we’ve got a large jar of duck fat that we keep in the fridge.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-5&#34;&gt;&lt;a href=&#34;#fn-5&#34; id=&#34;fnref-5&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-5&#34; type=&#34;checkbox&#34;/&gt; Yesterday I was making Leon’s waffle
fries,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-6&#34;&gt;&lt;a href=&#34;#fn-6&#34; id=&#34;fnref-6&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-6&#34; type=&#34;checkbox&#34;/&gt; and after appropriately separating
them out I put a tiny dollop of duck fat on each one. The results were,
frankly, spectacular. Perfectly crispy and with a much richer flavour
than they normally have, for very little extra effort.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-5-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;5 &lt;/span&gt;&lt;p&gt;Because we’re classy motherfuckers. Although honestly
for the amount you need to use of it it to get good results it’s
actually not that expensive. Price competitive with, say, olive oil.&lt;/p&gt;&lt;/aside&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-6-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;6 &lt;/span&gt;&lt;p&gt;To accompany a nice easy lazy meal of duck breast.
Classy. Motherfuckers.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I enjoy the contrast of this. There’s something very pleasing to me
about the ability to take something unfancy and make it slightly
fancier. I also like it because it’s a good example of how doing
something properly can make it much better for really not much
additional effort.&lt;/p&gt;
&lt;p&gt;I also enjoy it because I &lt;em&gt;really&lt;/em&gt; like crispy salty
potatoes.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Frozen baked and roast potatoes don’t count and are
mostly disappointing. They’re not very good, and not that hard to do
from fresh. The only real advantage of them is that they keep forever,
which is admittedly a pretty big advantage when you want to improvise
something out of stores.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;It occurs to me on writing this that actually it would
be better to toss them in oil first. Slightly more &lt;a href=&#34;/2025/03/how-i-clean-my-kitchen-at-the-end-of-the-day&#34;&gt;washing up
to do&lt;/a&gt;, but probably worth it.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;Again, if tossing with oil, add the salt at that
point.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;I think the salt helps too because it draws moisture out
faster, but I’m not sure.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-5&#34;&gt;&lt;p&gt;Because we’re classy motherfuckers. Although honestly
for the amount you need to use of it it to get good results it’s
actually not that expensive. Price competitive with, say, olive oil.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-5&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-6&#34;&gt;&lt;p&gt;To accompany a nice easy lazy meal of duck breast.
Classy. Motherfuckers.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-6&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>The wheel turns</title>
    <link href="https://drmaciver.com/notebook/2025/05/the-wheel-turns/" />
    <id>https://drmaciver.com/notebook/2025/05/the-wheel-turns/</id>
    <updated>2025-05-03</updated>
    <content type="html">


&lt;p&gt;Please note: This will contain some spoilers for the entire Wheel of
Time series of books and up to the end of Season 3 for the show.&lt;/p&gt;
&lt;p&gt;Some of my earliest memories of reading Proper Fiction are of the
Wheel of Time books by Robert Jordan.&lt;/p&gt;
&lt;p&gt;I’m not going to claim they’re great literature. I’m not even going
to claim they’re &lt;em&gt;good&lt;/em&gt; literature. I’ve tried rereading them as
an adult and just couldn’t. But as a kid they were definitely doing
something for me, above and beyond their key virtue of being long and
available in airports.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;I grew up in Saudi Arabia but came to England multiple
times per year, so my childhood involved a lot of flights.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;As a result, I’ve read these books a &lt;em&gt;lot&lt;/em&gt; over the years.
Certainly every book up to around… let’s say book 8 I think, I’ve read
multiple times. The Fires of Heaven, book 5, I believe I have read no
fewer than four times, but that was because it was the only book I had
with me in a very unpleasant situation, so I read it cover to cover
several times back to back as a form of very literal escapism. I don’t
think I’ve done that with any other book before or since.&lt;/p&gt;
&lt;p&gt;Also, notably, I couldn’t tell you a single thing about what happened
in The Fires of Heaven. I was going to say that this was because it was
one of the books where nothing happened, but &lt;a href=&#34;https://en.wikipedia.org/wiki/The_Fires_of_Heaven&#34;&gt;looking it up
on Wikipedia&lt;/a&gt; I’m not sure that’s true. A bunch of quite notable
things happen in it. Probably the real reason why I don’t remember it
very well is because I read it in 1993 and that was, allegedly, quite
some time ago.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;I’m actually a little confused by this chronology
because I don’t see how the events in question could have occurred in
1993, and 1994 seems much more plausible, but I was reading a hardcover
copy of The Fires of Heaven for the first time, which was presumably
around when it came out in 1993. But maybe this was the lag of books
making it over to the UK back when the delays were longer or
something.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I feel like this series was a sufficiently big part of my childhood
that I should have more memories tied up in it, but I don’t really.
Fragments of conversations about it with friends and family as kids come
to mind (including several about how weird Robert Jordan was about
girls), and an early realisation about differences in visualisation
ability from talking to a childhood friend about our respective attempts
to recreate the flame and the void exercise.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;I never did manage to figure out how to channel
though.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Anyway, I was pretty excited about the TV show, though I tried to
temper that down to cautiously optimistic.&lt;/p&gt;
&lt;p&gt;My emotions since have been… mixed.&lt;/p&gt;
&lt;p&gt;They’ve made a bunch of changes to the books and I think that this is
mostly good. I’m a little irked by some of them - for example, I think
giving Perrin a wife only to fridge her in the first episode in order to
give him a more tragic backstory was extremely Not On. I also felt like
they worked a bit too hard on giving Mat a tragic backstory. And I’m not
sold on the new backstory for Nynaeve either.&lt;/p&gt;
&lt;p&gt;In general, it feels like… they didn’t like how protagonisty Rand
was, and they felt the need to make everyone else have more protagonist
energy in order to make the whole show more of an ensemble show than it
would naturally be (which matches how the books are later, but early on
Rand is definitely The Protagonist), and I’m not sure that really
improved things.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;I think it especially didn’t improve things for Nynaeve,
who is incredibly well cast and didn’t really need the extra support.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;This also shows up in the whole “we don’t know which one of them is
the dragon” thing. I thought it was an interesting conceit, but also it
didn’t work. I particularly think that “We don’t know if the dragon will
be a man or a woman” part really is too big a departure from the books
and ruins a lot of the worldbuilding such as e.g. the role of the Red
Ajah. Some of this is an attempt to update the gender politics of the
books to be less… Robert Jordan… and I generally approve of that, but I
think there’s a tricky balance to be struck there.&lt;/p&gt;
&lt;p&gt;You could see the discomfort with Rand as protagonist play out
particularly badly in the end of Season 2 where they basically felt the
need to give everyone a participation trophy. The big battle scene at
Falme was… incredibly weak, and lacked any of the drama of the books.
Frankly, I hated the ending of Season 2, and that’s part of why I took
so long to start on Season 3. I’d given them a pass for Season 1 ending
so badly, which was apparently mostly due to COVID, but Season 2 was
them writing a season ending without those problems and the result was…
extremely mediocre.&lt;/p&gt;
&lt;p&gt;I think one thing this emphasised for me is that I do have a nagging
feeling that the showrunners don’t really understand what was good about
Robert Jordan’s writing. That’s understandable. I don’t really
understand what was good about Robert Jordan’s writing, and I used to
consider myself a big fan, but I think the contrast with the show has
actually helped me understand that.&lt;/p&gt;
&lt;p&gt;And I think one thing that Robert Jordan &lt;em&gt;was&lt;/em&gt; very good at
was endings. Many or most of his books have big dramatic endings that
have both major plot impact and a real sense of grandeur to them. The
season endings so far… didn’t. The season 3 ending is much better than 1
or 2, but even that it feels like it was a bit lacking.&lt;/p&gt;
&lt;p&gt;Anyway, Season 3 makes some pretty dramatic changes from the books,
partly in that it mostly follows book 4 and skips book 3 (presumably to
incorporate it more into season 3), and I think that’s great. I’m
actually a huge fan of most of the changes.&lt;/p&gt;
&lt;p&gt;One of the big things that I feel like we’re starting to see is that
they’re pruning plotlines. For example, there’s an entire plotline with
Siuan Sanche post-stilling that got um… quite aggressively pruned, and I
think the series is stronger for it. I think ditching the Choedan Kal
(the giant sa’angreal) is a great choice.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-5&#34;&gt;&lt;a href=&#34;#fn-5&#34; id=&#34;fnref-5&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-5&#34; type=&#34;checkbox&#34;/&gt;
This is I think really good, because one of the big problems Robert
Jordan had as a writer was that he was absolutely incapable of doing
that. Every plotline spawned two more plotlines, and a lot of why the
books turned glacial as he wrote more and more of them was that there
was too much going on for each book.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-5-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;5 &lt;/span&gt;&lt;p&gt;And not just because I think Callandor deserves
better.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I’m not so sure about the change to Nynaeve overcoming her block this
early on,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-6&#34;&gt;&lt;a href=&#34;#fn-6&#34; id=&#34;fnref-6&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-6&#34; type=&#34;checkbox&#34;/&gt; but mostly because of the degree it
required Leandrin to be holding the idiot ball to set it up.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-6-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;6 &lt;/span&gt;&lt;p&gt;In the books, that’s book 7.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Another change I’m cautiously a fan of is the Aviendha/Elayne
relationship. I actually quite like that one of my formative series as a
kid had… actually reasonably healthy depictions of poly relationships,
even if they were much more along the lines of a very heterosexual
polygamous / harem fantasy,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-7&#34;&gt;&lt;a href=&#34;#fn-7&#34; id=&#34;fnref-7&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-7&#34; type=&#34;checkbox&#34;/&gt; and I like that that’s
potentially better balanced out in the series.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-8&#34;&gt;&lt;a href=&#34;#fn-8&#34; id=&#34;fnref-8&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-8&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-7-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;7 &lt;/span&gt;&lt;p&gt;Though often reverse harem too! I don’t think it’s
literally canon that the green ajah and their warders were often in
relationships, but even if they weren’t literally having sex it’s very
much a poly life partnership.&lt;/p&gt;&lt;/aside&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-8-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;8 &lt;/span&gt;&lt;p&gt;Although I’m a little concerned that they’re just going
to pair people up and Rand will only end up with one of them. Certainly
it seems like Mat and Min are getting paired up. Rand, Aviendha, and
Elayne, seems like a plausible triad though given the Aiel traditions.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Anyway, Season 3 has definitely restored me to my cautious optimism.
I still don’t think that this series is &lt;em&gt;great&lt;/em&gt;, but it’s
starting to manage to be a meaningful improvement on the source
material, which is how I felt it might turn out at the beginning of
Season 1 and didn’t really feel throughout most of Season 2. As a
result, I find myself actually looking forward to Season 4.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;I grew up in Saudi Arabia but came to England multiple
times per year, so my childhood involved a lot of flights.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;I’m actually a little confused by this chronology
because I don’t see how the events in question could have occurred in
1993, and 1994 seems much more plausible, but I was reading a hardcover
copy of The Fires of Heaven for the first time, which was presumably
around when it came out in 1993. But maybe this was the lag of books
making it over to the UK back when the delays were longer or
something.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;I never did manage to figure out how to channel
though.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;I think it especially didn’t improve things for Nynaeve,
who is incredibly well cast and didn’t really need the extra support.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-5&#34;&gt;&lt;p&gt;And not just because I think Callandor deserves
better.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-5&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-6&#34;&gt;&lt;p&gt;In the books, that’s book 7.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-6&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-7&#34;&gt;&lt;p&gt;Though often reverse harem too! I don’t think it’s
literally canon that the green ajah and their warders were often in
relationships, but even if they weren’t literally having sex it’s very
much a poly life partnership.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-7&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-8&#34;&gt;&lt;p&gt;Although I’m a little concerned that they’re just going
to pair people up and Rand will only end up with one of them. Certainly
it seems like Mat and Min are getting paired up. Rand, Aviendha, and
Elayne, seems like a plausible triad though given the Aiel traditions.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-8&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>No</title>
    <link href="https://drmaciver.com/notebook/2025/05/no/" />
    <id>https://drmaciver.com/notebook/2025/05/no/</id>
    <updated>2025-05-02</updated>
    <content type="html">


&lt;p&gt;People often talk about needing to be better at saying no.&lt;/p&gt;
&lt;p&gt;This is treated as a monolithic skill or general character trait, but
I think this might be another &lt;a href=&#34;/2022/05/victims-of-metonymy&#34;&gt;victim of metonymy&lt;/a&gt;, and there
are actually a number of very different circumstances under which you
might need to learn this skill. For example, here are a few:&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Claude helped with some of these, but I deleted about
50% of its suggestions and edited most of the rest.&lt;/p&gt;&lt;/aside&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;Saying no to someone who has authority and will legitimately
pressure you to say yes.&lt;/li&gt;
&lt;li&gt;Saying no to someone who has authority but does actually want you to
say no if you can’t do the thing but you’re afraid to disappoint
them.&lt;/li&gt;
&lt;li&gt;Saying no to things that you do want to do when you’re too tired to
do them.&lt;/li&gt;
&lt;li&gt;Saying no when you really don’t want to do a thing but know the
person who would do it instead also doesn’t want to do the thing.&lt;/li&gt;
&lt;li&gt;Saying no to a friend who consistently asks for favors but rarely
reciprocates.&lt;/li&gt;
&lt;li&gt;Saying no to family members who expect you to participate in
traditions that you no longer feel comfortable in.&lt;/li&gt;
&lt;li&gt;Saying no to a romantic partner who wants to move faster in the
relationship than you’re comfortable with.&lt;/li&gt;
&lt;li&gt;Saying no to a project at work that you could help on but isn’t what
you want to be doing.&lt;/li&gt;
&lt;li&gt;Saying no to a child who wants something that isn’t good for them,
despite tears.&lt;/li&gt;
&lt;li&gt;Saying no to participating in gossip or conversations that make you
uncomfortable.&lt;/li&gt;
&lt;li&gt;Saying no to a request that you think is unethicaly.&lt;/li&gt;
&lt;li&gt;Saying no to requests for information that feel inappropriate..&lt;/li&gt;
&lt;li&gt;Saying no to taking on additional responsibilities when others
aren’t doing their share.&lt;/li&gt;
&lt;li&gt;Saying no to providing help when you are legitimately the best
person to do it but don’t have the capacity to do so right now.&lt;/li&gt;
&lt;li&gt;Saying no to providing help when you are legitimately the best
person to do it when you could do it but really don’t want to.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For me, I’m pretty good at saying no in circumstances where I’m
really over capacity, especially if I don’t particularly care about the
asker. I’m also good at saying no even when there’s a power
gradient.&lt;/p&gt;
&lt;p&gt;However, I’m &lt;em&gt;very bad&lt;/em&gt; at saying no to doing something when
someone I care about would have to do it instead and also clearly
doesn’t want to do it.&lt;/p&gt;
&lt;p&gt;In some sense, I endorse being bad at that, you &lt;em&gt;should&lt;/em&gt; do
things for people you care about, but also that caring is (hopefully)
reciprocated, and you should let them do that for you too, and that’s
the part I’m bad at letting (or encouraging to) happen. Also you’ll
often end up in specific instances where &lt;a href=&#34;/2025/03/well-you-gotta&#34;&gt;someone’s gotta&lt;/a&gt; and sometimes it’s
easier to just do the thing than navigate who that someone should
be.&lt;/p&gt;
&lt;p&gt;Regardless though, this feels like a much more specific problem to
engage with, for at least two reasons:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;You can look at a specific circumstance and actually engage with the
concrete feelings around it much better than you can a sort of vague
“I’m bad at saying no”.&lt;/li&gt;
&lt;li&gt;You can ask for help on specific circumstances, especially recurring
ones, in a way that you can’t with the general. Rather than “I need to
get better at saying no”, you can start with “I need to ask for help
here”, and it’s a concrete enough problem that help will hopefully be
forthcoming.&lt;/li&gt;
&lt;/ol&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Claude helped with some of these, but I deleted about
50% of its suggestions and edited most of the rest.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Studying specifics</title>
    <link href="https://drmaciver.com/notebook/2025/05/studying-specifics/" />
    <id>https://drmaciver.com/notebook/2025/05/studying-specifics/</id>
    <updated>2025-05-01</updated>
    <content type="html">


&lt;p&gt;There’s something I deeply believe, and only very erratically manage
to follow through on, which is that there’s a huge amount to be learned
by studying something more than it seemingly warrants. This is in some
sense the core of the post &lt;a href=&#34;/2020/09/overthinking-overthinking&#34;&gt;Overthinking overthinking&lt;/a&gt;
which is what created the “Overthinking Everything” name that I now use
for my newsletter and community.&lt;/p&gt;
&lt;p&gt;One core reason for this is &lt;a href=&#34;/2020/03/seeking-out-existence-proofs-in-everyday-life&#34;&gt;existence
proofs&lt;/a&gt;. If you put more effort into solving a problem than it really
warrants, you’ve now demonstrated that that problem &lt;em&gt;was&lt;/em&gt;
solvable, and you can potentially use that solution in other cases,
gradually reducing its effort.&lt;/p&gt;
&lt;p&gt;I think this relates to one of my points in &lt;a href=&#34;/2025/04/heavy-up-front-learning-requirements&#34;&gt;Heavy up front
learning requirements&lt;/a&gt;, which is that it’s worth spending some time
heavily studying skills you use regularly, even ones that don’t seem
like they need it. Sometimes just by really levelling up one specific
task, you should be able to learn generalisable lessons.&lt;/p&gt;
&lt;p&gt;The problem is of course… how do you actually do this? How do you
pick what specifics to study?&lt;/p&gt;
&lt;p&gt;One part of the answer is to just do which ones bring you joy, but I
think there’s a key problem with this: The specific prescription is to
study something &lt;em&gt;more than it warrants&lt;/em&gt;. If it brings you joy to
study it, hopefully you’re already using that joy to prompt you to spend
more time on it.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Right? Right?? Um, OK, this theory might have some
problems.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;You could study everything more than it warrants, but then you
rapidly hit resource constraings. Where are you going to find time for
that?&lt;/p&gt;
&lt;p&gt;I think this is, often, the bottleneck on the joy version too: There
are many things that if &lt;a href=&#34;/2022/01/relearning-curiosity&#34;&gt;you just
followed your curiosity&lt;/a&gt; you’d find would bring you joy, but there
are &lt;em&gt;too many things&lt;/em&gt;, and as a result you do none of them.&lt;/p&gt;
&lt;p&gt;Instead, a better solution I think is to pick arbitrarily and
capriciously. Perhaps, ideally, at random from those that you think seem
like they would be interesting to do.&lt;/p&gt;
&lt;p&gt;One of my recurring fantasy scenarios is what I’d do with an
improbably large amount of money, and one of the regular projects I
think about is just randomly sampling a few hundred people from the
population and giving them near unlimited healthcare - extensive
investigations of anything that’s a problem for them, suitable
interventions (erring on the side of cheap and low risk ones), and then
studying the data from that extensively to learn useable lessons for the
broader population.&lt;/p&gt;
&lt;p&gt;This strikes me as the right sort of general tool: By sampling
randomly from the set of places you &lt;em&gt;could&lt;/em&gt; intervene, you learn
plenty of things that will generalise out of that.&lt;/p&gt;
&lt;p&gt;I don’t yet have a very good idea of how to implement this
though.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Right? Right?? Um, OK, this theory might have some
problems.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Heavy up front learning requirements</title>
    <link href="https://drmaciver.com/notebook/2025/04/heavy-up-front-learning-requirements/" />
    <id>https://drmaciver.com/notebook/2025/04/heavy-up-front-learning-requirements/</id>
    <updated>2025-04-30</updated>
    <content type="html">


&lt;p&gt;So, Dave and I went to Cambridge recently to visit Dani Clode at the
neuroplasticity lab. She developed a device called &lt;a href=&#34;https://www.daniclodedesign.com/thethirdthumb&#34;&gt;the third
thumb&lt;/a&gt;, which is pretty much what it sounds like - it’s an extra
thumb you can attach to your hand on the opposite side of your normal
thumb.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/images/third-thumb.jpg&#34;/&gt;&lt;/p&gt;
&lt;p&gt;It’s designed specifically as an augmentation, not a prosthesis,
which I thought was an interesting choice. The difference is essentially
that it’s not designed to exactly mimic a biological thumb, but instead
has a couple of adjustments that are there to help you use it in ways
that you wouldn’t normally use a thumb. e.g. they’ve got an example of
essentially wrapping the thumb around a bottle while you twist the cap
on and off with your hand.&lt;/p&gt;
&lt;p&gt;One of the things that was interesting about it was that it was just
very hard to use.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; I was starting to get the hang of it
by the end, but I was just constantly dropping things or holding them in
weird ways that didn’t make much sense and often didn’t even actually
use the third thumb. Some of that is just that it’s foot controlled,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt; vnd I don’t have very good foot
control, but I think a lot of it’s just that it is genuinely quite
unintuitive. Dani told us that they’ve got a week-long training course
that they run with these to show people how to use them, and people
usually have the hang of it by the end of the week.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;For me. Dave found it very natural&lt;/p&gt;&lt;/aside&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;You get two degrees of freedom. One with your left foot
to move the thumb up and down, and one with your right foot which you
use to grip.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;And I thought that was pretty interesting in its own right, because
it’s fairly rare that I encounter a new sort of device that requires
this much training to use. Implicitly, you do have that much training in
how to use a keyboard or how to use a mouse but particularly with the
keyboard example, there’s an easy onboarding route, you can always hunt
and peck, right? It’s not that you need a huge amount of training in
order to be able to use the keyboard at all. It’s that there is a
fluency that you acquire through time and practice, but the baseline
level of disfluency is still pretty effective.&lt;/p&gt;
&lt;p&gt;The third thumb wasn’t like that at all. I was making a complete mess
of things, as early on there is no equivalent to hunt and peck, and my
ability to do things was made strictly worse by using the third thumb.
You have to just have to figure out how to use it before it’s anything
other than in the way. Now, we were not encountering it in the proper
training setting, so this is very much not me saying that the third
thumb is not a usable object, I’m saying that there is an effort
required to onboard to using it it, and this is just an interesting
contrast with most of the devices that we encounter.&lt;/p&gt;
&lt;p&gt;Dave and Lisa are currently learning to drive, which seems in some
ways like a good analogy to that, in that there isn’t an easy onboard to
learning to drive. But honestly this is partly because there is a high
safety requirement, and partly because you need to not just know how to
use the car you need to know how to use it in a way that is predictable
to others. You could learn to drive by just messing around in a car and
seeing how that works. There’s nothing that in theory stops you from
doing this, and presumably many early car users did learn to drive this
way - formal licensing of drivers is a much more modern form than the
car itself - but regardless of how artificial the gap is there’s still
this sort of onboarding requirement.&lt;/p&gt;
&lt;p&gt;In contrast, the most transformative technology I can think of that’s
happened to me in recent years is still the smartphone.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;
Certainly this is probably the biggest example of augmentation in our
day-to-day lives. But the smartphone is very much not like a third thumb
or a car. It is designed with continuity to the mobile phone from
before, which is designed for continuity with previous devices, and it’s
designed to be easy for kids to pick up,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt; and
is generally a fairly gentle onboarding process. Although your use of it
will improve with practice, you don’t really have to spend a whole bunch
of time sitting down with your smartphone and trying to figure out how
to use it before it’s useful, instead it starts useful and becomes more
useful over time.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;I know that’s not that recent anymore but I can’t think
of anything as big since. AI isn’t there yet.&lt;/p&gt;&lt;/aside&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;Too easy if anything.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;And it seems to me like there’s this split of how much effort you
have to invest in before you know how to use a particular type of
technology. It’s not exactly shallow vs steep learning curves, so much
as it’s about time to first usefulness. There can be a lot of depth to
learning a new technology, but if it’s rewarding from early on then it
will be a very different experience from something with a high up front
cost, and I feel like we’ve gotten very used to the idea that everything
should be more like the smartphone than the third thumb.&lt;/p&gt;
&lt;p&gt;This does on some level make sense of course. In some sense it’s
clearly better to have this than not, right? It’s much more rewarding to
immediately be able to use a thing and work from there to improve it
than it is to have to invest a whole bunch of effort into something that
isn’t useful until you spend that effort.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-5&#34;&gt;&lt;a href=&#34;#fn-5&#34; id=&#34;fnref-5&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-5&#34; type=&#34;checkbox&#34;/&gt;,
but it seems like there’s limitations to that approach where not all
things &lt;em&gt;can&lt;/em&gt; work like that, and that up front investment feels
extremely daunting and unwelcome.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-5-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;5 &lt;/span&gt;&lt;p&gt;In that it turns learning it into an &lt;a href=&#34;/2025/04/anytime-projects&#34;&gt;anytime project&lt;/a&gt;&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Part of why I care about this is that one of the things I like about
the third thumb is that I do have a pervasive sense that the world
should be weirder than it is. I think this is partly just my “where’s my
flying car” instinct. I do have a sort of very science fiction type
attachment to the idea that you can expand human capabilities, and feel
like it’s a shame that we’ve largely not gone down that route and
instead just embraced phones as a shitty ad-supported version of our
cyborg future.&lt;/p&gt;
&lt;p&gt;I don’t know how you would ever make physical augmentation useful
from day one, because it’s such a fundamental change to your way of
being in the world. In sensory augmentation, maybe, something like &lt;a href=&#34;https://web.archive.org/web/20240229152043/http://sensebridge.net/projects/northpaw/order/&#34;&gt;the
North Paw&lt;/a&gt; is a good example. Because it’s just providing you
feedback. You can consciously interpret that feedback and gradually you
internalize it over time. But something like the third thumb or
prehensile tail, I don’t know how well you can possibly make that an
incremental approach, and as a result this attachment to easy learning
experiences feels like a limitation on human progress.&lt;/p&gt;
&lt;p&gt;I’ve often thought that there just is a lot of sort of missing space
in the range of UIs that we try out. And some of that is many of the
alternatives we tried out just aren’t very good. You can sort of see
this with VR where it turns into, like, turned out to be like a quite
limited paradigm that we still haven’t figured out how to use well. But
I was really interested in the idea of using the Kinect or Leap Motion
as styles of interaction with a computer and doesn’t seem to have turned
out that way, and I don’t think that was just the limitations of the
technology, I think it was the degree to which it required both the
users and the developers to actually learn something new.&lt;/p&gt;
&lt;p&gt;And I think these sorts of cliffs where you have to do active
training are part of that. I think people have gotten as used to the
idea that UI should be seamless and intuitive as they are used to the
idea that websites should be free and that seems like a shame.&lt;/p&gt;
&lt;p&gt;Another problem with this is that even things where you don’t have to
invest this sort of trained skill practice into, I bet we would actually
benefit from deliberate practice. I bet actually, if I spent a week
studying how to better use my smartphone and better fit it into my life,
I probably would figure out important and interesting things about how
to use it.&lt;/p&gt;
&lt;p&gt;I think something I notice is that there is a general lack of
deliberate practice for our everyday tools and habits built into life,
and it seems like we are missing something as a result.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;For me. Dave found it very natural&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;You get two degrees of freedom. One with your left foot
to move the thumb up and down, and one with your right foot which you
use to grip.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;I know that’s not that recent anymore but I can’t think
of anything as big since. AI isn’t there yet.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;Too easy if anything.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-5&#34;&gt;&lt;p&gt;In that it turns learning it into an &lt;a href=&#34;/2025/04/anytime-projects&#34;&gt;anytime project&lt;/a&gt;&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-5&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Where are your limits?</title>
    <link href="https://drmaciver.com/notebook/2025/04/where-are-your-limits/" />
    <id>https://drmaciver.com/notebook/2025/04/where-are-your-limits/</id>
    <updated>2025-04-29</updated>
    <content type="html">


&lt;p&gt;A recurring theme recently has been doing things because they need to
doing, regardless of whether you currently feel like doing them.&lt;/p&gt;
&lt;p&gt;I’ve got some pushback on this, especially on using &lt;a href=&#34;/2025/03/necessity-creates-possibility&#34;&gt;this daily writing
habit&lt;/a&gt; as an example, particularly around how “need” is fake.&lt;/p&gt;
&lt;p&gt;And it’s true. Need is in some sense fake. You can always skip the
dishes and let them pile up in a festering heap, rendering your kitchen
ever more difficult to use. &lt;a href=&#34;/2024/09/using-what-youre-given&#34;&gt;You can always let the apples
rot&lt;/a&gt;. There’s very little you &lt;em&gt;need&lt;/em&gt; to do in the sense that
it is a logical necessity that you must do it.&lt;/p&gt;
&lt;p&gt;But on the other hand, there are a lot of things that you should, on
balance, choose to do, and being able to bind your future self to that
path, and to be beholden by the commitments of your past self, is often
going to go far better for you than not doing it. I might not want to do
the dishes now, but future me would much rather that present me had, and
even present me will probably feel better for doing it once I get over
the initial hump. Being useful feels better than not being useful, most
of the time.&lt;/p&gt;
&lt;p&gt;But do I need to keep writing every day? Probably not. The biggest
problem I had writing today was when figuring out what to write about
was &lt;a href=&#34;/2025/04/motivation-gradients&#34;&gt;once again&lt;/a&gt; asking myself
the question: Well, what am I writing for? If I don’t really know why
I’m writing, it doesn’t really matter what I write about.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;This continues to be a &lt;a href=&#34;https://drmaciver.substack.com/i/60442550/which-way-should-i-go&#34;&gt;singularly
unhelpful&lt;/a&gt; answer.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;In some sense, the reason why I’m writing is that I am writing is
because writing every day is a good way to discover interesting things
and articulate things you otherwise wouldn’t have articulated. This is a
true and important reason and is a key part of why my past self decided
to do it. But right now I don’t feel like I care about that.&lt;/p&gt;
&lt;p&gt;The reason I am writing is because I’ve decided that I write every
day. Eventually that will stop being enough, but right now it still
is.&lt;/p&gt;
&lt;p&gt;But I think there’s a question of… OK, past you has decided that
you’re going to do a thing, or present you believes that you need to do
a thing. When are they wrong?&lt;/p&gt;
&lt;p&gt;One of my failure modes is that &lt;a href=&#34;/2022/01/wanting-to-help&#34;&gt;I’m not good enough at asking for
help&lt;/a&gt;, and one of the ways this shows up is that if I’ve decided that
I need to do a thing, I will usually do the thing.&lt;/p&gt;
&lt;p&gt;Part of this is that &lt;a href=&#34;/2021/10/a-simple-model-of-depression-and-depressive-realism&#34;&gt;depression
is a bias towards inaction&lt;/a&gt;, and doing more than you feel like you
can helps drag your way out of depression. So I legitimately don’t trust
the feeling that something is too hard or too much, and I will generally
feel better for doing it.&lt;/p&gt;
&lt;p&gt;…except when I don’t. Because sometimes it’s actually a bad idea for
me to do the thing, and I should make an exception.&lt;/p&gt;
&lt;p&gt;I made an exception for daily writing over Easter weekend and that
felt like the right thing to do.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;I’m actually not sure that it was! I do feel like I’ve
taken a significant hit to the habit since returning. But on balance it
was still probably correct.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Sometimes I have to be chased out of the kitchen because I’m clearly
wobbling when I try to stand up and someone else should do the dishes.
Sometimes everyone’s in this state and we have to admit that OK the
dishes &lt;em&gt;can&lt;/em&gt; be done tomorrow.&lt;/p&gt;
&lt;p&gt;The question, I think, is when you should make these sorts of
exceptions.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://jml.io/galahad-principle/&#34;&gt;The Galahad Principle&lt;/a&gt;
says you shouldn’t make any exceptions! But I think that we can weasel
our way out of them by saying that the thing we’re committing to 100% on
is no &lt;em&gt;unprincipled&lt;/em&gt; exceptions. Act only according to exceptions
that you would be willing to universalise. That is, if you made an
exception in every case like this, would that be OK?&lt;/p&gt;
&lt;p&gt;I don’t think this is quite sufficient though. Sometimes you
experience genuine changes. If I were to lose my ability to type for
whatever reason,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt; I’d probably stop the daily writing,
and that seems legitimate but also does call into question the
“necessity” of doing it.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;Which would be very bad for dayjob reasons.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;So I think as well as the ability to make exceptions you need to find
out where your limits are, and learn what to do about them. It’s not
always to accept them. Sometimes you &lt;em&gt;do&lt;/em&gt; just &lt;a href=&#34;/2024/01/how-to-be-better-at-everything&#34;&gt;need to work
harder&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But sometimes you need to acknowledge that the part of you that was
saying that this was too hard was right, and actually decide that some
things don’t need doing and change your commitments accordingly.&lt;/p&gt;
&lt;p&gt;Not today though.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;This continues to be a &lt;a href=&#34;https://drmaciver.substack.com/i/60442550/which-way-should-i-go&#34;&gt;singularly
unhelpful&lt;/a&gt; answer.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;I’m actually not sure that it was! I do feel like I’ve
taken a significant hit to the habit since returning. But on balance it
was still probably correct.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;Which would be very bad for dayjob reasons.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Motivation gradients</title>
    <link href="https://drmaciver.com/notebook/2025/04/motivation-gradients/" />
    <id>https://drmaciver.com/notebook/2025/04/motivation-gradients/</id>
    <updated>2025-04-28</updated>
    <content type="html">


&lt;p&gt;There’s a type of depression that I’ve written about before where it
feels like a restriction of the possible. You want to do normal things,
but doing them feels completely impossible, even when in a more literal
sense it’s perfectly possible to do them.&lt;/p&gt;
&lt;p&gt;But there’s another type where everything just feels sortof flat.
It’s not actually difficult to do things - there’s not much internal
resistance per se, but there’s also no ability to orient. The feeling is
not “I can’t do things”, but “I can do things, but why would I do this
thing in particular?”. When presented with any particular choice of
writing topic, the bit where interest or disinterest would be responds
as a sort of emptiness. It’s not an unwillingness to do the thing, it’s
more like a total directionless neutrality on the subject.&lt;/p&gt;
&lt;p&gt;Anyway this is what I’m feeling about writing right at this minute,
so I’m just writing down the phenomenology of what I’m currently
experiencing, because that seems like a good default.&lt;/p&gt;
&lt;p&gt;One of the interesting things is that I’d lost my pad of writing
ideas.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; I initially thought this might be
the source of the problem, so I tried to generate some more ideas, and I
didn’t actually find it very hard to generate a new list of ideas. Many
of them are ones that I abstractly recognise would be good to write
about, but I look at them and try to imagine writing about them right
now the answer is still that empty sort of why.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Bad labelling and organisation on my part got it mixed
in with a bunch of other identical pads of paper and I couldn’t find
which one was it.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I think part of the problem is heat, honestly. It’s about 25C in my
office right now, which isn’t scorching, but that’s after significant
attempts at heat management, and I think part of what’s happening is
that my brain and body are going into a sleepy heat crash.&lt;/p&gt;
&lt;p&gt;One perhaps telling indication of this is that as soon as I thought
of that and started thinking about steps to take to reduce heat in this
room it became very easy to take actions for that.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;Mostly I bought fittings so I can get out my proper AC
unit and install it somewhere useful, and I filled up and turned on the
swamp cooler I have in my room.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The weird thing is that I don’t feel particularly hot. I feel…
lethargic maybe, but I’m not getting any strong signals about
temperature, just behavioural responses to it.&lt;/p&gt;
&lt;p&gt;One of the things I pointed out in &lt;a href=&#34;/2021/11/labelling-feelings&#34;&gt;labelling feelings&lt;/a&gt; is that you’re
allowed to figure out what you’re feeling based on observing your own
actions like you would for anyone else. Something I hadn’t noticed
before is that when trying to figure out what you want, you can
partially infer this by finding things that are unusually easy for you
to do right now.&lt;/p&gt;
&lt;p&gt;I think a lot of the time this will end up in unendorsed actions,
like doomscrolling, but I think if you cast around and explore the space
of alternatives maybe you’ll find there are some unexpected things in
there that are much easier to do than expected because how easily you
respond to the idea of doing something towards them.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Bad labelling and organisation on my part got it mixed
in with a bunch of other identical pads of paper and I couldn’t find
which one was it.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;Mostly I bought fittings so I can get out my proper AC
unit and install it somewhere useful, and I filled up and turned on the
swamp cooler I have in my room.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Speaking from the heart</title>
    <link href="https://drmaciver.com/notebook/2025/04/speaking-from-the-heart/" />
    <id>https://drmaciver.com/notebook/2025/04/speaking-from-the-heart/</id>
    <updated>2025-04-27</updated>
    <content type="html">


&lt;p&gt;“Focusing” is the name for a basic therapy skill coined by Eugene
Gendlin.&lt;/p&gt;
&lt;p&gt;The story goes&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; that Gendlin and his students wanted
to figure out what caused some people to improve in therapy and others
not, so they looked at transcripts of lots of therapy patients and
analysed them for what made the difference. Eventually they realised
that the biggest impact was not from anything the therapists did, but
whether the patients said “Um” a lot.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;I believe that this story is apocryphal and Gendlin
already knew the conclusion he wanted to reach and then used this as a
sort of post hoc justification for it. But it seems both plausible to me
that this is what you observe and also I think the method works, so it’s
a useful illustration regardless.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The explanation for this observation is this: If you’re speaking
effortlessly and fluently about your experiences, &lt;em&gt;you probably
aren’t paying attention to how you’re feeling&lt;/em&gt;, and in particular
you’re not checking in with whether what you’re saying actually feels
like. If you imagine someone saying “Yup everything is absolutely great,
I’m doing fine” while their face calls them a liar, that’s the sort of
thing I’m talking about. Frequently people will do this not because
they’re lying, but because they don’t even notice that they’re not
telling the truth.&lt;/p&gt;
&lt;p&gt;When progress happens, they instead say “Yup everything is absolutely
great, I’m doing fine. Um. Except…” and then start talking about the
actually important thing.&lt;/p&gt;
&lt;p&gt;Gendlin describes the process of realising what you said wasn’t true
and noticing the feeling you get about it as paying attention to it as
noticing the &lt;em&gt;felt sense&lt;/em&gt; of the problem. This example comes from
an exercise he suggests somewhere&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt; is to say out loud
“Everything in my life is completely fine.”, notice how that feels, and
then start saying “Except…” until you run out of things to list.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;This might have been in his book, Focusing, but I think
I remember this as a suggestion from a friend reporting on Gendlin, so
it might also be something else.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Anyway this is the core of Focusing as I’ve understood it to date:
It’s a fundamentally corrective process, where you say things, then you
find out the ways in which they’re not true, and you use the felt sense
to correct them. I’m pretty good at this part.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;Thus granting me a good grade in therapy, a thing that
is both normal to want and possible to achieve.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;But there’s another part to it that I’ve never been very good at,
which is where you let the felt sense “speak directly”.&lt;/p&gt;
&lt;p&gt;One problem with the speaking first and correcting it is that
thoughts are fast and feelings are slow, and it’s very easy for whatever
part of you that is feeling the thing to get overwhelmed, even when
you’re trying your best to be helpful. I was trying to explain this to
Lisa the other day and the analogy I used was imagine talking to a shy
child who isn’t very good at speaking yet. Even if you correctly
anticipate what it’s trying to say to you, the mere act of anticipating
it can make it less willing to talk.&lt;/p&gt;
&lt;p&gt;What you (or at least I) have to do instead is say some words,
slowly, and then if it’s not actually clear to you what the next words
to come out be that would feel right are… pause, and wait for them to
come. Sit there, just letting there be a long gap in your sentence,
until the next words come out.&lt;/p&gt;
&lt;p&gt;The frustrating thing about this is that it works much much better if
there’s someone listening, and that someone has to sit patiently with
you and wait. This is hard.&lt;/p&gt;
&lt;p&gt;I mentioned I was explaining this to Lisa the other day. This was a
very good conversation in which I was trying to express some things I
was feeling sad about, and part of it lead to a very good meta
conversation about how to have such conversations. One thing that came
up is that Lisa and I have very different internal experiences when
we’re clearly struggling with words, and that in the ones that Lisa has
and thus was expecting I was also having, trying to help complete the
other party’s sentences is actually very helpful.&lt;/p&gt;
&lt;p&gt;I think there are roughly three things I experience that lead to this
sort of halting speech:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;This thing of waiting for a felt sense to express itself
properly.&lt;/li&gt;
&lt;li&gt;“Tip of my tongue” style aphasia where I know the word but I’m
struggling to find it.&lt;/li&gt;
&lt;li&gt;Situations where I know what I want to say but feel paralysed from
saying it, out of fear or similar.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the second two, completing a sentence correctly is quite useful.
It either tells you there’s nothing to be afraid of because they already
know what you’re going to say, or it gets you out of the aphasia.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;I actually don’t like it when people help me out when
I’m having aphasia, but that’s a different and much less important
issue.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Even in the classic “corrective” sense of Focusing, where you’re
trying to express a sentence that feels true, completing the sentence is
quite helpful, because it gives you something concrete to check
against.&lt;/p&gt;
&lt;p&gt;But… when trying to express myself around something deeply felt and
poorly understood, I think completing the sentence doesn’t help even
when the completion is right, because much of the point is not just to
say the true thing, but to experience the feeling fully, and if you skip
to the end you don’t get to do that, and the whole process is left
incomplete.&lt;/p&gt;
&lt;p&gt;The result though is that you need patience when talking to someone
doing this, even when that someone is yourself. It’s very easy to return
to the lightning quick world of words and race ahead, but sometimes you
just have to sit with the feeling until it’s ready to talk.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;I believe that this story is apocryphal and Gendlin
already knew the conclusion he wanted to reach and then used this as a
sort of post hoc justification for it. But it seems both plausible to me
that this is what you observe and also I think the method works, so it’s
a useful illustration regardless.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;This might have been in his book, Focusing, but I think
I remember this as a suggestion from a friend reporting on Gendlin, so
it might also be something else.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;Thus granting me a good grade in therapy, a thing that
is both normal to want and possible to achieve.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;I actually don’t like it when people help me out when
I’m having aphasia, but that’s a different and much less important
issue.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>More ways to work out sums</title>
    <link href="https://drmaciver.com/notebook/2025/04/more-ways-to-work-out-sums/" />
    <id>https://drmaciver.com/notebook/2025/04/more-ways-to-work-out-sums/</id>
    <updated>2025-04-26</updated>
    <content type="html">


&lt;p&gt;Sorry, still on different ways to calculate the sum of the first n
integers. I’ll get bored eventually.&lt;/p&gt;
&lt;p&gt;My last post &lt;a href=&#34;/2025/04/introducing-a-parameter-to-work-out-sums&#34;&gt;Introducing a
parameter to work out sums&lt;/a&gt; was originally called “Using generating
functions to work out sums”, but the things I was using in it weren’t
generating functions, and doing it with a generating function ends up
&lt;em&gt;much&lt;/em&gt; nicer, in a way that is obvious in retrospect.&lt;/p&gt;
&lt;p&gt;The generating function of a series &lt;span class=&#34;math inline&#34;&gt;\(a_n\)&lt;/span&gt; is &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{n \geq 0} a_n x^n\)&lt;/span&gt;. Often you
can work out the generating function then take its power series
expansion to calculuate jhe original series.&lt;/p&gt;
&lt;p&gt;Here’s how it works:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
f(x) &amp;amp;= \sum\limits_{n &amp;gt;= 0} \sum\limits_{i = 1}^n i x^n \\
&amp;amp;= \sum\limits_{i &amp;gt;= 1} \sum\limits_{n \geq i} i x^n \\
&amp;amp;= \sum\limits_{i &amp;gt;= 1} i \sum\limits_{n \geq i} x^n \\
&amp;amp;= \sum\limits_{i &amp;gt;= 1} \frac{i x^i}{1 - x} \\
&amp;amp;= \frac{x}{1-x} \sum\limits_{i &amp;gt;= 1} i x^{i - 1}\\
&amp;amp;= \frac{x}{1-x} \frac{d}{dx} \sum\limits_{i &amp;gt;= 1} x^i \\
&amp;amp;= \frac{x}{1-x} \frac{d}{dx} \sum\limits_{i &amp;gt;= 0} x^i \\
&amp;amp;= \frac{x}{1-x} \frac{d}{dx} \frac{1}{1 - x} \\
&amp;amp;= \frac{x}{(1-x)^3} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Rearranging order of sums like this is a fairly standard trick for
working out doubly infinite sums. It’s technically justified whenever
the sums absolutely converge.&lt;/p&gt;
&lt;p&gt;Now, to get the power series, we just need to work out the kth
derivative of &lt;span class=&#34;math inline&#34;&gt;\(\frac{1}{(1 - x)^3}\)&lt;/span&gt;.
This is &lt;span class=&#34;math inline&#34;&gt;\(\frac{3 (3 + 1) \ldots (3 + k -
1)}{(1 - x)^{3 + k}} = \frac{(k + 2)!}{(1 - x)^{3+k}}\)&lt;/span&gt;.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;You can prove this with induction if you like. This is a
good example of the sort of thing that induction is useful for, where
you spot the pattern and just want to go “and so on”. But you can also
just go “and so on” if you feel like it.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;So, plugging in &lt;span class=&#34;math inline&#34;&gt;\(x = 0\)&lt;/span&gt; to get the
derivates at 0 we get&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
f(x) &amp;amp;= \frac{x}{(1-x)^3} \\
&amp;amp;= x \sum\limits_{n \geq 0} \frac{(n + 2)!}{2 n!} x^n \\
&amp;amp;= \sum\limits_{n \geq 0} \frac{(n + 1)(n + 2}{2} x^{n + 1} \\
&amp;amp;= \sum\limits_{n \geq 1} \frac{n (n + 1)}{2} x^{n + 1} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Giving us, once again, the desired result.&lt;/p&gt;
&lt;p&gt;You could use a basically similar argument to calculate &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{n \geq k} n (n - 1) \ldots (n -
k)\)&lt;/span&gt;, and from that work out &lt;span class=&#34;math inline&#34;&gt;\(\sum
i^k\)&lt;/span&gt; for any &lt;span class=&#34;math inline&#34;&gt;\(k\)&lt;/span&gt;, but I can’t
be bothered at present.&lt;/p&gt;
&lt;p&gt;In order to not salami slice this topic over too many more posts,
here’s another proof I spotted yesterday, which uses a standard
combinatorial trick of counting the same thing two different ways:&lt;/p&gt;
&lt;p&gt;Consider all distinct pairs of numbers drawn from &lt;span class=&#34;math inline&#34;&gt;\(\{1, \ldots, n + 1\}\)&lt;/span&gt;. Counted one way,
this is just &lt;span class=&#34;math inline&#34;&gt;\({{n + 1}\choose 2} = \frac{n (n
+ 1)}{2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Now, count it another way: If the smaller number in the pair is &lt;span class=&#34;math inline&#34;&gt;\(k\)&lt;/span&gt;, then there are exactly &lt;span class=&#34;math inline&#34;&gt;\(n + 1 - k\)&lt;/span&gt; choices for the larger number.
Therefore there are &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{k=1}^n (n +
1 - k) = \sum\limits_{k = 1}^n k\)&lt;/span&gt; choices in total, so &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{k = 1}^n k = \frac{n (n +
1)}{2}\)&lt;/span&gt; as desired.&lt;/p&gt;
&lt;p&gt;As an additional note, one thing I’ve been noticing when working
these out is just how much better pen&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt; and paper is for working
these out than trying to type them up on the computer is. Part of this
is that my notebook doesn’t have the best affordances around LaTeX, but
I think a lot of it is genuine ease. Mathematics really still feels like
it’s best done by hand to me.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;I know, I know, a true mathematician would use a
pencil.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I think that if I were using an actual interactive theorem prover, or
even just a symbolic algebra library in Python, or the like that might
stop being the case, but writing LaTeX feels too obviously like a
presentation tool, not a tool for actually working things out.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;You can prove this with induction if you like. This is a
good example of the sort of thing that induction is useful for, where
you spot the pattern and just want to go “and so on”. But you can also
just go “and so on” if you feel like it.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;I know, I know, a true mathematician would use a
pencil.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Introducing a parameter to work out sums</title>
    <link href="https://drmaciver.com/notebook/2025/04/introducing-a-parameter-to-work-out-sums/" />
    <id>https://drmaciver.com/notebook/2025/04/introducing-a-parameter-to-work-out-sums/</id>
    <updated>2025-04-25</updated>
    <content type="html">


&lt;p&gt;In &lt;a href=&#34;/2025/04/a-brief-introduction-to-mathematics-with-one-example-many-times&#34;&gt;my
last post&lt;/a&gt; I talked about the problem of working out &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^n i\)&lt;/span&gt;. In it, I
strongly implied that there wasn’t a way to just work out the
answer.&lt;/p&gt;
&lt;p&gt;This isn’t actually true. There’s a quite straightforward way to just
work out the answer. It still requires a little bit of spotting the
trick, but the tricks in question are more like puzzle pieces that you
have to fit together than genuine insights.&lt;/p&gt;
&lt;p&gt;However, it requires a bunch more calculus than I wanted to assume in
my last post, so I left it out. If you do know the calculus it might be
informative though.&lt;/p&gt;
&lt;p&gt;The idea is this: Rather than work out &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^n i\)&lt;/span&gt;, we work out
&lt;span class=&#34;math inline&#34;&gt;\(f_n(x) = \sum\limits_{i = 1}^n i
x^i\)&lt;/span&gt;, and then evaluate &lt;span class=&#34;math inline&#34;&gt;\(f(1)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This will, weirdly, turn out to be easier.&lt;/p&gt;
&lt;p&gt;How do we do this? Like so:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
f_n(x) &amp;amp; = \sum\limits_{i = 1}^n i x^i \\
&amp;amp; = x \sum\limits_{i = 1}^n i x^{i - 1} \\
&amp;amp; = x \frac{d}{dx} \sum\limits_{i = 1}^n x^i \\
&amp;amp; = x \frac{d}{dx} \frac{x^{n + 1} - 1}{x - 1} \\
&amp;amp; = x \left(\frac{(n + 1)x^n}{x - 1} - \frac{x^{n + 1} - 1}{(x -
1)^2} \right) \\
&amp;amp; = x \left(\frac{(n + 1)x^n(x - 1) - x^{n + 1} + 1}{(x - 1)^2}
\right) \\
&amp;amp; = x \left(\frac{(n + 1)x^{n + 1} - (n + 1)x^n - x^{n + 1} + 1}{(x
- 1)^2} \right) \\
&amp;amp; = x \left(\frac{nx^{n + 1} - (n + 1)x^n + 1}{(x - 1)^2} \right) \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We want to evaluate &lt;span class=&#34;math inline&#34;&gt;\(f_n(1)\)&lt;/span&gt;, but
this would require us to divide 0 by 0, so we have to take limits. We
can do this with two applications of &lt;a href=&#34;https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule&#34;&gt;L’Hôpital’s
rule&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
\lim_{x \to 1} x \frac{nx^{n + 1} - (n + 1)x^n + 1}{(x - 1)^2}
&amp;amp;=  \lim_{x \to 1} x \lim_{x \to 1} \frac{n (n + 1) x^n - (n + 1) n
x^{n - 1}}{2(x - 1)} \\
&amp;amp; =  \frac{n (n + 1) n x^{n - 1} - (n + 1) n (n - 1) x^{n - 2}}{2}
\\
&amp;amp; = \lim_{x \to 1} \frac{n (n + 1)  x^{n - 2} (n x - n + 1)}{2} \\
&amp;amp; = \frac{n (n + 1)}{2} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Which is the desired result.&lt;/p&gt;
&lt;p&gt;Now, I think it would be reasonable to consider this approach to be
in almost every way worse than the last one. I don’t disagree. That was
a whole bunch of symbol shuffling from which you cannot, I think, derive
much insight about the nature of the problem.&lt;/p&gt;
&lt;p&gt;But, on the other hand, I think it’s worth realising that sometimes
that’s good actually. Sometimes you don’t really need the insight, or
can’t find it, and you just want to shut up and calculate. This sort of
tool is very useful to have handy for that.&lt;/p&gt;
&lt;p&gt;For example, suppose you wanted to calculate &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i=1}^n i^2\)&lt;/span&gt; instead. Our
previous methods don’t help us here because there are no nice sums to
rearrange. But with this technique it’s actually quite straightforward
(if, admittedly, ugly).&lt;/p&gt;
&lt;p&gt;First, let’s make use of our previously solved problem to simplify
this slightly. We’re actually going to calculate &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i=1}^n i(i - 1)\)&lt;/span&gt;. We can then
just add an extra &lt;span class=&#34;math inline&#34;&gt;\(\frac{n(n +
1)}{2}\)&lt;/span&gt; to the result to get our desired sum.&lt;/p&gt;
&lt;p&gt;Now, let &lt;span class=&#34;math inline&#34;&gt;\(g(x) = \sum\limits_{i=1}^n i(i -
1) x^{i - 2}\)&lt;/span&gt;. This is now the second derivative of &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^n x^i\)&lt;/span&gt;, which we can
work out&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; is &lt;span class=&#34;math inline&#34;&gt;\(\frac{x^n (n^2 (x - 1)^2 - n x^2 + n + 2 x) - 2
x)}{(x - 1)^3 x}\)&lt;/span&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;I asked Wolfram Alpha, because I was lazy, but you could
do this by hand through the application of the usual rules for
calculating derivatives if you can be bothered. I mostly didn’t because
writing it up in my notebook software is a pain.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Taking three derivatives with L’Hôpital’s rule&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt; we
get:&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;Wolfram alpha again. Sorry.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
g(1) &amp;amp;= \lim_{x \to 1} \frac{x^n (n^2 (x - 1)^2 - n x^2 + n + 2 x) -
2 x)}{((x - 1)^3 x)}\\
&amp;amp;= \lim_{x \to 1} \frac{ (n - 1) n (n + 1) x^(n - 3) (n^2 (x - 1)^2
+ 2 n (x^2 - 1) + 2 x)}{6(4x - 3)} \\
&amp;amp; = \frac{ (n - 1) n (n + 1) (2)}{6} \\
&amp;amp; = \frac{ (n - 1) n (n + 1) }{3} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This means that our desired result is&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
\sum\limits_{i = 1}^n i^2 &amp;amp; =  \frac{(n - 1) n (n + 1) }{3} +
\frac{n(n + 1)}{2} \\
&amp;amp; = \frac{2 (n - 1) n (n + 1)  + 3 n(n + 1) }{6} \\
&amp;amp; = \frac{n (n + 1) ( 2n - 2  + 3)}{6} \\
&amp;amp; = \frac{n (n + 1) ( 2n + 1)}{6} \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt; the correct answer, as you can
verify by checking the first couple results.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;Conveniently, because I really didn’t want to track down
the error if I made one.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Now… Do you ever need to be able to do this? Honestly, not really. I
get the impression that this used to be a much more important skill, and
these days you can mostly use symbolic algebra packages to do it for
you, and also you mostly don’t need it anyway, but mathematicians used
to get very excited about this sort of formula, and I think they’re
still important in a bunch of places. e.g. I bet people who do
combinatorics care much more about being able to do calculations like
this than I do, because you often reduce counting problems to this sort
of calculation.&lt;/p&gt;
&lt;p&gt;Personally, I like it at least partly for its illustrative value.
It’s sometimes very helpful to know that you &lt;em&gt;could&lt;/em&gt; solve a
problem if you were just willing to shut up, sit down, and do the
algebra. There’s also a satisfying sudoku-like quality to do it.&lt;/p&gt;
&lt;p&gt;It’s also interesting having this sort of skillset at all because I
get the feeling that basically nobody learns it any more. I learned it
because I read “Schaum’s Outlines of Advanced Calculus” at a formative
age, and it taught me all sorts of tricks like this, but it meant I went
into university with this whole bag of tricks that nobody else had. They
weren’t &lt;em&gt;useful&lt;/em&gt; tricks to have exactly, but they were
interesting, and I do feel like it shaped how I look at mathematics a
fair bit.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;I asked Wolfram Alpha, because I was lazy, but you could
do this by hand through the application of the usual rules for
calculating derivatives if you can be bothered. I mostly didn’t because
writing it up in my notebook software is a pain.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;Wolfram alpha again. Sorry.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;Conveniently, because I really didn’t want to track down
the error if I made one.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>A brief introduction to mathematics with one example many times</title>
    <link href="https://drmaciver.com/notebook/2025/04/a-brief-introduction-to-mathematics-with-one-example-many-times/" />
    <id>https://drmaciver.com/notebook/2025/04/a-brief-introduction-to-mathematics-with-one-example-many-times/</id>
    <updated>2025-04-24</updated>
    <content type="html">


&lt;p&gt;There’s a story repeated so often that it’s a cliche of &lt;a href=&#34;https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss&#34;&gt;Gauss&lt;/a&gt;’s
mathematics teacher setting the class the task of adding up the numbers
1 to 100, supposedly to waste their time and give them a break, only for
Gauss to almost immediately give the correct answer.&lt;/p&gt;
&lt;p&gt;I think it’s a usefully illustrative example to look at for learning
some of the basics of mathematics. Partly this is because it illustrates
one of the key uses and methods of mathematics: Getting an answer that
you could in theory work out laboriously much faster through logical
deducation.&lt;/p&gt;
&lt;p&gt;Mostly, though, I’m going to use it to showcase a bunch of different
ways of thinking through a mathematical problem, and use it to teach
some common mathematical notation.&lt;/p&gt;
&lt;p&gt;So, let’s figure out how to do this.&lt;/p&gt;
&lt;p&gt;The first thing we need to figure out is to how to write it down.
Here are two obvious ways:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;“The sum of all numbers from 1 to 100.”&lt;/li&gt;
&lt;li&gt;1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16
+ 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 +
31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45
+ 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 +
60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74
+ 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 +
89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Neither of these are actually very good.&lt;/p&gt;
&lt;p&gt;One of the first lessons of doing mathematics: A lot of mathematics
is about developing good notation for representing the problem. The
problem with the first, plain English, one is that it’s hard to
manipulate. We want to be able to do algebra with it, and it’s hard to
do algebra with plain English language. Modern mathematics owes a lot to
&lt;a href=&#34;https://en.wikipedia.org/wiki/Robert_Recorde&#34;&gt;Robert
Recorde&lt;/a&gt; for giving us the equals sign (and popularising the plus and
minus signs), because trying to manipulate sums with plain English
language is an absolute pain.&lt;/p&gt;
&lt;p&gt;The second one is bad for two main reasons:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;It’s very clunky and unwieldy. If you’re going to be repeating the
expression a lot, you don’t want to write that out over and over again.
Also, are you sure you’re reading it correctly? Would you have noticed
if I’d dropped 31 from the middle, or repeated 23 twice?&lt;/li&gt;
&lt;li&gt;It doesn’t generalise well. Suppose we wanted instead to add up all
the numbers from 1 to 50, or 1 to 1000, we’d have to write an entirely
new expression for it. There’s no way to do algebra where the end point
is variable with this expression.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So let me give you two other ways to write it:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;&lt;span class=&#34;math inline&#34;&gt;\(1 + \ldots + 100\)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^{100}
i\)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the first, the &lt;span class=&#34;math inline&#34;&gt;\(\ldots\)&lt;/span&gt; just
means “and so on”. You’re expected to figure out what it means from
context, but you’re also expected not to write it unless it’s obvious
from context what you mean. If we’d wanted to make it a bit more obvious
we could have written it &lt;span class=&#34;math inline&#34;&gt;\(1 + 2 + \ldots + 99
+ 100\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The second is a much more precise notation and looks completely
inscrutable when you first encounter it, but has a fairly
straightforward meaning: The &lt;span class=&#34;math inline&#34;&gt;\(\sum\)&lt;/span&gt;
represents a sum of an expression, where the expression references a
variable &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; that varies over some
range. The &lt;span class=&#34;math inline&#34;&gt;\(i = 1\)&lt;/span&gt; at the bottom
indicates that the sum is over a range of values of &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; starting with &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt;, and the &lt;span class=&#34;math inline&#34;&gt;\(100\)&lt;/span&gt; at the top indicates that &lt;span class=&#34;math inline&#34;&gt;\(100\)&lt;/span&gt; is the last element. The &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; to the right means that the expression
we are summing is &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;So, for example, &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^3 i
= 1 + 2 + 3\)&lt;/span&gt;, or &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i =
2}^3 i^2 = 2^2 + 3^2\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;span class=&#34;math inline&#34;&gt;\(\sum\)&lt;/span&gt; notation is very
convenient because it allows us to compactly represent complicated
expressions. It’s also useful for making generalisations. e.g. if we
wanted to work out the answer to this for any number, we could write
&lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i=1}^n i\)&lt;/span&gt; to indicate
that the end point is an arbitrary integer &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;There are some implicit notational conventions here by
the way. &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; is usually an index
variable. &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; are both expected to be integers by
that choice. This isn’t required, but it’s conventional. However, you
would only ever use integers as sum indexed or bounds like this, and
that’s not conventional, it doesn’t really make sense to use
non-integers here.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;To start with though, we’ll keep working with the &lt;span class=&#34;math inline&#34;&gt;\(\ldots\)&lt;/span&gt; notation.&lt;/p&gt;
&lt;p&gt;Now, let’s solve the problem.&lt;/p&gt;
&lt;p&gt;We can write &lt;span class=&#34;math inline&#34;&gt;\(1 + \ldots + 100\)&lt;/span&gt; as
&lt;span class=&#34;math inline&#34;&gt;\((1 + \ldots 50) + (51 + \ldots
100)\)&lt;/span&gt;, because we can break up the sum however we like.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;Technically speaking we are using what’s called the
associativity rule of addition here.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;We can also reverse a sum if we want, so we could write the second
one equally well as &lt;span class=&#34;math inline&#34;&gt;\(100 + \ldots +
51\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Now, there are exactly 50 elements in each sum, so we can pair them
up and rearrange the sum as follows. &lt;span class=&#34;math inline&#34;&gt;\((1 +
100) + (2 + 99) + \ldots + (49 + 52) + (50 + 51)\)&lt;/span&gt;. Now, notice
that each of these terms adds up to exactly 101. You can check that
&lt;span class=&#34;math inline&#34;&gt;\(1 + 100 = 101, 2 + 99 = 101\)&lt;/span&gt; etc but
you can also this because each time you move right, you add one to the
first term and subtract one from the second, so the value stays
constant. This means that this sum is exactly 50 copies of 101, so the
sum is &lt;span class=&#34;math inline&#34;&gt;\(50 \times 101 = 5050\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I think a pretty reasonable question for you to ask at this point is
how on earth you’re expected to come up with a trick like that. If
you’ve seen this problem before it’s old hat, but if you had to come up
with it on the spot, how would you do that?&lt;/p&gt;
&lt;p&gt;The honest answer is I don’t know. A lot of things like this you just
figure out by fiddling with the problem and getting an instinct for what
works. This sort of approach is what I think of as a “trick”, and
sometimes you spot the trick which lets you massively simplify the
problem, and sometimes you don’t. As you do more mathematics, you
develop both a familiar bag of tricks, and you learn to apply them in
new circumstances. The trick here is something like “try grouping
different parts of the sum together to see if they add up to something
convenient”.&lt;/p&gt;
&lt;p&gt;For example, here’s another way you could use a similar trick.
Suppose I asked you to calculate &lt;span class=&#34;math inline&#34;&gt;\(1 - 2 + 3 -
4 + \ldots + 99 - 100\)&lt;/span&gt; (you could also write this as &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^{100} (-1)^{i - 1} i\)&lt;/span&gt;
) - that is, it’s the same sum as before, but this time the signs
alternate between positive and negative.&lt;/p&gt;
&lt;p&gt;Well, here you could group it as follows: &lt;span class=&#34;math inline&#34;&gt;\((1 - 2) + (3 - 4) + \ldots + (99 - 100)\)&lt;/span&gt;.
Each of those expressions in brackets is &lt;span class=&#34;math inline&#34;&gt;\(-1\)&lt;/span&gt;, because each time the number on the
right is exactly one more than the number on the left. As before we have
exactly 50 elements, so the result is &lt;span class=&#34;math inline&#34;&gt;\((-1)
\times 50 = -50\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This is basically the same trick, but with a different grouping.&lt;/p&gt;
&lt;p&gt;Mathematics doesn’t necessarily rely on knowing and spotting things
like this, but it’s a very common part of mathematical practice.
Sometimes they’re essential and you can’t figure out any other way to
solve the problem without some sort of trick like this, but often
they’re just a way of bypassing some tedious calculation or another.&lt;/p&gt;
&lt;p&gt;Now, one problem with the way we solved this is that it doesn’t
generalise all that well. For example, suppose I asked you to add up all
the numbers between &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(101\)&lt;/span&gt;, how would you do it?&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;Well you’d add 101 to 5050 and get 5151 of course,
because you just worked out the sum from 1 to 100. But suppose you
&lt;em&gt;hadn’t&lt;/em&gt; done that.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The previous trick doesn’t work because it relied on there being an
even number of values in the sum. If we tried to do the same thing as
before we’d have to break the sum up as something like &lt;span class=&#34;math inline&#34;&gt;\((1 + \ldots + 50) + 51 + (52 + \ldots
101)\)&lt;/span&gt;, because there’s a number left over in the middle. We can
then do the same pairing as before and get &lt;span class=&#34;math inline&#34;&gt;\((1 + 101) + (2 + 100) + \ldots + (50 +
52)\)&lt;/span&gt; for the paired sums, and the result is &lt;span class=&#34;math inline&#34;&gt;\(51 + 102 \times 50 = 51 + 5100 = 5151\)&lt;/span&gt;.
Which is, conveniently, &lt;span class=&#34;math inline&#34;&gt;\(5050 + 101\)&lt;/span&gt;,
so we’ve not messed up the calculation somewhere.&lt;/p&gt;
&lt;p&gt;This works but is unsatisfying. In particular, let’s try to work it
out for a general number &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;. In
order to do this as above, we’ll have to consider two special cases:
First, let’s assume that &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; is an
even number. Let’s say &lt;span class=&#34;math inline&#34;&gt;\(n = 2m\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Then we can write &lt;span class=&#34;math inline&#34;&gt;\(1 + \ldots n = (1 +
\ldots m) + ((m + 1) + \ldots n)\)&lt;/span&gt; as before, and use the same
pairing trick to get &lt;span class=&#34;math inline&#34;&gt;\((1 + n) + (2 + (n - 1))
+ \ldots (m + (m + 1))\)&lt;/span&gt;. As before, each of these individual
bracketed expressions are always equal to &lt;span class=&#34;math inline&#34;&gt;\(n
+ 1\)&lt;/span&gt;, and we have &lt;span class=&#34;math inline&#34;&gt;\(m\)&lt;/span&gt; copies
of the expression, so the answer is &lt;span class=&#34;math inline&#34;&gt;\(m (n +
1) = \frac{n (n + 1)}{2}\)&lt;/span&gt; (because &lt;span class=&#34;math inline&#34;&gt;\(m
= \frac{n}{2}\)&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Now, suppose &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; is odd. We could
repeat the pairing trick, but we can also use &lt;span class=&#34;math inline&#34;&gt;\(1 + \ldots + n = (1 + \ldots + (n - 1)) +
n\)&lt;/span&gt;, and if &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; is odd then
&lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt; is even, so we can use the
previous expression for the sum when &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; is even, plugging in &lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt; in place of the &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;. This gives us &lt;span class=&#34;math inline&#34;&gt;\(\frac{(n - 1)(n + 1 - 1)}{2} = \frac{(n -
1)n}{2}\)&lt;/span&gt; for the sum up to &lt;span class=&#34;math inline&#34;&gt;\(n -
1\)&lt;/span&gt;, and thus &lt;span class=&#34;math inline&#34;&gt;\(\frac{(n - 1)n}{2} +
n\)&lt;/span&gt; for the whole sum.&lt;/p&gt;
&lt;p&gt;Now, let’s make that expression a bit nicer. &lt;span class=&#34;math inline&#34;&gt;\(\frac{(n - 1)n}{2} + n = \frac{n^2 - n + 2n}{2}  =
\frac{n^2 + n}{2} = \frac{n(n + 1)}{2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Something worth noting here is that although we had to handle the odd
and even cases differently, we got the same expression out in both
cases. This should make us a little suspicious that we’re missing
something and that there’s a nicer proof here.&lt;/p&gt;
&lt;p&gt;Another thing that should make us suspicious but that is actually
fine is that the answer to this question should be an integer, as we’ve
only added up integers, but we’ve got a fraction in the answer. It’s
worth doing a sanity check that this is fine, but it is: Exactly one of
&lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(n
+ 1\)&lt;/span&gt; must be even (because if you add one to an even number you
get an odd number, and vice versa), so the expression on top is always
even, and dividing it by two gets you an even number.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;It’s very easy to make mistakes in mathematics, so it’s
good to have a habit of doing little cross checks like this where you
look at the answer you came up with and ask if it could possibly be
correct.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Anyway, there’s another trick, and that fraction is a clue. We made
this work by pairing up numbers together, and there’s a 2 in the end, so
perhaps we would find it easier to work out twice the answer than we do
to work out the answer directly.&lt;/p&gt;
&lt;p&gt;We can write&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\begin{align*}
2 \times (1 + \ldots + n) &amp;amp; = (1 + \ldots + n) + (1 + \ldots + n) \\
&amp;amp; = (1 + \ldots + n) + (n + \ldots + 1) \\
&amp;amp; = (n + 1) + \ldots + (1 + n) \\
\end{align*}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This gives us &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; copies of &lt;span class=&#34;math inline&#34;&gt;\(n + 1\)&lt;/span&gt;, so twice the answer is &lt;span class=&#34;math inline&#34;&gt;\(n (n + 1))\)&lt;/span&gt; and the answer is &lt;span class=&#34;math inline&#34;&gt;\(\frac{n(n + 1)}{2}\)&lt;/span&gt; as desired. This is a
much neater proof, but I think a slightly harder trick to spot.&lt;/p&gt;
&lt;p&gt;I think this is a good time to write some Greek.&lt;/p&gt;
&lt;p&gt;We can write &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^n i =
\sum\limits_{i = 1}^n (n + 1 - i)\)&lt;/span&gt;. This is basically “running
the sum backwards” like we did above. The first element is &lt;span class=&#34;math inline&#34;&gt;\(n + 1 - 1 = n\)&lt;/span&gt;, then &lt;span class=&#34;math inline&#34;&gt;\(n + 1 - 2 = n - 1\)&lt;/span&gt;, etc. all the way to
the end where it’s &lt;span class=&#34;math inline&#34;&gt;\(n + 1 - n =
1\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This means that &lt;span class=&#34;math inline&#34;&gt;\(2 \sum\limits_{i = 1}^n
i  = \sum\limits_{i = 1}^n i + \sum\limits_{i = 1}^n i = \sum\limits_{i
= 1}^n i + \sum\limits_{i = 1}^n (n + 1 - i)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Now, because these sums are over the same range, we can group the
expressions inside them together, so &lt;span class=&#34;math inline&#34;&gt;\(2
\sum\limits_{i = 1}^n i = \sum\limits_{i = 1}^n i + (n + 1 - i) =
\sum\limits_{i = 1}^n (n + 1) = n (n + 1)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If you’re unused to dense mathematical notation this may not seem
obviously clearer or better than the above, but it has the advantage of
being compact and easy to manipulate, and it lets you result a lot of
complex reasoning to fairly simple mechanical manipulation.&lt;/p&gt;
&lt;p&gt;So now we’ve seen how to work out this answer. But why is it
true?&lt;/p&gt;
&lt;p&gt;This is another key feature of doing mathematics:&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-5&#34;&gt;&lt;a href=&#34;#fn-5&#34; id=&#34;fnref-5&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-5&#34; type=&#34;checkbox&#34;/&gt;
Often you should be unsatisfied with mere answers, and looking at the
problem from another angle will help you really understand it.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-5-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;5 &lt;/span&gt;&lt;p&gt;I wrote about this in &lt;a href=&#34;/2025/04/algebra-and-insight&#34;&gt;algebra and insight&lt;/a&gt; but that
example only works if you’re already a moderately advanced
mathematician.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Is this particular example worth really understanding? Well… probably
not. I think if you find yourself doing a lot of this sort of sums&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-6&#34;&gt;&lt;a href=&#34;#fn-6&#34; id=&#34;fnref-6&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-6&#34; type=&#34;checkbox&#34;/&gt;, it’s worth playing around with a
lot of simple examples like this in order to get a really good intuition
for how everything fits together.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-6-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;6 &lt;/span&gt;&lt;p&gt;Applications include “being a mathematician in the early
to mid 20th century”, “taking a maths exam”, “for the sheer joy of it”,
and “if you do a really large amount of mathematics every now and then
you will run into a case where you really do have a use for this and you
will be so delighted that you’ll ignore how rusty you’ve got at it”.
Also probably combinatorics or something like that.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;But right now it’s worth really understanding this because it’s a
nice illustrative example of the general mathematical phenomenon.&lt;/p&gt;
&lt;p&gt;Imagine, or draw&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-7&#34;&gt;&lt;a href=&#34;#fn-7&#34; id=&#34;fnref-7&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-7&#34; type=&#34;checkbox&#34;/&gt; the numbers as rows of blocks
stacked on top of each other. On the bottom row you’ve got &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; numbers, then &lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt;, and so on, until you’ve got &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt; block on the final row. The result is a
sort of ragged triangle.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-7-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;7 &lt;/span&gt;&lt;p&gt;I really should include a diagram here but I can’t be
bothered, sorry. If you’re wondering how to draw &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; boxes, the answer is you don’t you draw
some fixed small number and assume that it generalises. This is why I
don’t like visual proofs that much.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Now, take a copy of that, and flip it upside down, and stack it on
top of the other one. The jagged edges will line up, and you’ll get a
rectangle. How big is the rectangle? Well, it’s got &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; items on the base, because that was
your bottom row, and it’s &lt;span class=&#34;math inline&#34;&gt;\(n + 1\)&lt;/span&gt;
tall, because your triangle is &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;
tall and you had to stack an extra row on top. So there are &lt;span class=&#34;math inline&#34;&gt;\(n(n + 1)\)&lt;/span&gt; blocks in the rectangle, of
which exactly half must have come from our original triangle, so there
were &lt;span class=&#34;math inline&#34;&gt;\(\frac{n(n + 1)}{2}\)&lt;/span&gt; blocks in
the original triangle, and &lt;span class=&#34;math inline&#34;&gt;\(1 + \ldots + n =
\frac{n(n + 1)}{2}\)&lt;/span&gt; as desired.&lt;/p&gt;
&lt;p&gt;This is, in some sense, the same proof as we had before, but the
geometrical representation of it seems helpful for people, and for more
complicated examples it can be genuinely very useful.&lt;/p&gt;
&lt;p&gt;Here is, I promise, one final&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-8&#34;&gt;&lt;a href=&#34;#fn-8&#34; id=&#34;fnref-8&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-8&#34; type=&#34;checkbox&#34;/&gt; way to do it, which is
also often useful: We take a guess, and prove that that guess was
correct. For example, suppose that we guessed the answer was &lt;span class=&#34;math inline&#34;&gt;\(\frac{n(n + 1)}{2}\)&lt;/span&gt;. How might we prove
that we were right?&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-8-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;8 &lt;/span&gt;&lt;p&gt;For the purpose of this post I mean. There are
infinitely many ways to do this, and at least several of the other ones
are interesting in their own right.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The answer is to use something called “proof by induction”&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-9&#34;&gt;&lt;a href=&#34;#fn-9&#34; id=&#34;fnref-9&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-9&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-9-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;9 &lt;/span&gt;&lt;p&gt;Any philosophers reading this, don’t panic! It’s a
completely different meaning of the word “induction” that has nothing to
do with the philosophical notion of induction.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The way a proof by induction of some claim (your “induction
property”) works is that you establish:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;It’s true for &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt; (or anywhere
else you want to start - your “base case”)&lt;/li&gt;
&lt;li&gt;If it’s true for &lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt; then
it’s true for &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And this is sufficient to prove that it’s true for every integer
greater than or equal to your base case.&lt;/p&gt;
&lt;p&gt;Why? Well, because of a proof by contradiction. A proof by
contradiction is when you assume something that you’re not sure is true,
work through the consequences, and conclude something false, which means
your original assumption must be false.&lt;/p&gt;
&lt;p&gt;To see that proof by induction works, assume the opposite: Suppose
there were some &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; for which the
induction property were false. Then there must be some &lt;em&gt;smallest&lt;/em&gt;
such &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; for which the property is
false. If so, then the property must be true for &lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt;, as the property holds for &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt;, so we must have &lt;span class=&#34;math inline&#34;&gt;\(n &amp;gt; 1\)&lt;/span&gt; so &lt;span class=&#34;math inline&#34;&gt;\(n
- 1\)&lt;/span&gt; is still an integer greater than or equal to &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt;, and it’s smaller than &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;, which we picked to be the smallest
integer for which the property is false. But the second part of our
induction conditions was that it’s true for &lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt; then it’s true for &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;, which contradicts our claim that it
was false for &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Anyway, proof by induction.&lt;/p&gt;
&lt;p&gt;Our inductive property is that &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^n i = \frac{n(n +
1)}{2}\)&lt;/span&gt;. This is true for &lt;span class=&#34;math inline&#34;&gt;\(1\)&lt;/span&gt;, you can just check that by calculating
&lt;span class=&#34;math inline&#34;&gt;\(\frac{2}{2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Suppose it’s true for &lt;span class=&#34;math inline&#34;&gt;\(n - 1\)&lt;/span&gt;.
That is, &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_{i = 1}^{n - 1} i =
\frac{(n - 1)n}{2}\)&lt;/span&gt;. Then&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-10&#34;&gt;&lt;a href=&#34;#fn-10&#34; id=&#34;fnref-10&#34;&gt;&lt;sup&gt;10&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-10&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-10-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;10 &lt;/span&gt;&lt;p&gt;This is in fact the same calculation we did in the
even/odd case above.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[
\begin{align*}
\sum\limits_{i = 1}^n i &amp;amp; = n + \sum\limits_{i = 1}^{n - 1} i \\
&amp;amp; = n + \frac{n(n -1)}{2} \\
&amp;amp; = \frac{n(n + 1)}{2} \\
\end{align*}
\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So the property holds for &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; as
well, and the result is proved by induction.&lt;/p&gt;
&lt;p&gt;This does, of course, invite the question of how on earth we would
have made this guess if we didn’t already know the answer.&lt;/p&gt;
&lt;p&gt;I think there are roughly three ways that can come about.&lt;/p&gt;
&lt;p&gt;The first is that you can just look at the first couple elements of
the sequence and try to puzzle out a formula that works. &lt;span class=&#34;math inline&#34;&gt;\(1, 3, 6, 10, 15, \ldots\)&lt;/span&gt; seems plausible
that there should be a factor of &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;
in there, so what happens if we divide by &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt;? We get &lt;span class=&#34;math inline&#34;&gt;\(1,
\frac{3}{2}, 2, \frac{5}{2}, 3, \ldots\)&lt;/span&gt;, so that looks like it’s
going up by half each time, so &lt;span class=&#34;math inline&#34;&gt;\(\frac{n +
1}{2}\)&lt;/span&gt;, and that gives us our guess.&lt;/p&gt;
&lt;p&gt;The second is that sometimes you just have a hunch. I think it would
be weird to have a hunch in this case and not be able to spot the better
proof, but in other cases it will often be the case. This is
particularly true when think it’s true because of some sort of
“heuristic argument” that doesn’t actually work rigorously, but does
give you a pretty good idea of what the answer should be.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-11&#34;&gt;&lt;a href=&#34;#fn-11&#34; id=&#34;fnref-11&#34;&gt;&lt;sup&gt;11&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-11&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-11-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;11 &lt;/span&gt;&lt;p&gt;This is particularly common when you’re trying to show
something a bit weaker than strict equality, such as e.g. that some
quantity never gets too large.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;The third common way is that you proved it another way first, but
that proof was long and complicated or involved some advanced concepts
you don’t want to introduce here, so you “guessed” in the sense that you
already knew the right answer, but it was easier to prove it by
induction than convince the reader of it another way.&lt;/p&gt;
&lt;p&gt;OK, that’s enough adding numbers.&lt;/p&gt;
&lt;p&gt;What should you take away from this post?&lt;/p&gt;
&lt;p&gt;The first thing I’d like you to take away from it is a certain
familiarity with the notation. Being able to read this sort of notation
is entirely essential if you’re to read any mathematics at all.
Mathematics is built on notation, and the notation I’ve used here is
very common.&lt;/p&gt;
&lt;p&gt;Another thing I’d like you to take away from this is that there are
many ways to get the answer &lt;em&gt;and they all get the same answer&lt;/em&gt;.
There isn’t a single right way to do it, and there can’t be. Mathematics
is a discipline built on solving problems, and if there were always a
single correct way to do it, every problem would be trivial. Doing
mathematics is about developing facility with mathematical problems, and
getting a sense of how to solve them.&lt;/p&gt;
&lt;p&gt;Another is that figuring out which mathematical tool to use is a
skilled practice like any other - through repeated encounters with
mathematics you develop intuitions about what works and what to try.&lt;/p&gt;
&lt;p&gt;Reading other people’s mathematics is a good way to start with this
but importantly the proof that people show you is often not the proof
they used to come up with the idea. This means that often when reading
someone’s proof you will have some reaction like “Oh, that’s clever, but
I have no idea how you’d come up with that.” or “What the fuck is going
on here? I have no intuition for any of this”. If you’re lucky you can
just ask them how they came up with it, but if not then I think it’s
worth trying to prove it yourself by figuring out how all the different
pieces fit together and see how you’d do it for yourself.&lt;/p&gt;
&lt;p&gt;One reason these multiple avenues of proof are important is that
mathematics is not &lt;em&gt;just&lt;/em&gt; a discipline of problem solving, it’s a
discipline of concept formation, and one of the things that drives
concepts is developing a certain aesthetic sense and desire for
intuition around the problems you solve. Many concepts are discovered
because you look at a proof and go “I don’t like that proof. Can I do
better?”&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;There are some implicit notational conventions here by
the way. &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; is usually an index
variable. &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; are both expected to be integers by
that choice. This isn’t required, but it’s conventional. However, you
would only ever use integers as sum indexed or bounds like this, and
that’s not conventional, it doesn’t really make sense to use
non-integers here.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;Technically speaking we are using what’s called the
associativity rule of addition here.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;Well you’d add 101 to 5050 and get 5151 of course,
because you just worked out the sum from 1 to 100. But suppose you
&lt;em&gt;hadn’t&lt;/em&gt; done that.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;It’s very easy to make mistakes in mathematics, so it’s
good to have a habit of doing little cross checks like this where you
look at the answer you came up with and ask if it could possibly be
correct.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-5&#34;&gt;&lt;p&gt;I wrote about this in &lt;a href=&#34;/2025/04/algebra-and-insight&#34;&gt;algebra and insight&lt;/a&gt; but that
example only works if you’re already a moderately advanced
mathematician.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-5&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-6&#34;&gt;&lt;p&gt;Applications include “being a mathematician in the early
to mid 20th century”, “taking a maths exam”, “for the sheer joy of it”,
and “if you do a really large amount of mathematics every now and then
you will run into a case where you really do have a use for this and you
will be so delighted that you’ll ignore how rusty you’ve got at it”.
Also probably combinatorics or something like that.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-6&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-7&#34;&gt;&lt;p&gt;I really should include a diagram here but I can’t be
bothered, sorry. If you’re wondering how to draw &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; boxes, the answer is you don’t you draw
some fixed small number and assume that it generalises. This is why I
don’t like visual proofs that much.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-7&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-8&#34;&gt;&lt;p&gt;For the purpose of this post I mean. There are
infinitely many ways to do this, and at least several of the other ones
are interesting in their own right.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-8&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-9&#34;&gt;&lt;p&gt;Any philosophers reading this, don’t panic! It’s a
completely different meaning of the word “induction” that has nothing to
do with the philosophical notion of induction.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-9&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-10&#34;&gt;&lt;p&gt;This is in fact the same calculation we did in the
even/odd case above.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-10&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-11&#34;&gt;&lt;p&gt;This is particularly common when you’re trying to show
something a bit weaker than strict equality, such as e.g. that some
quantity never gets too large.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-11&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>What is probabilistic programming?</title>
    <link href="https://drmaciver.com/notebook/2025/04/what-is-probabilistic-programming/" />
    <id>https://drmaciver.com/notebook/2025/04/what-is-probabilistic-programming/</id>
    <updated>2025-04-23</updated>
    <content type="html">


&lt;p&gt;Friends and family often ask me what probabilistic programming is.
This isn’t very surprising, as I currently work in probabilistic
programming. Unfortunately I haven’t had a &lt;em&gt;very&lt;/em&gt; good answer for
them, as this is quite a recent development for me and I haven’t fully
understood the boundaries of the field.&lt;/p&gt;
&lt;p&gt;I think also it’s hard to answer because the field is a little
confused about what it is, and there’s a “What the field says it is”
answer and “What the field actually is” answer.&lt;/p&gt;
&lt;p&gt;So I’m going to try to give my own answer of what I think the field
is. It will be a bit overbroad and claim some territory that could
equally be put in other fields, but I think the overbroad definition is
more informative than the overly narrow one.&lt;/p&gt;
&lt;p&gt;First, let me give you a narrow answer that I think people would
classically give:&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt; Probabilistic programming is the
field of developing probabilistic programming languages.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;And &lt;a href=&#34;https://en.wikipedia.org/wiki/Probabilistic_programming&#34;&gt;the
wikipedia page&lt;/a&gt; gives.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;What’s a probabilistic programming language? Well it’s a particular
type of tool for doing the thing I’m about to describe in the general
answer.&lt;/p&gt;
&lt;p&gt;So, this is what I think: Probabilistic programming is the field of
constructing random samplers with precise distributional properties,
centrally but not exclusively&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-2&#34;&gt;&lt;a href=&#34;#fn-2&#34; id=&#34;fnref-2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-2&#34; type=&#34;checkbox&#34;/&gt; with the goal of
developing better Monte Carlo methods for doing statistics.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-2-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;2 &lt;/span&gt;&lt;p&gt;That is, this is the origin of the field and the major
driver of progress in it, but the techniques are more broadly useful and
using them to do other things would still be considered probabilistic
programming.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;I will now unpack all of those terms so that this definition actually
makes sense.&lt;/p&gt;
&lt;p&gt;A &lt;em&gt;random sampler&lt;/em&gt; is a program that, when run, generates some
value, typically at random. You could imagine e.g. a coin flip, which
randomly generates either “heads” or “tails” as your prototypical random
sampler. The work I did in Hypothesis is also an example of a random
sampler, where it generates test cases for checking your program with by
making a bunch of choices at random.&lt;/p&gt;
&lt;p&gt;Random samplers have the virtue of being very easy to construct - you
can just write a simple program that makes a bunch of random choices and
bam you’ve got a random sampler.&lt;/p&gt;
&lt;p&gt;However, it’s often hard to reason about the behaviour of random
samplers, and in particular to construct random samplers that behave in
particular ways.&lt;/p&gt;
&lt;p&gt;For example, suppose you were creating a random sampler to simulate
some physical process - say, the weather - it’s quite important that if
about 10% of your random samples say it’s going to rain tomorrow, then
you should expect that about 10% of the time tomorrow there will be
rain.&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-3&#34;&gt;&lt;a href=&#34;#fn-3&#34; id=&#34;fnref-3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-3&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-3-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;3 &lt;/span&gt;&lt;p&gt;What does that mean? Don’t worry about it too precisely.
If you want to worry about it more precisely, read &lt;a href=&#34;/2021/10/probably-enough-probability-for-you&#34;&gt;Probably enough
probability for you&lt;/a&gt; and &lt;a href=&#34;/2025/03/world-counting-as-a-tool-for-understanding-probability&#34;&gt;World
counting as a tool for understanding probability&lt;/a&gt;&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Having random samplers that have accurate distributional properties
like this - e.g. that our random model of the weather accurately
reflects what we should believe about the weather - is an essential
property for doing &lt;em&gt;monte carlo simulations&lt;/em&gt;, which just means
that you run a bunch of random simulations and use those as a
representative of the range for the true value you’re trying to
calculate. e.g. if you want to know if it’s going to rain on Tuesday,
run a few thousand weather simulations and see what fraction of them
rain on Tuesday. If you want to know the total rainfall you should
expect, average the total rainfall across all of your simulations,
etc.&lt;/p&gt;
&lt;p&gt;These are not the exact calculations that you might hope for in
classical statistics - what you get is a random number, and if you reran
the simulation you’d get a slightly different number, but it is a random
number that you can count on being very close to the true number you
want,&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-4&#34;&gt;&lt;a href=&#34;#fn-4&#34; id=&#34;fnref-4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-4&#34; type=&#34;checkbox&#34;/&gt; and you can get it as close as you
like by running more simulations.&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-4-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;4 &lt;/span&gt;&lt;p&gt;Figuring out how close is part of the general body of
theory needed and developed in doing probabilistic programming.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Now, that’s all very well, but what this gives you is an accurate
estimator of these values &lt;em&gt;in your simulation&lt;/em&gt;. How do you get
your simulation right?&lt;/p&gt;
&lt;p&gt;This is where probabilistic programming and its toolkit for trying to
control distributional properties of samplers comes in.&lt;/p&gt;
&lt;p&gt;In particular it often comes in via trying to do &lt;em&gt;Bayesian
inference&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Bayesian inference works as follows:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;You start with some very general model of the world (a “prior
distribution”), and what data you would expect to see given specific
configurations of that world.&lt;/li&gt;
&lt;li&gt;You feed in a bunch of actual data.&lt;/li&gt;
&lt;li&gt;You get an updated model of the world (a “posterior distribution”)
out.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A great deal of probabilistic programming is concerned with how to do
this sort of Bayesian updating on random samplers.&lt;/p&gt;
&lt;p&gt;This allows for a very general approach to doing statistics:&lt;/p&gt;
&lt;ol type=&#34;1&#34;&gt;
&lt;li&gt;You write a random sampler for a very broad world model.&lt;/li&gt;
&lt;li&gt;You feed in a bunch of data and do a Bayesian update on your sampler
to take into account the data.&lt;/li&gt;
&lt;li&gt;You run Monte Carlo simulations and use them to make predictions
about the world.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All of the hard part is in Step 2. This is an almost impossibly
difficult problem to do in general. Many of the classic probabilistic
programming tools try to do this, and what you get is tools that
sometimes work very well and sometimes just run unusably slowly, with
very little ability to predict which situation you’ll be in or much
recourse for fixing it when it happens.&lt;/p&gt;
&lt;p&gt;What the lab I’m in tries to do is to instead provide a toolkit that
makes it easy to write your own algorithms for your specific problem, by
providing an API for samples that you can perform a variety of
manipulations on - either standard algorithms or ones of your own
creation - that let you perform the update.&lt;/p&gt;
&lt;p&gt;But, in general, doing this bit well is where most of the active work
in probabilistic programming is, and why the tools have historically
been a bit underused. We’re hopeful that a mix of new improvements in
computing and new advances in probabilistic programming allow us to do a
lot better than we’ve previously seen, but this is still an active
research and development area, so we’ll see how that goes.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;And &lt;a href=&#34;https://en.wikipedia.org/wiki/Probabilistic_programming&#34;&gt;the
wikipedia page&lt;/a&gt; gives.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-2&#34;&gt;&lt;p&gt;That is, this is the origin of the field and the major
driver of progress in it, but the techniques are more broadly useful and
using them to do other things would still be considered probabilistic
programming.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-2&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-3&#34;&gt;&lt;p&gt;What does that mean? Don’t worry about it too precisely.
If you want to worry about it more precisely, read &lt;a href=&#34;/2021/10/probably-enough-probability-for-you&#34;&gt;Probably enough
probability for you&lt;/a&gt; and &lt;a href=&#34;/2025/03/world-counting-as-a-tool-for-understanding-probability&#34;&gt;World
counting as a tool for understanding probability&lt;/a&gt;&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-3&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn-4&#34;&gt;&lt;p&gt;Figuring out how close is part of the general body of
theory needed and developed in doing probabilistic programming.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-4&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Algebra and insight</title>
    <link href="https://drmaciver.com/notebook/2025/04/algebra-and-insight/" />
    <id>https://drmaciver.com/notebook/2025/04/algebra-and-insight/</id>
    <updated>2025-04-22</updated>
    <content type="html">


&lt;p&gt;I was reading up on Markov Chains today, as one does, partially
reminding myself about them and partly filling in some gaps in my
knowledge.&lt;/p&gt;
&lt;p&gt;One bit I was reading about was reversible distributions. If you’ve
got some transition matrix &lt;span class=&#34;math inline&#34;&gt;\(P_{ij}\)&lt;/span&gt;,
a reversible distribution for it is a probability distribution &lt;span class=&#34;math inline&#34;&gt;\(q\)&lt;/span&gt; over the states such that &lt;span class=&#34;math inline&#34;&gt;\(q_i P_{ij} = q_j P_{ji}\)&lt;/span&gt;. If you also lack
any intuition about what that means, me too at the point at which it’s
introduced. The broad intuition is that a Markov chain in a reversible
distribution can be “run backwards in time” and you can’t tell the
difference, but the main significance is that it’s an easy property to
verify that has strong consequences.&lt;/p&gt;
&lt;p&gt;Specifically, it’s a theorem that every reversible distribution is
stationary. That is, if &lt;span class=&#34;math inline&#34;&gt;\(q\)&lt;/span&gt; is
reversible then &lt;span class=&#34;math inline&#34;&gt;\(q_i = \sum\limits_j P_{ji}
q_j\)&lt;/span&gt; for all &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; - the
distribution is not changed by running the Markov chain forwards.&lt;/p&gt;
&lt;p&gt;The proof of this presented in the text I was reading is as
follows:&lt;/p&gt;
&lt;p&gt;We can write &lt;span class=&#34;math inline&#34;&gt;\(q_i = q_i \sum\limits_j
P_{ij}\)&lt;/span&gt; (because it’s a standard property of transition matrices
that this sum is 1), so &lt;span class=&#34;math inline&#34;&gt;\(q_i = \sum\limits_j
q_i P_{ij} = \sum\limits_j q_j P_{ji}\)&lt;/span&gt;, so &lt;span class=&#34;math inline&#34;&gt;\(q\)&lt;/span&gt; is stationary.&lt;/p&gt;
&lt;p&gt;I can follow this proof of course. It’s very simple algebra. But
there’s something about it that feels like a magic trick. I don’t feel
like I’ve got any actual insight into the nature of reversible
distributions or have any sense of why they must be stationary from
this. I’m sure there are plenty of mathematicians who could, and I’m not
even sure that I &lt;em&gt;need&lt;/em&gt; that insight, but it bugged me.&lt;/p&gt;
&lt;p&gt;Thinking about it a bit more lead me to come up with the following
alternative proof&lt;label class=&#34;margin-toggle sidenote-number&#34; for=&#34;sn-1&#34;&gt;&lt;a href=&#34;#fn-1&#34; id=&#34;fnref-1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;/label&gt;&lt;input class=&#34;margin-toggle&#34; id=&#34;sn-1&#34; type=&#34;checkbox&#34;/&gt;&lt;/p&gt;&lt;aside class=&#34;sidenote&#34; id=&#34;sn-1-content&#34;&gt;&lt;span class=&#34;sidenote-number-label&#34;&gt;1 &lt;/span&gt;&lt;p&gt;Which I suspect I have cribbed in some sort of
half-remembered manner from Geoffrey Grimmett’s “Probability on Graphs”,
but if so it was useful to recreate it from memory anyway.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;One way to think about distributions on markov chains is that you’ve
got a certain amount of “stuff” (probability mass) floating around, and
at each step that you run the Markov chain, this probability mass flows
around the graph.&lt;/p&gt;
&lt;p&gt;When you’ve got a probability distribution &lt;span class=&#34;math inline&#34;&gt;\(q\)&lt;/span&gt;, all of &lt;span class=&#34;math inline&#34;&gt;\(q_i\)&lt;/span&gt; flows out of node &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt;, and &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_j q_j P_{ji}\)&lt;/span&gt; flows into it.
That is, for each node &lt;span class=&#34;math inline&#34;&gt;\(j\)&lt;/span&gt;, the mass
in it flows out to every other node, and the fraction of it that goes to
&lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; is &lt;span class=&#34;math inline&#34;&gt;\(P_{ji}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;A distribution is stationary if for all &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt;, &lt;span class=&#34;math inline&#34;&gt;\(q_i =
\sum\limits_j P_{ji} q_j\)&lt;/span&gt;, but equally we can write this as
&lt;span class=&#34;math inline&#34;&gt;\(q_i - \sum\limits_j P_{ji} q_j  =
0\)&lt;/span&gt;. The net flow of mass out of &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; is 0.&lt;/p&gt;
&lt;p&gt;We can write this flow of mass out of &lt;span class=&#34;math inline&#34;&gt;\(q_i\)&lt;/span&gt; as &lt;span class=&#34;math inline&#34;&gt;\(q_i =
\sum\limits_j q_i P_{ij}\)&lt;/span&gt; - the sum of the mass flowing to each
&lt;span class=&#34;math inline&#34;&gt;\(j\)&lt;/span&gt;. So the net flow of mass out of
&lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; is &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_j P_{ij} q_i - P_{ji} q_j\)&lt;/span&gt;.
That is, there is a net flow along each edge, let’s say &lt;span class=&#34;math inline&#34;&gt;\(f_{ij} = P_{ij} q_i - P_{ji} q_j\)&lt;/span&gt;. The
probability of &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; remains unchanged
if &lt;span class=&#34;math inline&#34;&gt;\(\sum\limits_j f_{ij} = 0\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;However, the reversability condition is precisely that all of the
&lt;span class=&#34;math inline&#34;&gt;\(f_{ij} = 0\)&lt;/span&gt;. That is, there is no
net flow of mass along each edge. As a result, a reversible distribution
is necessarily stationary, because a much stronger condition applies:
Not only is the total net flow across the edges from &lt;span class=&#34;math inline&#34;&gt;\(i\)&lt;/span&gt; equal to 0, it’s 0 along each edge.&lt;/p&gt;
&lt;p&gt;This proof is in some sense much worse. It’s longer and involves more
algebra rather than less. But after reading this proof I felt like I
understood why reversibility obviously implied a distribution was
stationary, and also why it was a much stronger condition than being
stationary.&lt;/p&gt;
&lt;p&gt;I think mathematics - and many other things - benefits hugely from
this sort of chewing on a problem and seeing it from different angles
until it actually makes sense. If you just know that a result is true,
you often find yourself unable to really use it. If you understand at an
intuitive level why it’s true, it will stick with you and you can really
see how to apply it, including in cases where it doesn’t quite hold but
something similar does. Proof without developing insight alongside it is
certainly better than no proof, but it’s in some sense fundamentally
fragile and untrustworthy, and it’s often better to mull it over until
you find the right way to break up the problem to actually allow it to
make sense at an emotional level.&lt;/p&gt;
&lt;section class=&#34;mobile-footnotes&#34;&gt;&lt;hr/&gt;&lt;ol&gt;
&lt;li id=&#34;fn-1&#34;&gt;&lt;p&gt;Which I suspect I have cribbed in some sort of
half-remembered manner from Geoffrey Grimmett’s “Probability on Graphs”,
but if so it was useful to recreate it from memory anyway.&lt;/p&gt; &lt;a class=&#34;footnote-back&#34; href=&#34;#fnref-1&#34;&gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Resuming habits</title>
    <link href="https://drmaciver.com/notebook/2025/04/resuming-habits/" />
    <id>https://drmaciver.com/notebook/2025/04/resuming-habits/</id>
    <updated>2025-04-21</updated>
    <content type="html">


&lt;p&gt;I took a deliberate break from the daily posting habit over the
easter weekend. I think this was the right choice.&lt;/p&gt;
&lt;p&gt;But now, I’m faced with a perennial difficult problem: Once you’ve
paused a habit, you’ve lost inertia, and now you have to deal with the
difficult task of starting again from a cold start.&lt;/p&gt;
&lt;p&gt;What I’ve often found in the past is that this causes you to delay,
and then the habit develops an ugh field, and this makes it harder and
harder to start, and suddenly months have passed without you having
touched it.&lt;/p&gt;
&lt;p&gt;I think the solution to this is that whenever resuming a habit, even
after an incredibly short break but certainly after a long one, you
should deliberately do so in the lowest effort way possible.&lt;/p&gt;
&lt;p&gt;Like this.&lt;/p&gt;
</content>
  </entry>
  
</feed>