Author Archives: Boone Gorges

I miss my camera

It’s been almost a year since I ditched my smartphone. For the most part, it’s been glorious. Like a slow-growing tumor, I’d hardly noticed the damage that years of carrying a smartphone was doing to my lifestyle and my psyche.

The one thing I legitimately miss is the camera. In one sense, I’m glad to buck my generation’s tendency toward hyperselfdocumentation. At the same time, I have kids. I took many hundreds of photos and videos of my first child on my smartphone. I’ve partially compensated for this with the second child by strategically storing cameras in various parts of my apartment, so there’s always one at hand. In the house, this works. But, with the approach of warm weather, I worry once again about the hassle of filling yet another pants pocket with yet another device.

Friends have suggested that I get a smartphone but don’t use the data. But this is like suggesting that I replace my extracted tumor, but this time put it a little further from vital organs.

I feel like I’d be more likely to carry a point-and-shoot camera if they were more svelte. If the iPhone 6 can take such beautiful pictures, why doesn’t someone market a standalone camera with the proportions of a smartphone? The thinnest cameras I’ve seen are double the thickness of even the bulkiest modern phone – way beyond the point of pocketability. Is there a device out there for me?

phpunit-speedtrap and WordPress/BuddyPress automated tests

One of my personal missions over the last six months has been to shave seconds off of the WordPress and BuddyPress automated test suites. (WP’s tests run in under half the time today than in WP 4.0 – and with the addition of nearly 1000 tests. Score!) One of the tools I use to track down problematic tests is John Kary’s excellent phpunit-speedtrap, which adds a listener to each test run, and produces a report of tests whose running time exceeds a configurable threshhold. phpunit-speedtrap is designed to be used as a Composer dependency, but this is not currently convenient or necessary for the purposes of working with WP/BP (for one thing, I’m the only person doing it). Here’s how I’ve rigged it up to run locally:

  1. Grab a copy of the listener class from Github https://github.com/johnkary/phpunit-speedtrap/blob/master/src/JohnKary/PHPUnit/Listener/SpeedTrapListener.php. I chose to remove the PHP namespacing, but you can do as you wish. Save it somewhere – I put it at ~/.speed-trap-listener.php so that I can use it with all projects.
  2. WP and BP ship with a phpunit.xml.dist config file. The .dist extension means that you can run your own phpunit.xml alongside of phpunit.xml.dist – PHPUnit will prefer the non-dist version if available, while WP and BP’s version control config will ignore it. Copy phpunit.xml.dist to phpunit.xml and add the following block:
    	<listeners>
    		<listener class="SpeedTrapListener" file="/home/bgorges/.speed-trap-listener.php">
    			<arguments>
    				<array>
    					<element key="slowThreshold">
    						<integer>250</integer>
    					</element>
    				</array>
    			</arguments>
    		</listener>
    	</listeners>
          

    Change the slowThreshold and filepath to whatever you’d like.

  3. Run phpunit. You’ll see something like this:
    Screenshot_2015-03-07_11-50-30

Keep on shavin’!

2014

Reflecting on 2014, a couple of themes:

  • Reclaim. In the past, I’ve written about taking back technologies from corporate entities. This year, I’ve found myself embarking on what I consider to be the natural extension of Project Reclaim: taking back my attention from technologies. In April I ditched my smartphone, and in September I stopped using Twitter. Each decision arose from a desire to devote more of my limited mental and emotional energies on things that matter most to me, like my family and my work. In each case, the pull of inertia was strong – the natural thing was to continue using the tools, just like everyone else around me was doing – but in each case, the rewards of letting go have been significant.
  • Ease. My wife and I decided over dinner tonight that 2014 felt easy. We didn’t move this year. We enjoyed satisfying jobs and financial stability. Our son transitioned from a toddler to a very nice little boy. In contrast, our family has a number of very large changes coming in 2015, changes that will be hard in many ways. So the relative and welcome easiness of 2014 is worth a moment’s pause.
  • ShippingDuring 2014, BuddyPress shipped a number of major versions. I put a huge amount of time into BP 2.0, as both a developer and a release manager, and I think it paid off – IMHO it’s one of the most important releases in BuddyPress history. BuddyPress 2.2 will come in the first weeks of 2015, and it too promises to be a really important release. In addition, I was invited to join the WordPress core team for the 4.1 release, an experience that’s been fulfilling in its own way. Considered alongside a number of successful client project launches, I’ve been involved in a happily large number of solid software releases this year.

A big year ahead, but for now, за ваше здоровье!

Blogging heroes, 2014 edition

The best bloggers publish so regularly that it’s easy to take their work for granted. So, as 2014 winds down, I thought I’d take a moment to salute my favorite blogs of the year.

The main quality that earns a blogger my respect is fearlessness. In order to blog frequently, you’ve got to be willing to write on a broad range of topics, and to publish what might sometimes less-than-fully-formed work. Most authors (myself included) are too chicken to do these things. The writers listed here are not.

  • Samir Chopra – Philosophy, cricket, politics, parenthood, New York, literature, you get the idea.
  • Alan Levine – Alan is fond of saying that his tireless chronicling makes his blog a supplement to his memory: he can easily look back to see what he was doing and thinking just about any day in the last decade. We should all be so bold.
  • Audrey Watters – Independent journalist covering education and technology. Support her work.
  • Alan Jacobs – I follow Alan’s blog and tumblr in part to remember that there’s a way to engage in public intellectualism without being pandering or smarmy.

Thanks to all for your work in 2014!

WordPress 4.1 and me

WordPress 4.1 “Dinah” was just released. In September, I was asked to do a stint as a committer. It was a blast. Here’s what I worked on:

