Wordpress Debugging - PHP Logs

Image of an frustrated dev

Very quick one, more of a note to self that I can reference in the future. In order to debug php on a wordpress site, do the following:

// Create the file php-errors.log next to wp-config.php, ensure it's writable
// Add the following to wp-config.php
@ini_set('log_errors','On'); // enable or disable php error logging (use 'On' or 'Off')
@ini_set('display_errors','Off'); // enable or disable public display of errors (use 'On' or 'Off')

This turns on php logging and pipes the logs into php-errors.log.

Ad Jargon 101

Image of an Billboard

I’ve been working on standing up a new ad stack for a site at work lately and wrote up a quick reference sheet to some of the terms I’ve been learning. I also presented these at our weekly tech-share meeting.

You can view the slides pdf, the repo, or see below for it fluffed out into a blog post.


Mac Utilities

Image of Hand Tools on a Wall

I made this presentation at work this week on Mac productivity utilities and figured I’d do it up as a quick blog post.

You can view the slides, the repo, or see below for the list with a lot more detail:


Browser API Blitz

Henri Helvetica's Title Card

I did up this presentation at work this week and figured I’d copy the README in as a blog post, here it is in all it’s glory!

View the slides, the repo, or see below for the notes.


Headless Chrome and Puppeteer

A headless statue

I did a small presentation on Headless Chrome this week at work and just wanted to write up a small blog post version of it. In includes an introduction to Headless Chrome and a small tutorial on using the it’s node API

What is Headless Chrome?

Headless chrome is a new(ish) feature of the chrome web browser which allows it to run without a head. This means that no graphical output is shown, and more importantly it is never even generated. This reduces the time normal browser actions take significantly.


float.Epsilon ≈ 0 on PS4?

Just wanted to write up a quick post about an issue I ran into the other day at work. Not to be dramatic, but mathematics sort of fell apart.

The Problem

// This is Unity C# code that's targeting PC, PS4, and XB1
float i = 0f;
assert(i == 0f); // True everywhere.
assert(float.Epsilon != 0f); // True everywhere.
assert(i < float.Epsilon); // False on PS4, True elsewhere. This is how I found the problem.
assert(float.Epsilon != i); // False on PS4, True elsewhere.
Debug.Log( float.Epsilon.ToString('r') ); // 0 on PS4, 1.401298E-45 elsewhere.

So it seems that float.Epsilon on the PS4 is not only evaluating to 0, but also fails the transitive equality property since: 0 == i, i == float.Epsilon, but 0 != float.Epsilon.