• Fixing Performance Problems with MySQL's Slow Log

    MySQL Logo

    In my previous post, Messing with MySQL’s Global State, I talked about how to use the set command inside MySQL to change variables. In this post, I will explain how you can use the set command to turn on MySQL’s slow query log and what to do with it.

    Please note: All examples in this article were written using MySQL 5.5 and done in a development environment. Please do not try this in a production environment unless you are sure of the ramifications.

    Read More
  • Messing with MySQL's Global State

    MySQL Logo

    One of the things I like about MySQL is that it allows you to change some of its global state as it’s running. This article will provide a quick overview of how to view the current variables and how to make changes.

    Please note: All examples in this article were written using MySQL 5.5 and done in a development environment. Please do not try this on a production environment unless you are sure of the ramifications.

    Read More
  • An Update

    An Update Logo - random noise image

    In the next couple weeks our family will be welcoming an addition to our family. We’ve actually been spending the last several months working like crazy around the house trying to get everything in order. I’m anticipating that the frequency of my updates to this site and the length of the articles will slide a little but I’m dedicated to continue to generate helpful items even if they’re not long form. Hopefully in the fall I’ll be able to get back on a regular schedule.

    Also as part of my trying random stuff with social media and seeing what sticks, I’m going to start posting little images on our Twitter and Facebook Pages. You can follow us or follow #TPTTeachMeSomething.

  • Link Post and Podcast Roundup: July 2018 Edition

    Link Post Logo

    July’s links.

    Read More
  • Using `git add -p` to cleanup your commits

    Git Logo Git Logo from

    As a developer, I don’t find it natural for me to do just one thing to my code base between commits. I end up cleaning up a couple things as I’m working on a new feature or bug ticket or even lump together two tickets that touch the same module. To this end, some of my commits ended up looking like this:

    git add .
    git commit -m "Fixed stuff not really sure of everything but whatever"

    Eventually, I (or even worse someone else) would try to figure out what happened in that commit and have no idea because of the shitty commit message. That all changed the day I learned about git add -p.

    Read More
  • Using MySQL With the Symfony Demo Application

    PHP Logo I’m fiddling with the Symfony Demo Application for an article I’m researching and I wanted to use it with MySQL instead of SQLite (which it defaults to). In order to make this change I had to do the following:

    1. Change .env to Use MySQL

    Open your .env file and find the following line:


    And change it to the following:


    2. Reset the Database

    $ php bin/console doctrine:schema:create
    $ php bin/console doctrine:fixtures:load
  • Building Your Cron Tasks Inside Your Application

    PHP Logo At some point, it’s going to be necessary for you perform some scheduled tasks in your application. Here are three options for how to do this in PHP.

    Read More
  • Link Post and Podcast Roundup: May 2018 Edition

    Link Post Logo

    May’s links.

    Read More
  • Unintended Consequences

    A generic picture

    The other day one of my old clients contacted me because an application I had developed for them (5+ years ago) was slow. My first step was to download New Relic to their server but I found their configuration wasn’t supported anymore. I had to start building a footer that displayed page rendering information (makes me even happier to use New Relic in my other projects) and what I found shocked me.

    They have a list of vendors which are then picked in various select elements through the site. When we originally created the system they had ~100 vendors. In the past five years they’ve entered 1,500+ vendors. Some pages had multiple (in one case 10+) vendor selects which caused the page to be 35 MB of just option elements and because everything was written using classes it caused 15,000+ classes to be instantiated and then used. I do love PHPs speed though, on my local machine this still didn’t take more than a second to generate and it was really only a problem when using the page through the Internet.

    As programmers it’s impossible to tell how our systems will be used. When we originally created this system we used the information they had given us to create the best system we could for their budget. Even now I wouldn’t have tested their system with as many vendors as they’ve managed to enter but it’s important for us to build systems that scale.

  • My Experiment with a Vertical Monitor

    My Experiment with a Vertical Monitor Header

    The last time I rearranged my desk and decided I would try using one of my monitors vertically instead of horizontally. I’ve spent a year using it this way I thought I would talk about what I’ve liked and what I’ve disliked.

    What my vertical monitor looks like]

    Read More

subscribe via RSS