Upgrading old WXR files with wp-cli

I recently had cause to try to import an old WordPress WXR export file into a more recent version of WordPress. There are some simple differences in the way the old files and the new files are formatted that keep this from working. The usual rigamarole for getting around this is to install a throwaway copy of the version of WordPress that the export file was generated with, import the file, and upgrade WordPress until you’re at the latest version. Then you export and the WXR is updated. That’s kind of painful and lame, though.

So, riding the wave of my recent fervor for wp-cli, I made a wp-cli command for doing the conversion. It’s called… convert-wxr.

Usage looks like this:

wp-cli --file=file-to-covert.wxr --outfile=converted-file.wxr

If you don’t specify an outfile, it just spews to the screen (you can redirect output to a file). It won’t clobber an existing file.

The script just does some simple regular expression and string replacements based on the differences I found between older and more recent WXR files. It’s entirely possible I missed some differences, but the conversions I tested seem to work well enough.

Using xdebug with wp-cli

Sometimes when you want to profile something in WordPress using xdebug, it’s not quite as straightforward as just enabling the tool in php.ini and passing a query string parameter. Say for example that you’re wanting to test how expensive it is to delete a term in WordPress. Well, you can load the term page with the query string parameter in place, but then you still wind up posting data without the query string parameter. You have a few options that I know of:

  1. Turn on xdebug for every request and figure out which cachegrind file contains the bits you actually want to profile.
  2. Hack the code to add the query string to your post.
  3. Write a cookie that xdebug can use in place of the query string variable.

None of these options especially appeal to me. They just seem clumsy.

I’ve used wp-cli more and more lately to interact with WordPress installs. And of course wp-cli has commands for interacting with terms. So it’d be neat to be able to profile wp-cli commands using xdebug. Luckily, it turns out to be pretty easy to do.

First, get xdebug and wp-cli set up. Links above will point you to documentation for doing so. When I set xdebug up, the extension was added to apache’s php config but not to the cli version of php.ini, so I had to copy the relevant line (extension=/path/to/xdebug.so) from one php.ini to the other.

Now you just have to add the -dxdebug.profiler_enable=1 option to your call to php at the command line. With wp-cli, you’re not calling php directly at the command line, though, so you have to figure out how to get the option passed through to the actual call. It turns out that the bash script that wraps wp-cli has a handy argument named $WP_CLI_PHP_ARGS that you can use to pass php arguments.

So if you always want to use xdebug with wp-cli, you can just do something like this in your .bash_profile:

export WP_CLI_PHP_ARGS=-dxdebug.profiler_enable=1

But maybe you don’t always want to profile wp-cli. Doing so slows operations down a little, and it generates pretty big cachegrind files, especially for complex or long-running operations (for example, a simple wp term delete command that takes around 2 seconds was generating 5MB cachegrind files for me). To run xdebug with wp-cli only when I really wanted to and without having to remember to set or unset $WP_CLI_PHP_ARGS when I wanted to toggle, I just added these lines to my .bash_profile:


alias wp="export WP_CLI_PHP_ARGS=; $HOME/.wp-cli/bin/wp"
alias wpd="export WP_CLI_PHP_ARGS=-dxdebug.profiler_enable=1; $HOME/.wp-cli/bin/wp"

Now, if I want to generate cachegrind files to profile, I execute wpd instead of wp, and life is good.

wp make-wxr

As part of my day job, I’ve lately been looking at trying to improve the performance of WXR imports into WordPress.com. This has meant, so far, lots of testing and profiling of code, and it’s meant my wanting to be able to generate export files that meet particular criteria.

For example, one useful test is to repeatedly import a file that contains 1,000 posts so that you wind up with a benchmark for how long it takes on average to pull in that many posts (so that you can try to make that number consistently lower). Not everybody has a test site with exactly 1,000 posts in it, and it’s sure no fun to manually generate that test data.

For another example, say you’re trying to understand what impact taxonomies have on import sluggishness. The WXR file lists tags and categories near the top of the file and imports them all at the beginning of the process. Then it associates terms with posts as it imports the posts later. In order to understand how the taxonomy import performs, it’d be useful to have a WXR file with exactly 500 tags for that initial import, with a few randomly assigned to the posts.

And say you wanted to learn how comments get bogged down. It’d be handy to be able to easily import a single post that had a great many comments, or to import many posts with either few or many comments each.

Enter make-wxr, a wp-cli command I wrote to help me generate just these sorts of WXR files on demand. Now, by typing a simple command into my terminal, I can instantly have a reasonably customized WXR file for testing various trouble spots in the WordPress importer.

After some initial skepticism, I only recently started using wp-cli as part of a big data migration, and now I’m a pretty big fan of the tool. My little command here is just a brand new baby, conceived and born within the last couple of hours. I already have some ideas for improvements (though probably not much time to implement them, since the itch I was scratching by writing this is now scratched). If you’re a developer who works with debugging WordPress with data of varying sizes and characteristics, maybe the new command will be useful. (If you’re a theme developer, you should use the standard WXR file, since it covers lots of test cases like long titles, menus, etc.)

Starting a Course Blog with WordPress

