Posts
-
How Clean Code Ruined PHP's Best Feature
PublishedMay 2, 2025 I've done PHP programming professionally for a decade. I started with just FTP'ing files to web servers, transitioned into version control, then the whole blue/green CI/CD pipeline. I've written my own autoloaders, written PHP extensions, written Apache rules, trained teams on several different PSR standards, given trainings on how the PHP runtime runs programs, and more. I've been through the PHP 5 to PHP 7 migration several times at different companies, and I've been through the PHP 7 to PHP 8 migration once. The only thing I haven't done is use Laravel, mostly since I've been working with custom PHP frameworks built in-house back in the early 2010's and late 2000's. At this point I'm pretty confident in my PHP skills, and I've seen how PHP has tried to catch up. I've also seen one of the greatest features of PHP of all time fall apart and crumble to the point it's useless. That features is PHP's hot reload. … -
Learning from Baremetal
PublishedApr 29, 2025 Lately I've been working with baremetal servers. I have two servers in a rack for personal use. They aren't big or fancy, and I got them used. But, they do work. As part of this, I've learned a lot about servers and server management, so here's where I'm at. … -
Erlang Deployment: First Impressions
PublishedApr 25, 2025 Lately I've been experimenting with deploying to bare metal servers. No Kubernetes. No Docker. No AWS Console. Just the physical hardware, mounted to a rack, no OS pre-installed, and no RAID preconfigured. Just that beautiful, metal casing and lots of cables to plug in. … -
Moving away from a static site
PublishedApr 16, 2025 Up until today, my site was hosted by as a static site. I've used several static file hosts (including S3, Cloudflare, open source, custom ones with custom telemetry, etc.). During this time, I've been working primarily on my site generator, making sure that I'm working with something I'm happy with and that I like. By focusing on just the generator and not the rest of the server, I was able to go through several iterations, including a rewrite earlier this year (see ). However, I'm now I'm ready to move from just generating HTML pages to having a full on blog. … -
Building Channels in C++: Part 7 - Fixing an infinite loop
PublishedApr 7, 2025 In we added timeouts to the select statements we made in . These selects work pretty well. However, there is a sneaky hidden flaw. If we aren't careful, we'll deadlock. … -
Building Channels in C++: Part 6 - Adding timeouts
PublishedApr 5, 2025 In we created a select statement for our channels which can handle sending and receiving values. If you haven't already, I recommend reading that post before continuing with this one. Don't worry, this post will still be here. … -
Building Channels in C++: Part 5 - Writing a select statement
PublishedApr 4, 2025 So far in this series, we've created a channel with blocking and non-blocking methods for sending and receiving messages. See for the last post in the series. So far, our channels (with the reader excersises) look like the following (it's getting big enough this will probably be the last time I start a post with the channel code): … -
Building Channels in C++: Part 4 - Going non-blocking
PublishedApr 3, 2025 Previously in we got multi-threaded channels working. We could send and receive messages, and we could close channels to tell threads to stop using them. However, all of our operations were blocking. We didn't have anyway to try to do something in a non-blocking manner. We won't make a non-blocking version of close since when we want to close a channel, we really want to close the channel. The same principles we use to make non-blocking send and receive methods can be used to make a non-blocking close if you want. … -
Building Channels in C++: Part 3 - Closing channels
PublishedApr 2, 2025 So far with our channels we've been able to send and receive messages. And in we gave channels a static size.However, we don't have a way to signal to all consuming (and producing) threads that a channel shouldn't be used anymore. Without this, we can't safely clean up channels since threads won't know that a channel is no longer safe to use. … -
Building Channels in C++: Part 2 Limiting Size
PublishedApr 1, 2025 In we built a channel that could send and receive messages. However, there was no bounds on how big the channel could get. Before we go much further, we should start adding limits to the channel size. Changing how we view memory will start to shape how we approach our channel going forward, so it's better to addres it sooner rather than later. … -
Building Channels in C++: Part 1 - The Adventure Begins
PublishedMar 31, 2025 This is part 1 of a series in building channels (and several channel-related features) in C++. For this series, we're going to focus on thread-based channels instead of coroutine or fiber based channels. Because of that, there will be some limitations on what we can do and how much concurrency we can support. Also, we'll be implementing our select loop differently than if we were writing it for Go. However, we'll gain a base understanding of how channels works, and we'll see different strategies for synchronizing and communicating between threads. … -
Casting Values to Integers and Floats in JavaScript
PublishedMar 19, 2025 This post is mostly a quick reference for me to share with people about how casting values to integers and floats work in JavaScript - and the weirdness that can happen. … -
Creating Documents
PublishedFeb 24, 2025 When I was rewriting my blog, I was trying to decide what format to put the posts in. I wanted a format that works well for both print and web, and that can create HTML and PDF files. Additionally, I have a hard "self-host" requirement - whatever I do I need to be able to do on my own hardware and not a remote server. I did some research on different document formats. I came across three main categories (though I'm sure there are probably still more). The categories I came across are are: markup, typesetting, and GUI-based. … -
Rewriting my site generator
PublishedFeb 21, 2025 Lately I've been rewriting my site generator behind my blog. The old one was really finicky, had a terrible parsing strategy, and also wasn't what I actually wanted long term. Also, due to how I wrote the generator it was getting hard to add new features. Plus, every time I started it up I had to deal with NPM giving me a bunch of security vulnerability alerts since my XML parser was outdated. But, the next version of the parser was a completely different API for parsing and traversing XML documents, which would have required a rewrite just to get rid of those printouts. Additionally, I've been rewriting all my posts from Markdown to LaTeX so that I can print them out nicely, and I didn't want to keep maintaining two versions of my blog (one for print and one for web). … -
Generics in C
PublishedJan 25, 2025 As part of my recent tour of languages, I have started using C again. Particularly, I've been using C11 and have been exploring the new additions. One such addition is Generics. I decided to try to use Generics to see how far I could push the feature to find its limitations. To do this, I chose implementing some data structures - in my case porting over Zig's slices. While there was some benefit, there were also quite a few headaches and limitations. …