Three things to watch

An event arrives before I have decided to call it a problem. A working relationship can be valuable even when nobody owes me a lifetime of approval. And when the alarm rings, my feet can hit the floor before I finish designing a better system for getting up. These are three entries from my journal, redrawn so you can follow what happens in each case.


Trace an event through the diagram


Where did the problem come from?

Follow the event through the four classes

class LifeEvent:
    """The common starting point for anything that happens."""
    def process(self):
        pass
class Awareness:
    """Notice the interpretation before acting on it."""
    def __init__(self):
        self.is_awake = False
        self.question = "What is actually wrong?"
    def wake_up(self):
        self.is_awake = True
        return self
    def examine(self, event):
        if not self.is_awake:
            return ProblemEvent(event)
        if self.ask_fundamental_question(event):
            return FactEvent(event)
        else:
            return FactEvent(event)
    def ask_fundamental_question(self, event):
        print(f"{event}: {self.question}")
        return True
    def catch_lapse_in_awareness(self):
        if not self.is_awake:
            print("I missed that one.")
            self.wake_up()
class ProblemEvent(LifeEvent):
    def __init__(self, event):
        self.event = event
        self.story = self.create_story()
        self.suffering = True
    def process(self):
        return f"{self.event} is a disaster! {self.story}"

class FactEvent(LifeEvent):
    def __init__(self, event):
        self.event = event
        self.suffering = False
    def process(self):
        return f"{self.event} happened. I can deal with it."
class SufferingChecker:
    @staticmethod
    def is_real_problem(event):
        questions = ["Can I get enough to eat?", "Am I without a place to sleep?", "Is my survival at risk?"]
        for q in questions:
            if answer_is_yes(q):
                return True
        return False

class Emptiness:
    _instance = None
    def __new__(cls):
        if cls._instance is None:
            cls._instance = super().__new__(cls)
        return cls._instance
    def reveal_truth(self, any_problem):
        return None

Can I be useful and still let someone go?

The exchange, the attachment and the interrupt

class Relationship:
    def __init__(self):
        self.attachment = None
    def maintain(self):
        pass
    def leave(self):
        pass

class ValueExchange:
    def provide_value(self):
        pass
    def receive_value(self):
        pass
    def is_sustainable(self):
        return self.provide_value() is not None
class WorkRelationship(Relationship, ValueExchange):
    def provide_value(self):
        return self.contribute_to_profit()
    def maintain(self):
        return "Stay in the job" if self.is_sustainable() else "Move on"

class PersonalRelationship(Relationship, ValueExchange):
    def provide_value(self):
        return any([self.emotional_support(), self.material_help(), self.genuine_care()])
class LeavingEvent:
    def __init__(self, who_leaves):
        self.who_leaves = who_leaves
        self.awareness = Awareness()
    def process(self):
        if self.who_leaves == "me":
            return SelfInitiatedLeaving().execute()
        elif self.who_leaves == "the other person":
            return OtherInitiatedLeaving().execute()

class SelfInitiatedLeaving:
    def execute(self):
        return "I chose this. I can take responsibility for it."

class OtherInitiatedLeaving:
    def execute(self):
        return "Their decision need not define me."
class WorkStrategy:
    def decide_to_stay(self, current_state):
        pass

class FreedomStrategy(WorkStrategy):
    def decide_to_stay(self, current_state):
        if not current_state.is_helpful():
            return JustDoIt().leave()
        return True

class CommitmentStrategy(WorkStrategy):
    def __init__(self, years=3):
        self.commitment_period = years
        self.start_date = now()
    def decide_to_stay(self, current_state):
        if self.want_to_leave():
            print("There's the urge again. I can notice it without acting on it.")
            return JustDoIt().stay()
        if self.period_completed():
            return self.evaluate_next_step()
class RestlessnessHandler:
    def __init__(self):
        self._inner_turmoil = "I want to quit."
        self._actual_need = None
    def process(self):
        return self.aware_and_continue()
    def aware_and_continue(self):
        return "Stay and use the job as practice."

class RegretPreventionSystem:
    def __init__(self, history):
        self.past_patterns = history
    def analyze(self):
        return CommitmentStrategy(3) if self.has_regret_pattern() else FreedomStrategy()
    def has_regret_pattern(self):
        pattern = ["leave → miss what I had → regret", "change jobs → miss the old one → regret"]
        return any(p in self.past_patterns for p in pattern)
class PatternInterruptSystem:
    def __init__(self):
        self.stages = [ImmediateInterrupt(), FactCheck(), ValueRealignment()]
    def execute(self):
        for stage in self.stages:
            if stage.process():
                return "Interrupted the pattern"
        return "Try again next time"

class ImmediateInterrupt:
    def process(self):
        return physical_action()

class FactCheck:
    def process(self):
        questions = ["What happened?", "Does it define me?", "Will it matter in a week?"]
        return self.analyze_answers(questions)

class ValueRealignment:
    def process(self):
        my_core_values = ["doing a little better", "improving the process", "solving a problem myself"]
        return "Did I put these values into practice today?"