I’m among a few staffers that Automattic sent to the MLA conference this week with the mission of trying to identify how WordPress is being used in the academy and how we might find ways to address the particular needs of that segment of users, which I take to be composed mostly of professors and graduate students with some publishers mixed in.

I attended a session today about using two tools — Omeka and WordPress — for student-generated projects. After a bit of introduction about the general premise, the attendees broke into groups interested in one or the other piece of software for a more focused introduction to each. Naturally, I went with the WordPress crowd.

Fitting a solid introduction into a 20ish-minute breakout session proved somewhat ambitious, so I thought I’d put together a little guide to help point interested folk who couldn’t make the session or who may have had trouble absorbing it all in the right direction.

So, where should you start?
Start at WordPress.com. Just create an account if you don’t already have one, and choose the “free blog” option. If you decide you like the service and want to buy a domain or other goodies for it later, you’ll have the chance. But for now, just dip your toe in with a free blog.

Once you have the blog set up, you can play around with customizing the theme (how the site looks) and writing your first post. Don’t worry if your first post isn’t a dazzling piece of scholarship. Just post something to get a feel for how it works. If you’re terribly nervous about having an unfinished site in public view, you can set your blog to be private (something you may want to do ultimately anyway to keep student data private).

Turning your test blog into a course site
Now that you’ve tinkered with the blog a little, maybe you’d like to turn it into something more like a site your students might actually find useful.

Create a pageFirst, think about what pages the site should have. For example, you might want a statement of purpose for the course, a page with information about office hours, a syllabus page, and a page detailing class rules. To add these, just go to the Pages item in your new blog dashboard and add a new one.

You should generally think of pages as static content, things that will appear in site menus and contain information that’s updated rarely. We’ll get to more frequently updated content later.

Custom MenusSome themes will automatically add pages to the menus at the top of your site. Some won’t, and in any case, you may find that you want to exert more control over how they’re organized. You can do this from the Menus item under Appearance in your dashboard.

The interface for this is fairly powerful but also a little unintuitive. You first create a menu by adding some combination of pages, category listings, and external links to a menu group. Once you’ve saved the menu group, you set it as the primary menu for your site. Don’t be deceived by the tabs displayed in the interface to distinguish between the menu groups. Each of these represents a menu with its top-level and sub-items and not the top-level item itself. That is, you can define multiple menus composed of top-level and sub-items but set only one as the primary menu (some themes allow you to set both primary and secondary menus). There’s a handy dandy tutorial (with video) available here.

Page HierarchyIt can sometimes be useful to build hierarchy into your page structure. For example, you may wish to have an Assignments page that links to the honor code and explains general expectations and to have as sub-pages a page for each of the major course assignments.

To do so, first create what will be considered the “parent” page. Then, when creating what will be its “child” pages, specify the parent in the Page Attributes section of the page editor.

As noted above, in many themes, setting this parent-child relationship will automatically cause your site menus to become menus that display the child pages as sub-items to their parents when the parents are hovered over.

Adding student users to the site
Invite UsersIf you wish either to collect assignments from the students using the site (about which more later) or to make the site private and thus viewable only by people of your choosing, you’ll need to invite your students to join the site. First, go to Invite New under the Users menu in your dashboard.

Next, just paste in the students’ email addresses. They’ll be sent email invitations to join the site, and once they complete the activation process, they’ll be members.

If you wish to let the students only read the site, you should invite them as Followers. If you anticipate ever having them contribute to the site, you’ll probably want to add them with the Author role. It would be ill-advised to add them as Administrators or Editors. You can read about the different role options here.

Collecting Assignments
Many instructors use WordPress to collect assignments such as weekly reading journals. This is where the Post content type (vs. the Page type we created above) is useful. Posts are differentiated from Pages primarily in that they’re presented in reverse chronological order on a single page, which can be the home page or can be set as an alternate page if you wish to use the home page for other purposes.

Students then simply log in and write a new post each time an assignment is due. The instructor can then provide feedback by adding comments to the post. Many instructors encourage students to comment on one another’s posts.

You might want to group the posts by assignment for ease of viewing in aggregate. If so, I suggest dictating that the students use Categories that match the assignment name. You could of course also get creative and organize assignments by genre, period, theoretical underpinnings, etc.

Grading assignments is, unfortunately, not necessarily a simple matter, as WordPress is a general content management system and not by default an academic system. So if you plan to grade students based on the number and quality of posts and comments they leave, for example, you’ll need to work out a way to track who has actually done the assignments.

Getting Fancy
If you get this far and find WordPress.com to be a reasonable solution to the problem of collecting student work and facilitating student engagement online, you may become inspired to do more with the platform. For various reasons, you’re limited on WordPress.com to the features we provide and can’t augment them by uploading themes or plugins of your own. But there is a downloadable version of WordPress that you can install and customize to your heart’s desire by adding themes and plugins to enhance the look and the functionality of the site.

For example, it’s possible that an enterprising developer might one day write a plugin to bring grade book functionality into WordPress. While this would be unlikely to be added to WordPress.com, you could install such a plugin in your own version of WordPress. There are already a few plugins — such as CommentPress, ScholarPress, and Edit Flow — that some educators are using to extend the functionality of default WordPress installs.

