You are (not) a machine

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

You are (not) a machine

Applying developer brain's thinking to debug your behaviours

Peter Dietrich

November 27, 2026

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

27 slides
  1. The Symfony HttpKernel $kernel = new Kernel(...); $request = Request::createFromGlobals();

    $response = $kernel->handle($request); $response->send();
  2. Things happen in EventHandlers • • • • • •

    • • RequestEvent ControllerEvent ViewEvent ResponseEvent FinishRequestEvent TerminateEvent ExceptionEvent ...
  3. A shortcut in kernel.request public function onKernelRequest(RequestEvent $event): void {

    $version = $event->getRequest()->headers->get('api_version'); if ($version === '1') { $event->setResponse(new Response('', 410)); } }
  4. Learning $input -> response $output -> reaction An impulse. A

    response. Feedback. Learning is like stacking new EventHandlers
  5. <?php $body = Human::createBody(); $consciousness = Human::createConsciousness(); $self = new

    Human($body, $consciousness); $breathing = be_born($self); while ($breathing) { $state = $self->checkState(); $need = $state->getNeed(); $feedback = $self->express($need); $experience = $self->validate($need, $feedback); $self->addExperience($experience); }
  6. Where we break; the loop… $state = $self->checkState(); Stop checking

    state $need = $state->getNeed(); Stop feeling your needs $feedback = $self->express($need); Stop expressing your needs $experience = $self->validate($need, $feedback); Stop validation
  7. class WhyBotherSubscriber implements EventSubscriberInterface { public function __construct(private EventDispatcher $dispatcher)

    {} public function onExpressNeedEvent(ExpressNeedEvent $event) { $need = $event->getNeed(); if ($need->isThirsty()) { // dont bother asking for a help, // you're not worth anyone's trouble $this->dispatcher->dispatch(new GetUpEvent()); // get it yourself $this->dispatcher->dispatch(new GetWaterEvent()); $event->stopPropagation(); } } }
  8. The things we do or avoid to make us not

    feel bad make us feel bad today.
  9. class WhyBotherSubscriber implements EventSubscriberInterface { public function __construct(private EventDispatcher $dispatcher)

    {} public function onExpressNeedEvent(ExpressNeedEvent $event) { $need = $event->getNeed(); if ($need->isThirsty()) { // dont bother asking for a glass of water, // you're not worth anyone's trouble $this->dispatcher->dispatch(new GetUpEvent()); // get it yourself $this->dispatcher->dispatch(new GetWaterEvent()); $event->stopPropagation(); } } Folie 17 }
  10. “Between stimulus and response there is a space. In that

    space is our power to choose our response. In our response lies our growth and our freedom.” V. Frankl / S. Covey
  11. At the breakpoint ACK and celebrate you noticed! What am

    I feeling? What am I afraid might happen? What do I actually want to do?

More Decks by Peter Dietrich

Other Decks in Education