Payton.Codes

Musings on life, games, and code

Payton’s Blog

  • Rust and Grepdef 3.0

    Rust and Grepdef 3.0

    As part of my summer vacation from work this year, I decided to learn Rust, a programming language that’s been gaining a lot of popularity recently. After using it for a few months I can see why. Rust is a systems-level language designed for things that need to be very efficient and fast. It’s designed…

  • The Lost Card

    The Lost Card

    I was first inspired to become a software developer when I was very young when I got an original NES. Playing those early games gave me a passion to learn programming that was the foundation of everything I’ve done since. Back in the early days when I was just studying BASIC and Hypercard, I made…

  • Record Objects to the Rescue

    Record Objects to the Rescue

    Very often, I need to return multiple values from a function in PHP. Maybe I need three different dates or an integer and a string. Perhaps the most common scenario is when returning data from a database query. In each of these situations I have to decide the best way to encapsulate those values. Mostly,…

  • Wizard of Birds

    Wizard of Birds

    Young friends in a war-torn nation receive an urgent letter from their erstwhile schoolmate whose mother has vanished. When they arrive, they find their friend has also disappeared into an abandoned tower in the woods, inhabited by nothing but birds. Do you like D&D adventures? How about Studio Ghibli movies? You might like this. For…

  • Warrior’s Tea

    Warrior’s Tea

    I went on a trip to hang out with my co-workers this February and ran a one-shot D&D game for them. Having just read the fabulous Six of Crows I was in the mood for a heist. Coincidentally, just a few weeks later, Wizards was going to release a whole book on the topic but…

  • Good coding practices

    Good coding practices

    I recently had to give a talk on “Good coding practices” for some new developers at Automattic. At first I had no idea how to summarize such a vast and dynamic topic, but as I was working on a plan I started to see some ideas come up over and over again and I decided…

  • Writing a diff/PR description to get better reviews

    Writing a diff/PR description to get better reviews

    During a recent work meetup, we had an impromptu exercise where we went over what makes a GitHub PR description most useful to the people reviewing it, particularly when not everyone is working on the same part of the codebase. Better descriptions make for faster reviews! This is my attempt to turn that discussion into…

  • Valley of the Machines

    Valley of the Machines

    I wrote this one-shot D&D adventure to share with my co-workers on a recent work meetup; it was the first in several years! I now share it with you all. It takes about 3 hours from start to finish and requires very little experience on the part of the players. For the DM, the adventure…

  • Common TypeScript errors and how to fix them

    Common TypeScript errors and how to fix them

    At work we recently changed the builds for our project to fail when new TypeScript errors are added, so I took some time to clean up a bunch of old TS errors in our codebase, some of which have been there for over 5 years. There were close to 600 errors when I started (down…