There are of course some tradeoffs that this increased flexibility brings. You’ll need either to pay for ongoing web hosting or to cajole your IT department into providing space and installing the software for you. And you’ll have the added (fairly minor) burden of keeping the software and plugins up to date so that your site is as safe as possible from being hacked (we take care of this for you on WordPress.com). It’s for these reasons that I suggested at the outset that you first explore WordPress.com, which keeps you from having to worry about these little hassles.

If you do decide to take the plunge and install your own WordPress, you can of course export your data from WordPress.com in a format that will import cleanly into a self-hosted install. For more on the distinction between WordPress.com and self-hosted WordPress, see this explanation (or this one, which also lists some suggested hosting partners for self-hosted installs), and if you decide to start out with WordPress.com but are having trouble getting your bearings, try this tutorial.

WordCamp Nashville

A couple of months ago, I attended the two-day WordCamp in Atlanta, and when I learned a few weeks ago that there was to be a WordCamp in Nashville (about three hours from home), I snapped up a ticket. This was Nashville’s first WordCamp and seemed to be a great success. I had signed up to help staff a happiness bar in the afternoon and so wound up attending only two sessions. My notes follow.

The Blank Screen: Overcoming Fear of ‘Pressing from Scratch’, presented by Mitch Canter.

I had actually heard of Mitch before via a local contact and was curious what I might learn from him about starting a WordPress theme from scratch, something I’ve never really done (being not at all gifted with design talents). Although he had some slides and some high points he wanted to hit, Mitch offered a pretty informal, somewhat discussion-driven format, and it worked well. He was funny and engaging, a very capable speaker. The high points I jotted down from the session:

  • Designers have to work with their developers before putting a design on the screen; else you wind up making beautiful things that the coder may not be able to implement.
  • If you’re working with the 960 grid system (something I didn’t know about), check out 960.gs, which gives you Photoshop templates for creating layouts more efficiently.
  • Establish a process/framework to speed up dev, to build a comfortable flow for your work, etc. That is, condense repeat actions into a formal set of processes/templates/etc. so that you’re not actually starting from scratch each time you start from scratch.
  • Mitch tends to start with static html pages (with lorem ipsum type content) to do most of the design outside of WordPress, and then he goes back in and substitutes in loop functions just before he pushes content to the client’s servers. I asked about local dev environments like XAMPP, and he said he also uses/advocates those. As XAMPP/etc. may be a little more technical than some designers are able to deal with, the static build may be reasonable for some.
  • He mentioned using github to deploy changes to his parent theme framework, though it wasn’t clear to me why that was terribly significant. I think he uses github over the core plugin/theme repository because he has some MIT-licensed components.

Child Theme Frameworks, presented by Ryan Green.

Ryan is the head of UX+UI at cjAdvertising in Nashville. He gave a much more structured talk than Mitch, and it was full of good information for any new to the notion of child themes. After defining UX (sort of the nexus of design, interactions, usability, and analytics), he made sure the room understood what he meant by a child theme and a framework and then jumped into the advantages and disadvantages of using a framework. Advantages:

  • You start with a bulletproof theme.
  • If you break something with your child theme, you just delete/disable it and still keep all the core functionality of the parent while sorting out what went wrong. In other words, it’s sort of like working with a net.
  • You can roll multiple themes from one parent. He gave the example of a seasonal theme for a given site. If you have your core functionality in a parent theme framework, then you can just override the styles, etc., in the child themes and swap those out easily with little risk to how the site actually works. This is obviously an advantage if you do lots of work within a vertical market that tends to require rubber-stamped functionality but varying designs.
  • If you’re using as your parent theme one that’s updated via the core themes repository, you can keep up to date easily with security patches at a reduced risk to the site’s functionality. One nasty alternative is to hack your parent theme locally, in which case updating becomes a pain and exposes your site to vulnerabilities. Extending a parent theme lets you keep up with updates while managing your changes to the theme within the child.
  • You may need to know less PHP if you go this route. That is, given a parent theme that has all the functionality you want, your child theme can simply replace the style sheet, which lowers the barrier to entry for designers who aren’t comfortable wrangling PHP code.
  • Visual design principles can be baked in. So if you find yourself working always within the 960 grid system, you choose a framework that adheres to the 960 principles and save yourself some grunt work.

Now for the disadvantages:

  • You can get locked into a nightmare theme. So maybe you’ve picked a dud but don’t know it until you’re halfway through a project whose core functionality depends on the theme you’ve chosen. Bummer.
  • If you choose a minimalist parent theme, you have to do more design work. (This struck me not as a disadvantage of the practice of using theme frameworks but more as a caution to choose your parent theme wisely.)
  • If you choose the wrong parent theme, you can be bitten by code bloat. That is, some themes that try to be all things to all people add so much extra stuff that they might not really be suitable for your purposes, while adding surface area for vulnerability and performance issues. This, again, is more a caution to choose wisely than a compelling reason to consider rolling a custom theme for each site or rubber-stamping an established theme rather than making a child theme.

