Category: coding

  • PHP Strict Types: Hard to get right

    Some people live and swear by strict types in PHP, and it’s understandable why they do. I want to start by saying that strict types have their purpose, but many programmers don’t understand what they mean and misuse them. I’ve seen plenty of subtle bugs related to strict types, so if you use strict types,…

  • How I use AI

    I’ll not be the first to say it: AI sucks. I’ve been messing around with neural nets since 2001, and they are, generally, pretty terrible things. They can be beneficial in some endeavors but aren’t that smart. The limitations are the same, too, only shrinking marginally from a practical standpoint in over 20 years. Yet,…

  • On Writing a Streaming HTML5 Parser in PHP

    On Writing a Streaming HTML5 Parser in PHP

    One of my biggest complaints with the Swytch Framework is that it is using a validating HTML5 parser. This is great if you want to sanitize some HTML or validate HTML, but in the case of Swytch, this isn’t ideal. Now if you haven’t heard of the Swytch Framework, it’s essentially JSX for PHP. You…

  • Symfony/Doctrine’s Docs has caused more bugs than anything else.

    Symfony and Doctrine’s documentation has a slight flaw: they don’t use constructors for DTOs.

  • How to kill a Kubernetes cluster in one easy step

    I swear, for the past few months, there has been a major issue with my Kubernetes cluster, at least once a month. Once, a simple update took out my entire network infrastructure. It was down for nearly a whole weekend… This time … this time it was down for nearly a week: the worst one…

  • Creating an ORM-less framework

    Years ago, I enjoyed working with Durable Functions on Azure. There were some aspects that I fell in love with, like how “close” I felt to pure DDD, how simple it was to scale, and how little boilerplate was required. I just had one “problem”[1], I wanted to use it in PHP. I’ve been a…

  • Hello, Swytch Framework

    Hello everyone! Several years ago, I embarked on a journey to build an app in PHP 8. To have some fun along the way, I decided to throw out ‘established’ and ‘entrenched’ ideas in software development. So, I experimented and questioned everything. The original app still isn’t done. I’m not sure when, if ever, it…

  • The Cargo Cult of TCP_NODELAY: When to Use It

    I learned a ton writing this post, especially about how HTTP2 works and how its binary format affects network performance. Hopefully you’ll learn something here as well! What is Nagle’s Algorithm My last post kinda exploded on Hacker News while a raging debate on TCP_NODELAY went on. It was wildly interesting to see the two…

  • 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…

  • [Solved] A 2-day adventure in networking, Windows, IPv6 and WSL

    My servers all are IPv6-only, or they would be if I didn’t use WSL. I’ve always preferred Windows to virtually anything else, but I like the Linux command line better. (I’m not too fond of PowerShell… and that’s a hill I’m willing to die on.) So, back to the story. I finally got absolutely tired…