Somewhere Within Boredom

  • About
Illustration of a bird flying.
  • 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 […]

    March 15, 2023
  • I don’t know why ‘spaces’ won against ‘tabs’

    I spent five years in a codebase with tabs instead of spaces. In my editor, I had indents set to 2 spaces. GitHub annoyingly defaults to 8 and requires customization in order to fix that. Because of the prevalence of spaces, we often had to maintain forks of tooling to support tabs because ‘spaces has […]

    March 4, 2023
  • 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 […]

    January 3, 2023
  • 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 […]

    December 29, 2022
  • [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 […]

    December 17, 2022
  • Building the fastest PHP router ever

    Ok, so the title might be a little bit click-baity since I haven’t compared it to every router in existence. Just nikic’s Fast Route. On my sabbatical last summer, I was messing about with microservices (which I’m convinced are evil, but that is an article for another day). During that, I decided to create a […]

    November 20, 2022
  • Exploring the performance of FrankenPHP

    Exploring the performance of FrankenPHP

    If you live in the PHP world, you’ve probably heard of FrankenPHP. As soon as I saw the project, I fell in love with it. I tend to go back and forth between several languages, even mixing them when the problem calls for it. But here’s FrankenPHP, a beautiful mix of Go, C, and PHP. […]

    November 18, 2022
  • Wait, a 304 reply can change headers?

    Wait, a 304 reply can change headers?

    This evening I was optimizing some caching things for a web app I’ve been working on when I discovered something obvious when you think about it. Now, this is specific to Chrome-ish browsers and Firefox; I have no idea what will happen in Safari. Imagine the following PHP code: This code sets a random integer […]

    November 4, 2022
  • 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 […]

    September 12, 2022
  • 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 […]

    September 4, 2022
1 2 3 … 10
Next Page→

Somewhere Within Boredom

Proudly powered by WordPress