Next, he talked about what makes a good theme framework:

  • It respects the grid (has consistent spacing, uses a common grid system, has a clear visual hierarchy among elements).
  • It uses modern code like HTML5, CSS3, jQuery, etc.).
  • It’s easily remodeled. By this he meant that widget areas, nav areas, and so forth can be easily moved around and tweaked. These themes use what Ryan called the “House-Hunters approach” — the theme is essentially move-in ready.
  • It demonstrates a concern for usability; it’s responsive, IA-friendly, works well for those with disabilities.

A few frameworks he’s used:

  • Genesis
  • Thematic
  • Thesis
  • Stumblr
  • Others: Skeleton, Starkers, Whiteboard, Roots, Bones

I’m too lazy to find links for them all. Advantages these generally had in common were that they tended to already have lots of pre-made child themes you could riff on and they’re tried and tested by thousands of users. Thematic (by Automattic) makes it easy to change layout. Genesis has a standard top-nav layout and is generally more corporate out of the box. Thesis has great typography and is optimized for fast load time. Stumblr has minimal configuration options, a Tumblr-style layout, and is very content-focused. He didn’t mention the _s theme recently published by the Automattic theme team, though I didn’t ask  why; maybe it’s too new for him to have looked at much, or too bare-bones (by design) to be generally useful to designers who need a more fleshed-out template for a starting point.

I didn’t jot down any of the questions Ryan fielded, but there were several, and I thought this was a very good session overall — not terribly advanced stuff but a great overview for designers who may not have had much exposure to the concept of child theme frameworks.

The Afternoon

I spent my afternoon in a little cafe area between the rooms designated for the user track and the developer track. Ostensibly I was there to staff a happiness bar to field any questions people had about WordPress, but nobody asked me any questions. This may have been a sign that the sessions were really well suited to the audience, that people were reluctant to miss a session to ask anybody anything.

I did sit and chat for a good long time with Rami Habal, VP of Product with event sponsor wordnik, which I’m going to test drive a bit because it looks neat. We chatted natural language processing, he demo’d a WordPress plugin they’re working on in beta, and it even came out that he had been a Flock user. I also chatted with one Cindy Wall, who works with the Belcourt theater in Nashville and turns out to be a Moby-Dick enthusiast like me. I actually shoehorned myself into a discussion by these two by showing off my goofy little Moby-Dick word frequency analysis site, which married some of the sorts of things wordnik does with some of the literary stuff Cindy had been talking about. And, oddly enough, it turned out that Cindy had run across a blog of mine in her recent searches pertaining to Moby-Dick. So it turned out to be a small world in Nashville this weekend.

Miscellaneous

This was the third WordCamp I’ve attended, and in terms of sessions, it was for me the best so far, even though I attended only two. Sessions at the other two have been more mixed for me in terms of quality, but both I attended this weekend were very solid.

Registration went smoothly for me. It seemed like a few people slipped into the first session a little late, but that may well have been as result of their own tardiness and not of any registration snafu. The shirts and badge/schedule thingies looked great. WPEngine provided little swag bags including a pretty nice little notebook that I actually used to take my notes. There were free muffins from a local eatery and free coffee from I know not where. You had to fend for yourself for lunch, but there were a couple of restaurants within very reasonable walking distance, and the organizers had negotiated coupons to get a discount on lunch. The barbecue joint does catering, so I did wonder why they hadn’t just had lunch brought in. I suspect the venue didn’t allow food in the classrooms we used, or perhaps adding catering to all the other organizational hurdles for a first-time WordCamp was just too much. This isn’t a gripe — just something I wondered about.

With just two concurrent sessions at any given time, we used two classrooms, and it turned out that the developer track was a lot more popular than anticipated, so the developer room was standing-room only for both sessions I attended. This wasn’t a bad development, and it’s certainly something the organizers will learn from.

Even though I didn’t get to attend many sessions, I had fun at this WordCamp. I think Nashville had a great first time out, and I’ll look forward to going back next year.

Custom Feed Links in WordPress

At a WordPress meetup tonight, the question arose of how to override default feed links for a WordPress site. For example, what if you’re using FeedBurner and want to just change the links in your source to the relevant FeedBurner links without hacking your theme? I don’t know if it’s the best way, but it looks like this is pretty easily done with a plugin that, in its simplest form, looks like this:

[sourcecode lang=”php”]
<?php
function feedme_remove_feed_links() {
remove_theme_support( ‘automatic-feed-links’ );
}
add_action ( ‘after_setup_theme’, ‘feedme_remove_feed_links’, 11 );

function feedme_add_feed_links() {
?>
<!– CUSTOM FEEDS HERE –>
<?php
}
add_action( ‘wp_head’, ‘feedme_add_feed_links’ );
[/sourcecode]

Of course, you would need to make the feedme_add_feed_links() function do something a bit more useful, and in an ideal world, you’d provide an admin screen that allows people to specify their links.

One important detail that may not jump out at you is that when adding the “after_setup_theme” action, you need to give it a priority higher than 10. Else it just goes into a stack with all other of its sibling actions with the default priority and may be (in fact seems to be) overridden by one of them.

DrawNothing

