Peter Stuifzand

Garden

I’m trying to create a few pages about things, that are more like notes in different stages of completion.

Theory of Constraints

Goal Trees are at the start of what you want to achieve.

Current Reality Trees help you find the current problems with your system.

Solving Conflicts is at the base of solving your problems. Finding conflicts in your system is one of your main priorities.

Thinking Clearly shows the four obstacles that keep you from seeing and solving your problems.

The Proconcloud method is a method for making better decisions. It helps to create a plan to take action or experiment.

The list

  • Counter, Tensor and View

    The succ function can be called prod(max) times. The function can also be written with a carry or overflow “bit”. Then when i == len(counter) the return value should be counter, True. The return value of the last line, counter, False.

    def succ(counter, max):
      i = 0
      counter[i] += 1
      while counter[i] == max[i]:
        counter[i] = 0
        i += 1
        if i == len(counter): return counter, i
        counter[i] += 1
      return counter, i
    

    This function can be used to simulate multiple for-loops, where every element of max notes the number of loops. The i return value, shows which for-loop just overflowed. This can be used to simulate a step in that loop.

  • Category of 3 bit binary numbers

    Objects are three bit binary numbers. Morphisms exists when you can flip some bits from 1 to 0 (but not the other way around).

    digraph G {
    
    "000";
    "001";
    "010";
    "011";
    
    "100";
    "101";
    "110";
    "111";
    
    "001" -> "000";
    "010" -> "000";
    "100" -> "000";
    
    "011" -> "001";
    "011" -> "010";
    
    "111" -> "101";
    "111" -> "110";
    "111" -> "011";
    
    "101" -> "100";
    "101" -> "001";
    "110" -> "100";
    "110" -> "010";
    }
    
  • Streaming AI with htmx

    Below is a simplified chat bubble for an conversation with an LLM.

    This template is written in Templ and uses htmx to fill the chat bubble with incoming content. The incoming content is sent with SSE using the v2 version r3labs/sse Server Sent Events server. This version supports SplitData which makes it easier to sent the HTML for htmx. Adding a <span></span> around every token helps with the spaces in the tokens.

    templ StreamingChatBubble(url string, message string) {
        <div>
            <span>user</span>
            <div>{{message}}</div>
        </div>
        <div
            hx-ext="sse"
            sse-connect={ url }
            sse-swap="done"
            hx-swap="outerHTML"
        >
            <span>assistant</span>
            <div
                sse-swap="message"
                hx-swap="beforeend"
            ></div>
        </div>
    }
    
    templ StreamingChatComplete(message string) {
        <div class="...">
            <span>assistant</span>
            <div>{{message}}</div>
        </div>
    }
    

    The url contains the SSE url with a stream parameter. The Go web server uses the code to find the right channel for updates. The updates to the channel are sent to the frontend. Each of the messages has a type. The messages with partial LLM response have the type message. And then when all partial responses are sent, the done message is sent with the complete chat bubble. This also removes the connection to the message channel.

  • Software versioning and security problems

    To determine if your new version is compatible with your previous version, you need to know how the users use the software.

    Security errors in libraries don’t also have to errors in the software that uses it. Some errors are only problems if the client software uses the software in a way that exploits the error.

    The severity of the error in the library does not automatically create an error of the same severity in the client.

  • Proconcloud method

    Necessity assumptions

    Why is it necessary?

    • Our attention is limited.
    • There is a gap between how well we make decisions and how well we can make decisions.
    • We want to make better decisions to be able to live a meaningful life.

    Strategy

    What for?

    We want to avoid the following 5 decision mistakes.

    • Waste your limited attention
    • Suggest a solution prematurely or blame other people
    • Only try one solution, or use a compromise
    • Ignore valid reservations from stakeholders
    • Not learning from experience and performing the wrong experiments

    Parallel assumptions

    Why is it possible?

  • Strategy and tactics

    The template

    Title

    The title of the strategy (and tactic).

    Necessary assumptions

    Why is this necessary?

    Strategy

    What for?

    Parallel assumptions

    Why is it possible? Why is it difficult?

    Tactic

    How?

    Sufficiency assumptions

    Why is sufficient?

    Resources

  • Goal tree color scheme

    A nice way to use the goal tree is to use a color scheme to show which goals are already fulfilled and which are not. A schema that can be used is red, orange, green.

    colorwhen
    RedThe condition is not fulfilled
    OrangeThe condition is partially fulfilled
    GreenThe condition is completely and satisfactorily fulfilled

    The nice thing about the tree and the color scheme is that when you have colored the leaf nodes, you can then combine the colors upwards. When all child nodes have the same color, use that colors, when it’s a mix you use Orange.

  • Goal Tree

    A Goal Tree consists of nodes and arrows. The nodes are your goals, critical success factors and necessary conditions. The arrows are the logical connections. These arrows connect goals with the sub goals.

    An arrow can be read as “In order to have X, we must have Y”. In a small diagram, this looks like: X ← Y.

    You start with the Goal. The Critical Success Factors are necessary to reach your goal. And you have Necessary Conditions that are necessary to reach the Critical Success Factors.

  • Improve a Goal tree

    To improve a Goal tree, you need to examine the items in the tree. Using a technique similar to five why’s you can improve the goal tree.

    Ask the question: why do you need it?

    Example: garden shed

    Let’s look at the goal of “Garden shed”. Why do I need a garden shed? Because I need to store my garden tools. Why do I need to store my tools? I want to have a clean garden. Why do I need to have a clean garden? To have a safe garden for the children to play.

  • Tasks and notes

    In Jira, an issue is a task and a note at the same time. The issue is a place to focus the information to the point where you can complete some piece of work.

  • Four obstacles to thinking clearly

    These are four obstacles to clear thinking.

    Reality is complex

    Reality is complex and you need complex solutions to solve problems.

    Eli Goldratt defined the Principle of Inherit Simplicity. This means that reality is inheritly simple. Because of this simplicity, conflicts can be resolved using the following steps.

    1. Clarify the conflict
    2. Surface the assumptions
    3. Challenge the wrong assumptions

    There is a relation with shadow work. In shadow work you should also keep conflicts in your mind and try to merge them. One way to find ways to solve conflicts is to find assumptions and try to find where your thinking is wrong.

  • Conflicts

    The Theory of Constraints talks a lot about conflicts. Conflicts are what keeps us from becoming better. On part to becoming better at TOC is to know when you are in a conflict. There are certain words that can help you to notice a conflict.

    TOC often talks about the large conflicts. These are the conflicts that most people have a problem with. When you dissolve these conflicts you help the most people.

  • Hugo and Tailwind

    This current website is built with Hugo. I wanted to try to build my own theme with Tailwind. With Hugo it is not very easy to use Tailwind. The biggest problem I found was that Hugo does not reload CSS with livereload.

  • Current Reality Tree

    The Current Reality Tree is a sufficiency tree shows (part of) the current situation of a system. It is used to model how causes and effects lead to certain undesirable effects (UDE). The arrows in the tree show which cause leads to which effect.

    When there multiple arrows from a cause to an effect, then each cause creates the effect by itself. Removing one of the causes will perhaps lessen the effect, but not remove it completely.

  • Compatibility of Markdown in Logseq

    These are some of my thoughts about Markdown in Logseq. In this note I try to find the assumptions behind the conflict.

    This is thinking I did on my and is not associated with how Logseq will work now or in the future, this also does not represent goals of the Logseq team. This is what I think the goals could be.

    The conflict

    Goal tree

    This is the goal tree, for some of the features we “need”.

© 2025 Peter Stuifzand