Blog

  • This is another test

    This is another test

    Sorry for the noise, but emails, social links, and the WordPress reader should be working again… 😉 Stay tuned for the magic.

  • This is a test, and only a test

    I’ve moved to a headless CMS, and this is a test to make sure everything still works. Nothing to see here… except emails are probably broken.

  • So, I heard you don’t like pets? Why do you have them?

    So, I heard you don’t like pets? Why do you have them?

    In the ever-evolving world of DevOps and cloud infrastructure, there’s a mantra you’ve probably heard: “Treat your servers like cattle, not pets.” The idea is straightforward—design systems where individual servers aren’t special but interchangeable parts of a larger herd. Yet despite this wisdom, many of us are guilty of pampering our Kubernetes clusters as if they’re our…

  • Optimizing CGO handles

    Optimizing CGO handles

    I work on FrankenPHP quite a bit, which is a PHP SAPI written in Go. For the uninitiated, PHP is written in C, so FrankenPHP uses cgo to interface with PHP. This also means that it uses Handles. Just to give you a bit of a background on Handles and what they are used for:…

  • Classifying Pull Requests: Enhancing Code Review Effectiveness

    Classifying Pull Requests: Enhancing Code Review Effectiveness

    In today’s rapidly evolving software development landscape, increasingly complex systems present new challenges in code reviews. As projects grow in size and scope, efficient code review processes become essential to maintain code quality and developer productivity. By understanding and categorizing pull requests (PRs), developers can streamline reviews, improve code quality, and foster better collaboration. Research…

  • Hacking PHP’s WeakMap for Value Object D×

    Hacking PHP’s WeakMap for Value Object D×

    This guide will allow you to use value objects in PHP without a special$obj->equals() method. Instead, you can use the=== or == operator to compare two value objects. This guide will also show you how to use a WeakMap to ensure that you don’tcreate multiple instances of the same value object and how to hack…

  • Algorithms in PHP: Deques (and circular buffers + linked lists)

    If you’ve ever tried to use an array as a queue or stack (via array_pop, array_push, array_unshift and array_shift), you may have discovered they are slow, particularly array_unshift which requires shifting the entire array. Here are the limits of the awesome PHP array: prepending. Prepending to an array is a very costly operation in PHP,…

  • Where is my birthday day?

    I was born on a Wednesday, and for some reason, when my birthday falls on a Wednesday, I always consider it a “special” birthday: a Birthday Day. It’s been a long time since I’ve had a Birthday Day — almost ten years! When I was 12-13 years old, I did some work to discover that…

  • Building DPHP: Authz and Ownership

    Durable PHP is an evolving framework intended for writing scalable, complex code, currently focusing on advanced authorization concepts like fine-grain resource interactions including orchestration and entity management. It provides strict user-resource interaction rules enforced by the system’s infrastructure, enhancing security by limiting access based on ownership and permissions. Special provisions for admin roles allow flexible,…

  • Building DPHP: Distributed Locks

    Durable PHP is an evolving framework designed for creating complex, scalable code, currently exploring distributed locking mechanisms. It facilitates locking multiple entities in a single operation, which poses significant deadlock risks. By adhering to rules like deterministic lock ordering and mandating lock release on orchestration termination, most deadlocks are preventable. The developer also discusses past…

  • Building DPHP: Event Sourcing

    Building DPHP: Event Sourcing

    From the beginning, I knew Event Sourcing would be a big part of Durable PHP, and I learned from several Event Sourced projects I’ve built or worked on over the years. Specifically, I knew what issues any project would have to deal with, and I wanted to create a framework where none of those issues…

  • Building DPHP: What is it?

    Building DPHP: What is it?

    Durable PHP is a framework inspired by Akka, Durable Functions, and Dapr, designed to simplify building complex software and enhance testability. It introduces three main components: Activities, Orchestrations, and Entities. Activities handle side effects and are stateless; Orchestrations manage event-sourced code execution, providing linearity despite non-linear event sequences; Entities maintain core application state and behavior,…

  • My Journey Home — Part 2

    I moved around a lot as a kid; I always had to make new friends wherever I went. Our family was close, not because we necessarily liked each other, but because we didn’t have a choice. For a long while, home was with my family. Then, one day, as a fresh 18-year-old, I stood outside…

  • Golang is evil on shitty networks

    This adventure starts with git-lfs. It was a normal day and I added a 500 MB binary asset to my server templates. When I went to push it, I found it interesting that git-lfs was uploading at 50KB per second. Being that I had a bit of free time that I’d much rather be spending…

  • Algorithms in PHP: Deques (circular buffers & linked lists)

    In the previous post, I talked about priority queues. But in my explanation of an alternative implementation, I neglected to mention a few things: The alternative implementation isn’t for production; there are edge cases and unhandled errors. The alternative implementation is meant for a short queue, not an infinite one, such as the one you…

  • Algorithms in PHP: Priority Queues (and Heaps)

    This is the beginning of a series on implementing various algorithms in idiomatic PHP and their reference implementation (usually based on C++). Today we’re going to be talking about Priority Queues. A priority queue is where each value has an associated “priority” that determines which order things come out of the queue. The best real-life…

  • The Growth of a Programmer

    The Growth of a Programmer

    Writing software is hard. I’m reminded of that every time someone asks me to teach them. The basics are convoluted, the syntax is unique; It’s 100% logic that you have to hold in your head while you craft words that semantically make little sense, unless you’re a compiler or interpreter.

  • My Journey Home

    It has been a little over a year since I got the boat. As you may have heard, it has been quite the adventure.