A couple of weeks ago, I started playing a fun game on my phone called DrawSomething. It’s a really addictive game, enough so that it made me think a little bit about how the things that work about the game might apply to blogging, which is what my day job centers on. I had previously let myself get hooked on FarmVille, which is also seriously addictive, but in a less meaningful way.

Let me clarify that a bit. In FarmVille, you do what amounts to menial labor and have non-semantic interactions with others who need more points to gain better tools for doing menial labor on their own farms. The interactions are about meeting game objectives and not about exchanging real information with friends. Plant some crops, wait until it’s time to harvest, pester your friends to give you a sheep so that you can get a tractor so that you can plant crops in a less tedious manner so that you can maximize efficiency as you rotate your crops for optimally timed harvests and increased profit. And so on. The key thing FarmVille and similar games lack is creativity.

Enter DrawSomething. The premise of this game is that you choose one of three words displayed and try to draw it. A friend tries to guess it. There’s lots of opportunity here to include in-jokes or other information that has meaning within the context of your particular friendship with this person. If you’re given the option to draw the same picture for another friend, the context changes and you may render it in a wholly different way. The game requires short bursts of creativity. You’re thinking, and doing so within fairly tight confines (the phone screen is only so large, and you have only so many colors and line widths and your own clumsy fingers). And you improve your thinking as you go. Mess up a drawing with one friend and you can bet you come up with a better drawing the next time you select the same word to draw for another friend. But that’s just the first part of the game’s premise, for you also get to play back your drawing and your friend’s attempt to guess it. That is, you get to watch as he taps out his guesses as to what you’re drawing, and to see at what point during your sketching he has the “aha!” moment. It’s built-in feedback for how sound your thinking was as you decided how to draw a picture.

Of course you also get to guess what your friends have drawn, which allows you to be on the receiving end of in-jokes and other personal references. The guesser is given a slate of a dozen or so letters to choose from when guessing, along with a set of blank spaces to fill with letters. So you can use the drawing, the number of letters you know the word to have, and the letters available to choose from as parameters for figuring out what your partner has been tasked with depicting for you. I’ve guessed words a time or two almost before the drawing commenced, based only on the letters. Basically, you get to exercise several brain muscles while guessing. Sometimes it’s like Pictionary and sometimes it’s more like Boggle; the most fun rounds are a perfect combination of the two. Pictionogglary, I suppose.

Although I began to get a bit of game fatigue as I had a half dozen or so games going at once, it was still a very fun game, with these little bursts of creativity, perfect for 3-minute slices of time between tasks. It’s the sort of game that, even if you tire of it, you can pick back up days or weeks later with nothing lost and without diminished satisfaction.

Yesterday I learned that Zynga (makers of FarmVille) had bought the company behind DrawSomething. I suppose I shouldn’t be surprised. The game had a meteoric rise to popularity, and Zynga’s known for buying game shops that have demonstrated success.

I don’t play Zynga games anymore. I should disclose that Zynga bought the last company I worked for and that I opted not to go along with the others on the crew who went to work for the new ownership. I should also pause and say that I admire and respect the people I used to work with. They were a smart, dedicated bunch of guys who made career moves and seem to be doing well. I was glad to learn recently that some of the nasty rumors I had heard about working for Zynga have not turned out to be true for the guys I know. So maybe things aren’t all that terribly bad at Zynga.

Still, there are the stories of unscrupulous business practices. There’s very clear evidence that Zynga has ripped off game concepts from other, smaller companies (FarmTown rose before FarmVille as I understand it, and the latter has nearly identical gameplay, or it did when I was playing it a couple of years ago). And you just hear bad things about Zynga CEO Mark Pincus. Rumors, rumors, I know. It’s stupid to base anything at all on unsubstantiated rumors. Still, I’ve just never had a good feeling about the company. And I’m not interested in supporting their work by playing their games, even if I never send them a nickel (and even while wishing the best for my former coworkers). So now I’m done with DrawSomething too.

One of the things that DrawSomething really highlighted for me was that the Zynga games I played were really awful and empty in terms of how it felt to play them. (To be fair, since Zynga rips these games off, it’s not the company’s fault the games are soul-sucking; big Z sure is good at purveying the games, though.) The games basically stick you into this irrational, Ouroboroean loop of producing so that you can consume so that you can produce, with no external reward or meaningful internal pleasure at having done so. Raise enough crops to get a few coins and you can buy a new kind of crop to raise so that you can produce another kind of crop that you can raise enough of to buy a tractor, and so on. It becomes a real grind made worse by the fact that if you don’t tend your crops quickly enough, they wither in the field and you’ve wasted a planting cycle, which just makes you feel bad. Any sense of accomplishment is derived not from achieving a thing worth achieving but from staying in the game’s loop. This becomes downright stressful over time, and near-solipsistic. Sometimes you just need to escape the loop.

By contrast, the little bursts of personal context and creativity that DrawSomething afforded me made the game pleasing not because of the game itself but because of how it made me feel to have shared a laugh with a friend or made a picture that was recognizable, funny, at times even crudely artful.