class RecognitionNeedCircuitBreaker:
    def __init__(self):
        self.strategies = {
            "physical_reset": self.physical_interrupt,
            "give_it_time": self.time_delay,
            "change_perspective": self.reverse_question,
            "return_to_values": self.value_anchoring,
            "log_the_pattern": self.pattern_logging,
        }
    def physical_interrupt(self):
        return "There I go again." + physical_stimulus()
    def time_delay(self):
        return defer_emotion_evaluation(hours=48)
    def reverse_question(self):
        questions = ["How would I assess my work from the CEO's chair?", "Would I do it for fun if nobody noticed?"]
        return contemplate(questions)
    def value_anchoring(self):
        return daily_practice("Three contributions I can make today", "Three contributions I made today")
    def pattern_logging(self):
        return track_for_weeks(2)
class TrueFreedom:
    _instance = None
    def __new__(cls):
        if cls._instance is None:
            cls._instance = super().__new__(cls)
        return cls._instance
    def manifest(self):
        return {"free to leave": True, "helpful": True, "no regret": True, "can spot the pattern": True}

class DharmaConversation(Relationship, ValueExchange):
    def __init__(self):
        super().__init__()
        self.price = 0
        self.attachment = None
    def provide_value(self):
        return "I'm glad if it helps."
    def receive_value(self):
        return "Nothing lost"
    def is_sustainable(self):
        return True
class BinaryTrap:
    def __init__(self):
        self.false_premise = "I have to be special."
        self.result = {"praised": "superior", "overlooked": "inferior"}
    def escape(self):
        return "I'm just me."

class OrdinarySelf:
    def __init__(self):
        self.need_to_prove = None
        self.comparison = None
        self.value = self.exist()
    def exist(self):
        return "simply being here"
    def daily_practice(self):
        checklist = {"eat": True, "work": True, "family": True, "compare": False}
        return all(checklist.values())

class SeeingMyself:
    def __init__(self):
        self.i_am = "an ordinary person"
        self.need_to_be = "an ordinary person"
        self.gap = 0
    def see_through_three_lenses(self):
        return {"in the numbers": "one among seven billion", "in Buddhist practice": "non-self, dependent arising and emptiness", "in everyday life": "eat, work and love"}
    def daily_check(self):
        if self.comparing_with_others():
            print("There I go comparing again.")
            return self.reset_to_ordinary()
        return "I lived an ordinary day well."

What happens between hearing the alarm and getting up?

Two ways to answer the same signal

The bell rings. My feet hit the floor.
It's time to practice English. I begin.
class Response:
    def react(self, stimulus):
        pass

class ImmediateResponse(Response):
    def react(self, stimulus):
        return stimulus.execute()

class ConditionalResponse(Response):
    def __init__(self):
        self.decision_pipeline, self.excuses, self.methods = [], [], []
    def react(self, stimulus):
        self.analyze(); self.deliberate(); self.procrastinate()
        return None
class ProcrastinationSystem:
    def __init__(self):
        self._actual_feeling = "I don't feel like it."
    def elaborate_decision_process(self):
        awareness = self.fake_awareness()
        choice = self.fake_choice()
        responsibility = self.fake_responsibility()
        return "I'll do better next time."

class JustDoIt:
    @staticmethod
    def execute(thing):
        pass
class JustDoItResponse(ImmediateResponse):
    def __init__(self):
        self.method = None
    def react(self, stimulus):
        return self.aware_and_act_simultaneously(stimulus)
    def aware_and_act_simultaneously(self, stimulus):
        return "Act now"

class SequentialResponse(ConditionalResponse):
    def react(self, stimulus):
        self.step1_awareness = "I see I don't want to do it."
        self.step2_deliberation = "How should I go about it?"
        self.step3_planning = "I'll design a system."
        return None

A morning routine and a three-second reset

class DailyPractice:
    def __init__(self):
        self.awareness = Awareness()
        self.circuit_breaker = RecognitionNeedCircuitBreaker()
        self.response_mode = JustDoItResponse()
        self.ordinary_self = OrdinarySelf()
    def morning_routine(self):
        self.awareness.wake_up()
        return ["Improve on yesterday", "Improve a process", "Live an ordinary life"]
    def handle_trigger(self, trigger):
        if trigger == "craving approval":
            return self.circuit_breaker.physical_interrupt()
        elif trigger == "something went wrong":
            return self.awareness.ask_fundamental_question(trigger)
        else:
            return self.response_mode.react(trigger)
    def evening_review(self):
        questions = {
            "Was it really a problem?": False,
            "Did I compare myself with anyone?": False,
            "Did I get on with it?": True,
            "Did I let myself be ordinary?": True,
        }
        return self.calculate_peace_score(questions)
class ThreeSecondReset:
    def execute(self):
        print("There's the pattern again.")
        physical_action()
        return "Do the task in front of me."

class DailyCheckList:
    def check(self):
        return {
            "asked_what_was_wrong": True,
            "caught_the_urge_for_approval": True,
            "went_ahead_and_did_it": True,
            "avoided_comparing": True,
        }

The journal behind the code