Query improvements

My primary goal for 4.1 was to rework the WP_Meta_Query, WP_Tax_Query, and WP_Date_Query classes so that they supported nested query syntax. In the process, I worked through much of the backlog of Trac tickets related to these three classes, fixing some longtime annoyances and adding a few nice features. I published an in-depth write-up on these improvements in October.

Taxonomy

I decided to use my new position to stir up trouble related to the taxonomy roadmap. My goal was to make some progress on Trac’s Worst Ticket. I wrote a couple boatloads of unit tests for functions related to term editing and creation, helped shepherd through fixes to a few edge cases related to duplicate term creation, and pulled the trigger on changing the wp_terms database schema. In #21950 we stopped creating new shared taxonomy terms, and we came very close to splitting existing shared terms in this release, but pulled it out at the last minute so we’d have a bit more time for developer education. I look forward to continuing my unofficial role as Taxonomy Gadfly in future releases.

Unit tests

I contributed hundreds of automated tests to WP during the 4.1 cycle, and so the slowness of the phpunit suite was a particular pain point for me. Based in part on some ideas of nacin’s at WCSF, I took a few steps toward reorganizing and refactoring a couple parts of the phpunit suite, with the end result that running $ phpunit on WordPress takes less than half the time today as what it took in 4.0, despite the addition of many, many tests. I’m equally proud that I was able to help a few contributors to include unit tests in their WP patches for the first time.

Comments

I spent some time in 4.1 improving comment queries. I reworked comments_template() (the function used by WP to display comments on a blog post in most themes) to use the internal comments API, resolving a ticket that has bugged me for a long time. I also helped to add some additional query params to WP_Comment_Query, and worked with a number of contributor to pave the way for a better system for custom comment types in the future.

Miscellaneous

I took advantage of what may be a once-in-a-lifetime opportunity to address a couple personal peeves, like better support for apostrophes in email addresses. It was also a pleasure to do a bit of developer outreach, in the form of helping a few folks to get their first WordPress props, as well as clearing out some old has-patch tickets.

Working on a huge project like WordPress has been a lot of fun. 4.1 FTW!

wp-cli-git-helper: Git commands for wp-cli

At this year’s WordPress Community Summit there was an interesting session about the many uses of the delightful wp-cli. One idea was that wp-cli could handle some simple git commands intelligently, so that, for instance, updating a plugin would automatically generate a changeset for the update with a descriptive message. After some back and forth with the wp-cli team, I decided to build this as a community package. It’s available here: wp-cli-git-helper.

This will be a huge time saver for me as I manage client sites. If it helps you, that’s super too. Pull requests welcome for Kewl New Features.

Unpaid labor in academic and free software communities

There are many aspects of my current free software development work that are (thankfully!) very different from my previous life as an academic. But one way in which they’re similar is the way that one’s relationship to one’s own paid and unpaid labor is connected to one’s career progress, and the personality types that this structure attracts.

I’m a known advocate ([1], [2], [3]) for fostering a symbiotic relationship between my paid client work and my unpaid work on free software projects. And while I’m emphatic that there’s value in having these two parts of my career separate from (yet supportive of) each other, the separation embodies an unavoidable tension between what I’m paid to do and what earns the respect of my peers. If people know who I am, it’s probably because of volunteer work I’ve done for WordPress, not because of my client work. As such, there’s continual internal pressure for me to focus more of my mental and emotional energies on the unpaid work. Yet it’s important not to yield completely to this pressure, since my paid client work is critical, both in terms of the financial support and the technical inspiration it gives to my work on the free software projects. Balancing these two pressures is something I’m constantly struggling with.

The relationship between labor and rewards in academic work is similarly structured. Most academics are paid primarily for teaching duties, with service and research being important but often secondary, at least as far as the official job descriptions are concerned. Yet the system of advancement in academia is structured in such a way that one’s research and publication record is of paramount importance. And in many cases, volunteer labor – things like peer review and service to professional societies – is critical to one’s reputation as a scholar. Anyone in the academic world will recognize the tensions that this arrangement can produce.

The peculiar motivations baked into free software development and academia tend to attract similar sorts of overachievers. To rise to the top of your field, you’ve got to do large amounts of unpaid labor, while still doing enough of your paid labor to keep your job. This means that the most successful people tend to be those who are spending the greatest amount of their spare time working for free. A couple of consequences fall out of this arrangement. First, people who are already in a position of privilege (financial and otherwise) are able to climb the career ladder more easily. This setup also means thatt successful people are likely to have a sense of self-worth that is closely connected to their work. And these factors mean that successful academics as well as free software contributors are more likely to suffer from burnout.

Last year, DHH of Ruby on Rails wrote an interesting piece on “the perils of mixing open source and money”. I’m very sympathetic to many of his points about motivation: the tenor of a free software project, and the quality of the software that results, is largely a consequence of the fact that the creators of the software are not primarily motivated by financial concerns. This is something that academics figured out a long time ago. As such, I think that it’s important to continue to foster “reputation cycles” and other structures that help to enable talented developers to devote energies to free software without directly paying them for it. At the same time, it’s important to be aware of the kinds of tensions I describe above, because the separation of paid and unpaid work in this area can tend to be personally destructive at the same time that it’s valuable for the (software/academic) projects as a whole.

WordCamp NYC video now available

In August, I gave the keynote presentation at WordCamp NYC. A few days later, I wrote out a condensed version of those remarks and posted it on this blog. The video for that talk was posted today to wordpress.tv and is embedded below for your viewing pleasure. Some of the meat of the argument is the same as my recent talk at WCSF, but the NY talk is more focused on freelancers, and has funnier jokes.