One of the things that strikes me about games like FarmVille is that they’re absurdly frivolous. There’s nothing really worthwhile about them (except that occasionally Zynga has tried to wring more money out of people by purporting to donate some portion of proceeds  earned over a given time period to charity). Of course, there’s not much worthwhile about DrawSomething either, at least nothing worthwhile in the world-peace/stopping-hunger way. But at least there’s a glimmer of human connection, of life outside the game. There’s a sense that somebody you know is at the other end of the line drawing a picture especially for you.

Curiously, I’ve always thought myself a pretty happy-go-lucky guy. I cheerfully make fart jokes and giggle at things people repost from George Takei on Facebook, for example. I enjoy puns and silliness of many sorts. Yet as I’ve grown older and more curmudgeonly, I’ve begun to notice that I have a much lower tolerance for frivolity among ventures that steal away much of my diminishing time and attention for the more serious things I’m interested in. I am, in other words, good for a quick silly exchange or a peek at the odd humorous web site, but on the whole, if I’m spending any appreciable amount of my waking time on something, I want to spend it on something that nourishes me in some way or another.

I realized at some point that FarmVille was not only not nourishing to me but was actually toxic, and so I quit playing.

My job these days is helping people have good blogging experiences on WordPress.com. As I thought through the things I found delightful about DrawSomething, I thought about how we might bring similar delight to users of our service. Blogging and receiving comments on your posts can certainly be rewarding, but helping people make better and more meaningful connections with their readers, and with other writers, is always on our minds.

Years ago, a friend introduced me to the notion of the grilled cheese sandwich blog, which has now been pretty solidly taken over by Twitter. The grilled cheese sandwich blog houses the sort of vacuous post in which you share inane things about your life that nobody with any sense cares about. It’s the epitome of frivolity.

If I’m going to get on any sort of a high horse about the frivolity of games, then I suppose I ought to think hard about the frivolity of the thing that puts bread on my table. I don’t guess you can ever keep people from writing about their grilled cheese sandwiches, and you ought not to want to either. It’s a free world (at least if you’re a straight white guy above a certain tax bracket), and I’m generally a live-and-let-live kind of guy. But if there are things I can do to help convert frivolity into meaningful expression or, in the best case, human connection — much as DrawSomething became for me a more nourishing game than FarmVille had been — I think I’d like to try. I won’t be so dramatic as to pronounce this as the kernel for a professional manifesto, but this stuff is very much on my mind these days.

WordCamp ATL Friday Sessions

I’m in Atlanta this weekend for WordCamp ATL at the Savannah College of Art and Design. My hotel is a half a mile or so from the building, an easy enough walk (if not a particularly scenic one). You walk in and then go through sort of a maze of hallways to get to the elevator that takes you to the fourth floor, where the setup is very nice — one big room (not an auditorium exactly) and several satellite classrooms. There’s loads of fruit and muffins and juice set up for us, and the registration process is very smooth, the only hitch being that I forget for a minute that I’ve actually had the nerve to sign up as a speaker and so have gotten in the wrong short line. There are big faceted jugs of water with lemon slices floating in them and big jugs of water with what I think are lime slices floating in them, but they turn out to be cucumbers, which is nice but a bit of a surprise. I alternate throughout the day between lemon water and cucumber water.

We learn during the opening remarks that a couple of speakers aren’t able to make it (food poisoning), and unfortunately, one is the speaker I had been hoping to see for my first two sessions. It definitely hasn’t been a wash, though. Read on for my notes from the sessions I’ve attended today.

Thomas Griffin, Awesome Theme Functionality? It Probably Needs a Plugin

He told us about a nightmare scenario involving urgent 1am phone calls from a distressed client. The cause? He had built a theme that did more than skin the site. Core blog functionality (things like custom post types, meta boxes, shortcodes, custom taxonomies, etc.) were built into the theme itself rather than an accompanying plugin, and when the client changed themes one day, their content disappeared.

The speaker proposed using a “core functionality” plugin that you require from within any theme you develop. Once installed, the plugin bits remain on the site whether the theme itself is later uninstalled or not.

He went on to talk a bit about his core functionality plugin, which does things like managing suggested and required plugins on theme installation using WP_Filesystem. It seemed like a pretty neat plugin for those who handle lots of site deployments and find themselves requiring the same things over and over again.

Although this wasn’t a terribly technically deep topic, I suspect some of the details were over the heads of a lot of the attendees. I enjoyed it and was glad to learn about this plugin and to have the best practice of theme/plugin separation reinforced, but I didn’t learn much new (which is ok — I’m not sure I expected to).

Mike Schinkel, Mastering Custom Post Types

  • Slides
  • Custom post types made WP a really good all-purpose CMS
  • Recommended tools:
    • PhpStorm
    • Navicat for MySQL
    • VirtualHostX
    • Transmit/FIlezilla
    • HTTPScoop (or Fiddler on Windows)
  • After creating a custom post type, you have to refresh permalinks. You can do this programmatically too, I think he said, but then he talked about a site that was refreshing them on every page load, so you have to be careful.
  • add_meta_boxes action (just something I hadn’t known about, since I’ve never made a custom post type with any further intent than testing the most basic functionality).
  • re taxonomies: the “hierarchical” key when registering determines whether a taxonomy is a tag or a category (categories are hierarchical)
  • You can add a custom post type filter to the posts page (allowing you to filter by e.g. a given comic) using the restrict_manage_posts and pre_get_posts hooks.
  • I thought this was a nice intro to custom post types. If you have trouble absorbing info in the Codex, this was probably a great session, and I picked up a few tidbits I hadn’t known before.

