• Struggle Switch

    A metaphor for how we respond to negative emotions such as anxiety, anger, sadness. When the struggle switch is on, one emotion leads to another in a cycle. For example, feeling anxious then worrying that your anxiety is going to get worse is essentially being anxious about anxiety. When the struggle switch is off, we observe the negative feeling using mindfulness and taking action on what we can control. This helps disengage from the negative emotions and avoid the struggle.

    See also:


  • Panspermia Theory

    The idea that life originated on another planet and was transported to Earth. It’s difficult to prove or disprove in a similar way to the Silurian hypothesis, evidence is difficult to obtainβ€”artifacts from civilizations don’t last that long, evidence of life is not visible on any likely originating planet within our solar system.

    See also:

    • An extraterrestrial body like Oumuamua could fit

  • Friend Catcher

    An activity or action one can do regularly that draws people to you because you are providing something of value. For example, a blog with content about helping you negotiate salary at a tech company or a podcast that draws people from your industry. This gives you something shared to talk about with strangers and build relationships which opens up new possibilities.


  • Plain Text Files Are a Universal Storage Medium

    Plain text is the lingua franca for storing information that is simultaneously readable and writeable by computers and humans. It can even be converted to physical form and encoded back to digital form with no loss. Plain text file formats are unlikely to go away.

    Plain text ceases to be portable when the grammar needed to parse the content is unstable. This is true in both spoken languages and computer interpretation. For example, markdown is stored in plain text, but can’t always be reliably interpreted for formatting because there are variations in the grammar.

    See also:

    • EBNF grammars could make plain text storage more universal

  • Time Horizons as a Competitive Advantage

    A company can use time horizons as a competitive advantage by being willing to wait longer for returns on investment than competitors. The set of ideas possible with a longer time horizon is inclusive of the set of ideas in shorter time horizon, but also includes more ideas that are not available in the shorter. Assuming some of those ideas are fruitful, there is a fundamental advantage to having a longer time horizon than the competition.

    This is an argument for keeping companies private for longer so they don’t need to operate in lockstep with the market’s quarterly earnings reports.

    See also:


  • Finite State Machine

    A model of computation where there is exactly one state at a time of a fixed number states. The current state can be changed by transitioning to another. Using state machines has the benefit of 1) being easy to reason about what the program does e.g. security audit and 2) making obvious what a valid state is so the programmer doesn’t accidentally put into a ‘bad’ state i.e. reduce bugs.

    Example applications:

    • Modeling authentication flows using a deterministic state machine to prove it can not be exploited
    • Modeling a user interface that has several modes to prevent bugs where a user gets stuck in an unrecoverable state

    The following example uses rustlang’s type system to model a finite state machine where transitions can be passed additional typed arguments:

    pub struct StateMachine<T> {
        pub state: T
    }
    
    pub struct StateMachineWithArgs<T> {
        pub state: T,
    }
    
    pub trait TransitionFrom<T, R> {
        fn transition_from(state: T, args: R) -> Self;
    }
    
    pub trait State {
        type Args;
        fn new(args: Self::Args) -> Self;
    }
    
    impl<T> StateMachineWithArgs<T> where T: State {
        pub fn new(state: T) -> Self {
            StateMachineWithArgs { state }
        }
    }
    
    struct StateOne;
    impl State for StateOne {
        type Args = ();
    
        fn new(args: Self::Args) -> Self {
            Self {}
        }
    }
    
    struct StateTwo;
    impl State for StateTwo {
        type Args = ();
    
        fn new(args: Self::Args) -> Self {
            Self {}
        }
    }
    
    struct StateThree;
    impl State for StateThree {
        type Args = ();
    
        fn new(args: Self::Args) -> Self {
            Self {}
        }
    }
    
    // Implement state transitions by implementing the TransitionFrom trait.
    // Doing this enforces only known transitions at compile time i.e.
    // you get a compile time error that two states can't be transitioned to
    
    impl TransitionFrom<StateMachineWithArgs<StateOne>, ()> for StateMachineWithArgs<StateTwo> {
        fn transition_from(state: StateMachineWithArgs<StateOne>, args: ()) -> StateMachineWithArgs<StateTwo> {
            StateMachineWithArgs::new(StateTwo::new(args))
        }
    }
    
    impl TransitionFrom<StateMachineWithArgs<StateTwo>, ()> for StateMachineWithArgs<StateThree> {
        fn transition_from(state: StateMachineWithArgs<StateTwo>, args: ()) -> StateMachineWithArgs<StateThree> {
            StateMachineWithArgs::new(StateThree::new(args))
        }
    }
    
    mod test_state_machine {
        use super::*;
    
        #[test]
        fn it_works() {
            // Initialize the state machine starting with the first state
            let state_one = StateMachineWithArgs::new(StateOne::new(()));
    
            // Transition to the next state
            let state_two = StateMachineWithArgs::<StateTwo>::transition_from(state_one, ());
    
            // This won't compile because it's not a valid transition!
            StateMachineWithArgs::<StateThree>::transition_from(state_one, ());
        }
    }
    

    In python with typing:

    import typing as t
    from functools import singledispatch
    from dataclasses import dataclass
    
    
    @dataclass
    class State1():
        check_me: bool
    
    class State2():
        pass
    
    class State3():
        pass
    
    class State4():
        pass
    
    State = t.Union[
        State1,
        State2,
        State3,
        State4,
    ]
    
    @singledispatch
    def transition(state: State) -> t.Optional[State]:
        pass
    
    @transition.register
    def state1_to_state2(state: State1) -> t.Optional[t.Union[State2, State3]]:
        if state.check_me:
            return State2()
        return State3()
    
    @transition.register
    def state2_to_state3(state: State2) -> t.Optional[State3]:
        return State3()
    
    @transition.register
    def state3_to_state4(state: State3) -> t.Optional[State4]:
        return State4()
    
    # Run the state machine to completion
    
    transition(transition(transition(State1(check_me=True))))
    transition(transition(State1(check_me=False)))
    

  • Cassowary Constraint Solver

    An algorithm used for constraining elements in a UI such as adjusting layout based on the screen size. It is designed to handle linear equality and inequality efficiently (e.g. show window to the left of the other and gracefully degrading if there isn’t space).

    Read the paper

    See also:

    • tui-rs uses Cassowary for laying out text-based user interfaces in the terminal
    • GraphPlan - another kind of constraint solver that uses both a novel data representation of the problem domain and a solver

  • Product Work Is a Pursuit of Facts About the User, Market, and Their Problems

    When building products you are always learning new things about the user, the market, and their problems. Sometimes this happens intentionally (e.g. doing user research) and sometimes it happens unintentionally (e.g. adding a feature that suddenly takes off in usage). Ideally these facts are made explicit and is accretive over time so that new facts leads to better understanding over time which leads to more successful products. This also requires flexibility and updating ones model as new information is uncovered.

    This is similar to the ideas from lean startup where the goal is to efficiently validate critical assumptions by building the minimum required to learn from users.

    Facts don’t necessarily need to be provable to be valuable, just correct (a G-statement). GΓΆdel Incompleteness For Startups argues that the unprovable yet true facts are the most scarce and therefore most valuable.