Category: Development
-
Have you tried it to see what breaks?
Last year, my team received a challenge from our CEO to try to significantly improve our purchase flow along with a bit of time pressure. For several months, I’d had a good, high-level idea of how we might improve our purchase flow. But, as the idea lacked concrete implementation details, we kept prioritizing other work […]
-
On comparing large lists
In the past, I’ve often had to generate email lists of users that fit specific conditions. This usually isn’t too difficult with some of our in-house data tools at Automattic. But, when I hit a case where I have to work across systems, it usually results in me dumping the data from each system and […]
-
How to expand tilde in bash script
When I was working on a recent bash script, I was irritated when I wasn’t getting output to my desktop. After a while, I figured out that quoted tildes are not automatically expanded. From that link: If a word begins with an unquoted tilde character (‘~’), all of the characters up to the first unquoted […]
-
Git checkout non-origin remote pull request
I don’t often review pull requests that come from non-origin remotes. This is largely because Automattic tends to create pull requests in the root repository. So, when I reviewed a pull request from an open source contributor today, I found myself wandering if there was a simple way to checkout the pull request locally for […]
-
Recording completed tasks with Alfred
At Automattic, many teams have a process where they post weekly, or biweekly, updates. One of the things that I’ve often found difficult, as I write my personal update, is remembering all of the little things that I did for the past week. Sure, since I work on the computer, there’s usually some paper trail […]
-
Install Unison 2.48.4 on Mac OS X with Homebrew
I use Unison to sync code between my local machine and my dev servers. To sync between two servers, it requires that the same version of Unison be installed on both servers. Now, this isn’t usually a big deal, because once you get Unison set up, it’s set up. But, I usually get a bit […]
-
Recursively cast to array in PHP
I recently ran into an issue where JSON encoding some objects in my code wasn’t working properly. After experimenting, I realized that casting everything to an array before JSON encoding magically fixed things. Casting an object to an array is simple enough: But, what happens when an object or array contains references to other objects […]
-
How to remove files not tracked in SVN
At Automattic, we use SVN and Phabricator for much of our source control needs. One issue that I often run into is a warning about untracked files when creating a Phabricator differential: This warning’s purpose is to make sure that the differential being created has ALL of the changes so that a file isn’t forgotten […]
-
Get unique values in file with shell command
Over the past year, there have been a couple of times where I've needed to sort some large list of values, more than 100 million lines in one case. In each case, I was dealing with a data source where there was surely duplicate entries. For example, duplicate usernames, emails, or URLs. To address this, I […]