Dre Armada, WordPress End-User Security — The Remix

I had heard about Dre and was eager to hear his talk, and although I was already familiar with the material he covered, I thought his presentation was really good. He was animated and understanding of his initially quiet post-lunch crowd. I think his presentation was probably eye-opening for lots of the attendees, and he reminded me that even though I know the stuff he was covering, there’s lots of room for improvement in my adoption of security best practices. I took a bunch of notes, but they were basically a transcription of his slides, which you can see here. It’d be good for veteran and new users alike to review them.

CSI WordPress — Getting into the Guts

This speaker was a no-show, making that three sessions I had hoped to attend that didn’t turn out as planned. Would-be attendees (turned presenters) Doug Cole and Mark Jaquith were conscripted to speak on general WordPress development topics, using an old presentation Doug had handy and then doing a general Q&A. It turned out fine but wasn’t the sort of thing that demanded much in the way of note-taking. It was certainly not time wasted, but neither was it the more tech-heavy session I had hoped for. Kudos to the two for stepping up to fill an unfortunate gap.

Sara Cannon, Design Swoon — Visual Trends and WordPress

Sara is quiet. I attended her session because I have no eye for design and wanted to see what I could learn. She started by showing us some really neat HTML5 sites (e.g. beetle.de) and then moved on to talking briefly about mobile, and responsive themes. She’s a big fan of Twenty Eleven and recommends it as a great starting point for doing responsive design. Some other things she covered, mostly by showing us some nifty web sites and talking through them:

  • Movement
  • Simplicity
  • What not do do in 2012
    • Don’t use Comic Sans (even ironically)
    • bingo cards (too many thumbnails all together)
    • sliders (if you use them, make sure the content they house is curated, and well-curated)
    • don’t use a fauxgo
  • What todo in 2012
    • break your borders and breathe (don’t box your web site in), e.g. paulmitchellkelly.com
    • there is no page fold (don’t be scared of scrolling)
    • design is everything
      • web design is 95% typography
        • ringboxingclub.com
        • don’t let your site dictate your content; let your content dictate what your site will look like
        • metadata will be key to making sure your styling is relevant to your content; e.g. put pull-quotes in metadata
  • Some neat tools

I dug seeing some of these sites, and the tools listed near the end are really cool, but this wasn’t a session that really taught me anything. The attention to WordPress was scant, but short of digging in and workshopping the creation of a theme, I don’t know how she could have shoehorned WordPress into a “visual trends” topic anyway. I should probably have gone to Russell Fair’s session on mu-plugins but wanted to try something outside my usual skill set. That’s not to say that Sara’s session wasn’t good (the designers in the room in particular seemed really engaged and asked some good questions); it just wasn’t quite the design tutorial I had imagined (though put on the spot, I couldn’t describe what I’d expect anyway). Sara’s doing another talk in the same room and time slot on typography tomorrow.

Starting the Knoxville WordPress Meetup

Back in September, I started the Knoxville WordPress Meetup group, and we’ve been meeting ever since. Last week, Jane Wells, who does project management (and many other things) for the downloadable WordPress software, announced that the WordPress Foundation was working toward helping foot the bill and provide resources for local meetup groups, and she followed the announcement up yesterday with an account on her personal blog of how her startup of two local meetups had gone. I thought I’d update here with the progress of my little group as well.

We held our first meetup in October. I paid for the meetup.com registration out of my pocket (one of the things the foundation’s support will prevent the need for) and just proposed a time, date, and place. I tweeted about it and posted to Facebook, but these aren’t terribly great advertising channels for me, as most of the people who follow me on Twitter aren’t local (I’m a hermit in real life), and most of my local Facebook friends could care less about a WordPress meetup. I also have a hangup about spamming people. I was surprised when people started joining the meetup group and even more so when eight or nine of us showed up for the first meetup. We met at a Panera, and the agenda included basically a meet and greet, plus discussing what we might like to cover at future meetups. We settled on second Tuesdays at 7:30 as our general meeting times.

One of the attendees, Mike, whom I’ve known for upwards of a decade by now, happens to be on the board of a local organization that has a small space for coworking and community technology-related meetings. He offered the space for future meetups, and I took him up on it, not least of all because I’m shy about flying any sort of flag about myself and my interests in public places like Panera. A restaurant was great for a first meeting, but I was happy to have a dedicated, private facility at my disposal, and we’ve met there ever since. I’d say we could probably grow to 20 or so people in this facility before needing to find something bigger.

In November, we had a smaller crew, and though I had hoped that some of the WordPress novices (or at least those who blogged but didn’t really know much about theming or development) would show up to take advantage of what I had billed as a theming workshop, we were mostly a few developer types. I gave a little presentation about theming and we chatted a bit, but it wasn’t, to my mind, the most successful of meetings. I had hoped some of the more technical among us could help some of the less technical with specific problems they were having with their themes (hence the “workshop” title), but it wound up being me giving some info without any application of it. (That said, some of the info seemed to be new and interesting even to the developers who showed up.)

