• Remember to Probably Target an Empty Object with Object.assign()

    Hearken back, for a moment, to what it was like merging objects in 2014. There was no support for the feature in JavaScript runtimes themselves, and it was quite common to find a solution to the problem by wading through StackOverflow to find something like this: Despite the advancements JavaScript...Read It
  • Formatting My PHP More Efficiently with a Bash Function

    For quite some time now, I’ve been working with a PHP application that, up until recently, had no clearly-defined coding standards in place. At some point, the decision was made to enforce PSR-2, and to do so at an incremental level. When a file is touched, format to PSR-2. To...Read It
  • Quickly Spin Up MySQL w/ Docker Compose

    I've often needed to quickly spin up a local instance of MySQL. Docker Compose this makes it stupid easy. Rather than running a long, convoluted docker command, I can configure an image just the way I want it while maintaining the ability to turn it easily turn it on and...Read It
  • Writing a Regular Expression to Target Images Without a Class

    A while back, I wrote about building your own lazy loading functionality into WordPress. In that post, I use a regular expression to add a lazy-load class to image tags that don't already have any class. It failed. Rather than adding it to images with no preexisting class, it was...Read It
  • Using the 'posts_where' Filter with WP_Query in WordPress

    If you've spent 20 seconds in WordPress development, you've likely worked with, cursed, and fallen in love with the WP_Query class -- one of the most useful, commonly used tools in any given WordPress website or application. Aside from being responsible for the main query on any given page or...Read It
  • Preloading JavaScript Assets in WordPress

    Squeezing every last drop of performance out of your website on any platform is an always-changing, never-ending, often addictive battle. Among the several tactics you can employ in this fight, leveraging resource hints is a modern approach that can yield some significant ROI -- with preloading is a particularly impactful...Read It
  • Creating the Simplest WordPress Plugin

    If you're making modifications to the functionality of your WordPress site or application, there are generally two places where people put the code to do it. A theme's functions.php file. A plugin. Given the choice, which option should you almost always choose? A plugin. Why? The list of reasons is...Read It

3 of 4