Category: Development
-
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…
-
How to install Unison 2.48 on Ubuntu
For developing on remote servers, but using a local IDE, I prefer to use Unison over other methods that rely on syncing files via rsync or SFTP. But, one issue with Unison is that two computers must have the same version to sync. And since Homebrew installs Unison 2.48.4 and apt-get install unison installs something…
-
How to apply a filter to an aggregation in Elasticsearch
When using Elasticsearch for reporting efforts, aggregations have been invaluable. Writing my first aggregation was pretty awesome. But, pretty soon after, I needed to figure out a way to run an aggregation over a filtered data set. As with learning all new things, I was clueless how to do this. Turns out, it’s quite easy.…
-
How to retry Selenium Webdriver tests in Mocha
While working on some functional tests for a hosting provider, I kept running into an issue where the login test was failing due to a 500 error. It appeared as if the site hadn’t been fully provisioned by the time my test was trying to login. Initially, I attempted adding timeouts to give the installation…
-
PHP – Get methods of a class along with arguments
Lately, I’ve been using the command line a lot more often at work. I found two things hard about using the command line to interact with PHP files: Figuring out the require path every time I opened an interactive shell Remember what methods were available in a class and what arguments the method expected The…
-
A Year of Google Maps & Apple Maps
I came across a really great article that compares changes in Google Maps and Apple Maps over a year. It’s really great to see how much Google is experimenting and improving their product. Similar to how a software engineer refactors their code before expanding it, Google has repeatedly refactored the styling of its map as…
-
A developer’s version of a Christmas carol
He's making a database,He's filtering twice SELECT * FROM customers WHERE behaviour = NiceSQL Clause is Coming to town. HT @withoutgorms — Mike K Smith (@MikeKSmith) December 21, 2014
-
What I do as a software developer at Automattic
This past Sunday, an 18-year-old who intends on starting at UNT next Fall and majoring in Computer Science explained to me the difference between a computer scientist and a programmer. As he explained it, computer scientists are people who conceptualize software and programmers are the people who merely carry out the plan that the computer…