One of the challenges, when you’re a small group with mixed experience (ie, developers and non-developers) is finding a way to hold meetings that interest everybody. Topics that require too much technical knowledge will stink for the novices, and many topics that would be helpful for the novices would be a snooze for developers. As you get bigger and can break into smaller groups, I suspect this becomes less of a problem, but when you can count your attendees on one hand, or one hand and a couple of fingers, splitting up isn’t really a great option.

For our December meeting, we were again a smallish crew, and I gave a presentation on securing your WordPress blog. It seemed to be pretty well received, and of course, although I was giving a presentation, we also had back-and-forth and sidebars where needed.

I was too lazy busy over the holidays to put together any sort of presentation, so for our January meeting, I proposed the topic “Bring a Question or Problem,” figuring that even if those present didn’t know the answers offhand, we could go hunting for answers and help each other out. With eight confirming that they would attend, I thought we might be on the verge of having a lift in our attendance numbers, but only five of us showed up. Still, there were some good beginner questions and one slightly more technical question I really enjoyed trying to help out with. The format here worked very well for our small group. Mike proposed in the Meetup forums that even when we have some formal topic or presentation, we keep it fairly brief and dedicate a hefty chunk of our time to Q&A, and I think he’s got the right idea. Of course, if nobody has any questions, I guess we’ll wind up having a short meetup.

So, there’s a history of the Knoxville WordPress meetup to date. Our regular time slot in February falls on Valentine’s Day, and I’m working on trying to figure out whether to cancel or move the meetup. Our topic will be “Squeezing Performance out of WordPress” (something I need to read up on a bit beforehand). This is one of those tricky ones that would be easy to make too technical for novices and not technical enough for developers, so finding the right balance may be tricky. I’ll probably err to the side of simplicity but try to have a little more technical info in my back pocket for any sidebars that come up among the developers.

Our meetup page boasts 23 members, though we’ve never yet beat the attendance record we set at our first meeting. Those of us who have shown up pretty regularly seem to have a good rapport, and I enjoy the meetups. They force me to formalize some of the vague knowledge I have about using certain features of WordPress, which is part of why I started the group to begin with.

Knoxville WordPress Meetup

In August, I went to St. Louis to meet with members of my team at Automattic. Among the many fun things we did while there, we (some 20 of us) descended upon the St. Louis WordCamp. For the person-and-a-half who reads this blog and doesn’t know what a WordCamp is (of the maybe four people who read the blog, period), it’s an inexpensive conference at which people convene to learn about WordPress. Like any conference, a WordCamp hosts speakers who know a bit about what they’re talking about, and then others give of their time to volunteer to staff the event. Still others spend their time and money attending the event. In St. Louis, the audience seemed pretty varied. I spoke to people who simply wanted a little help setting up their blogs, and of course many in attendance knew a great deal about the guts of WordPress.

At the end of the day, WordPress founder Matt Mullenweg stopped by and did a Q&A, and during this hour or so of candid chat, a humbling thought occurred to me: These people had organized themselves around a set of products and services that I’m fortunate enough to have the privilege of working on. Let me frame that a little differently. Imagine you work for a company that makes widgets. One day, you learn that people all over the world are spending great effort and money from their own pockets to gather voluntarily and talk enthusiastically about your widgets. Even if you’re passionate about fabricating widgets, it’s still kind of amazing to think that people like your widgets enough to assemble and talk about them as if they were, well, important, valuable, enriching. It was a great feeling to bring away from that WordCamp.

For those not lucky enough to have WordCamps organized in their necks of the woods, there are of course WordPress meetups, which are less formal, typically free, smaller gatherings of WordPress enthusiasts and users. Inspired by my experience in St. Louis, I decided after my return home to set up a WordPress meetup of my own. And then I promptly let it sit untended.

My neglect was based on a few things:

  • I’ve never been to a WordPress meetup and don’t know exactly what goes on there or how to run one.
  • I’m generally very shy.
  • Although I’ve used WordPress off and on (mostly on) for many years now, I hadn’t done much recent development on the platform. Even my job with Automattic sees me working more on the non-standard bits of the code than on the core code. So although I’m in the position of someone who might seem to be something of an authority on WordPress, there’s still a whole lot that I don’t know. Accordingly, I fear that as the putative authority founding a meetup group, I’ll fall far short of expectations.

Bah, excuses, excuses. Today, I’ve bitten the bullet and scheduled the first actual meetup gathering for the group I hope to start. So far, three people (including me) are members of the group, and I’m the only one who’s RSVP’d. If you happen to be a Knoxville blogger, developer, or designer (or anything else) who’s interested in WordPress, I hope you’ll visit the meetup page and consider keeping me from being lonely at the event I’ve scheduled for a few weeks hence. If anybody shows up, we’ll do introductions, get a feel for where people’s experience/comfort with WordPress is generally oriented, and try to figure out where to go next.