Categories
BuddyPress bbPress Opinion

LoopConf

I’m going to say, with emphasis, what I think everyone is probably thinking…

LoopConf is what you wish most WordCamps were

Here’s my gist:

  • Live streaming quality was excellent, because a professional crew was on-tap to handle all of it
  • The logistical planning of the entire conference felt very smooth – almost invisible, really
  • Vendor tables were in a single isle, making them impossible to miss and easily approachable because they needed to be constantly staffed
  • Speaker quality was excellent, and I predict we will see a few presentations remixed and repackaged by others for WordCamps this year and next
  • I never want to follow John O’Nolan (of Ghost fame) in a speaker lineup ever again – he is a well-prepared stage performer with relatable personality and charisma, and will easily make you second guess your own experience & abilities
  • Andy Nacin’s talk was revealing, and even still, is only really half of the story
  • Jeremy Felt is much more comfortable on stage than he used to be, and his Multisite presentation was spot on
  • So many mentions of the REST API, but not a lot of truly practical usages yet – everyone is building WordPress minus WordPress instead of replacing existing piecemeal AJAX calls or iteratively improving WordPress itself

Full disclosure: after O’Nolan’s talk, the reality of being the last session of an intense 3 day conference became very apparent, so I trimmed 10 slides from my presentation talking about code and stuck to the high-level overview of my perspective of what building (and maintaining) big plugins is like and means to me.

It didn’t help either that vendors started breaking down their tables & displays in the middle of the talk before mine. It confirmed my suspicions that at least some people were ready to be done with the event, and demotivated me enough to cut my talk a few minutes short so everyone could call LoopConf done-done and move on to reflecting rather than ingesting. I know some events penalize vendors for this, and I’m not exactly endorsing that, but I can say in my experience that it certainly influenced my mood on stage.

Going back to the WordCamp vs. LoopConf angle, I like that WordCamps are casual and inviting, and I like that conferences like LoopConf and the WordPress.com VIP Workshop strive to achieve something more professional. I think there will be some WordCamps that try to upgrade themselves to compete, and others that will purposely stay intimate and niche. And I love that event planners have the freedom to choose what they think is best for their audiences, and that attendees are able to tweak their own experiences within the WordPress specific conference space.

LoopConf in general was super great event. It felt well executed, with plenty to do, learn, and accomplish afterwards. I hope I’m invited back next year to go more in-depth about something niche and interesting happening in the WordPress community, and if so, that I don’t end up following that O’Nolan chap again.

P.S. – here’s the recording of my talk, if you’re interested

Categories
BuddyPress bbPress WordPress Uncategorized

Contributing to WordPress, BuddyPress, & bbPress

Siobhan McKeown recently authored an amazing post at Smashing Magazine about contributing to WordPress. I was fortunate enough to have the opportunity to share some of my own thoughts, mostly surrounding BuddyPress and bbPress.

If you’re a part of the WordPress community, this is a great read, with ideas and suggestions from a few of the most iconic WordPress contributors. I’ll leave you with my two favorite snippets from my pals Matt and Mark:

The number one skill you need for just about any job, but specifically working on open source, is communication skills. You need to have clarity, consistency, compassion, relatability, a little bit of a thick skin and a decent sense of humor. — Mark Jaquith

You can’t knock on the door at Google and say, “Hey, do you mind if I help you out with your home page? I have some ideas for you.” But you could come to us and say, “Hey, I have some ideas for your dashboard, and here are some patches.” — Matt Mullenweg

Categories
BuddyPress bbPress Software WordPress

SLASH Architecture – My approach to building WordPress plugins

I’ve fallen into a routine when building WordPress plugins; a few general rules are:

  • Avoid creating new PHP globals.
  • Avoid executing PHP code in the global scope.
  • Generous use of Actions and Filters.

I’ve decided to name the pattern I use Slash, which stands for:

  • Singletons
  • Loaders
  • Actions
  • Screens
  • Handlers

Singletons

I didn’t love singletons in PHP at first, and I’m still not convinced they are ideal, but they work well at avoiding yet-another-WordPress-related Global variable. bbPress is a good example.

The benefit of using PHP singleton’s in WordPress is they don’t create an additional PHP global to worry about getting stomped. They also allow your plugin to always exist in memory, without another plugin being able to unset it, while still working like a traditional PHP class.

Loaders

These are basically bootstrap functions. Their only responsibility is to jumpstart a singleton, and put it in a place for easy access. See the bbpress() function in the above bbPress link. Loaders allow you to reference your Singleton without needing to use a global variable, or pass an instance around into functions and method calls. Used like: bbpress()->foo = 'bar';

Actions

By hooking everything into WordPress core actions, bbPress never runs any code inline in the global scope, other than the above loader function. Also, bbPress comes with it’s own sub-actions to piggyback WordPress’s, making writing bbPress specific plugins safe and simple.

This also includes WordPress Filters. The major difference with Filters is that they are generally more risky to use; you have to assume other plugins are already using them, and those same plugins aren’t designed to handle whatever you’re trying to do too.

Screens

Derived from BuddyPress, screens are basically “Views” if you’re familiar with MVC. They are how we output markup to the browser from inside PHP, WordPress, and our plugins. Screens can be modular (again, see bbPress) allowing them to work with shortcodes, widgets, and template parts. Screens typically contain all of the translatable strings and HTML markup, and sanitize any variables for output.

Handlers

Handlers are the equivalent of controllers in MVC. They are responsible for containing the logic that comes from requests like forms, AJAX, JSON, XML-RPC, etc… They “handle” whatever the request is, performing capability checks, validating input data, and also checking for nonces.

Why not use MVC?

Honestly? No reason. Slash isn’t intended to compete or replace anything, and like anything else it’s constantly evolved over time to become what it is today, and will likely change tomorrow too. MVC and other architectures work really well, and Slash is just an approach that’s worked well for me. Putting a name on the routine should help it grow, or educate me on better approaches.

It’s also worth noting that Slash isn’t really anything new, but rather an assembly of separate methodologies combined into a single process that helps me translate my thoughts into code.

The best way to see the Slash approach in action is to browse through the BuddyPress and bbPress codebases. If you’re an experienced developer, I’m always looking for feedback. If you’re just starting out, maybe give the Slash approach a try. Take what’s in bbPress and remix it for your own use, and let me know how it goes.

Categories
bbPress WordCamp

Beeeees!

A highlight from my bbPress presentation at WordCamp San Francisco 2012.

[wpvideo tG3NrSDs]

Categories
CSS bbPress Software WordPress

Retina 2x downsampling

While working on some 2x retina images for WordPress.com, and the bbPress and WordPress open-source projects, I found an image rendering issue that I haven’t seen documented anywhere yet. Here’s the WordPress core retina ticket, for reference.

The first image highlights the difference between the WordPress core 2x icons, and the bbPress 2x icons. Notice how the icons next to Forums, Topics, and Replies have a slightly thicker black outline, specifically in 2x mode. The icons next to Posts, Pages, et all, are WordPress’s icon32 equivalents, with the same border thickness as the original 32px icons used in the 1x headers.

Using the original 32px icons was a great idea for a first-pass win at having 2x icons in WordPress core, and there are 64px equivalents now too! The difference between the WordPress and bbPress icons is subtle but important when you look at the second image in the gallery.

If the browser loads 2x images, but the display (for whatever reason) renders in 1x mode, you naturally end up with downsampled 2x images. To purposely duplicate this behavior:

  • Have a Retina MacBook Pro.
  • Connect Cinema Display.
  • Open Safari.
  • Move Safari 50% between the rMBP display, and the Cinema Display.
  • Watch any 2x images downsample to 1x size.

While edge case, the circumstances where a browsers’ calculated pixel ratio does not match the display are a new bug from a new convention. Arguably, operating systems and graphics cards should handle this more smoothly, and I suspect they will eventually. Until then, if the risk is providing a worse experience than plain-old 1x images, it’s our responsibility to include 2x images that will downsample to a usable state in 1x mode.

Weird, wild stuff!

Categories
bbPress WordCamp

Slides from WordCamp New York 2012

Categories
Life BuddyPress bbPress Software WordPress

Confessions of an Open Source Workaholic

Hi, my name is John, and I’m an Open Source Software workaholic. I touched on it a bit in my WPCandy interview, and I thought I’d finish the story here with a few added thoughts.

I live in a great neighborhood on the east side of Providence, RI. I work from home, rarely drive my car (ignore the frequent road trips), and enjoy the luxury of being walking distance from food, laundry, spirits, and anything else I might need to live a happy and comfortable life.

By day, I work for Automattic. I love my job. I love my colleagues. I love everything about what I do. To say it’s a dream job is an understatement. I work on some really awesome stuff going on around WordPress.com, Jetpack, Gravatar, and try to poke my head into other interesting social bits as much as possible.

By night, I’m the lead developer of bbPress, BuddyPress, and maintain both of the bbPress.org and BuddyPress.org sites. I believe both projects are two of the strongest spokes attached to the WordPress hub, and it’s my pleasure and privilege to be so closely involved with them. I am passionate about their success and enjoy iterating and improving them both equally, and love to help their users whenever I can.

That said, I’m in a unique and misunderstood position.

I work 40+ hours at a job that I love. Most days when I’m done with work I switch gears to my hobbies; usually that’s bbPress and BuddyPress. Other days, I enjoy going to the park with my dog Paul, watching Netflix, or enjoying a nice meal with friends.

In 2010 and 2011, I had the pleasure of mentoring some really bright individuals as part of the Google Summer of Code and the Google Code In projects. Gautam Gupta, a 15 year-old student from India, placed 6th by working closely with me contributing to the first major release of bbPress in two years; helping to totally refactor bbPress into a plugin for WordPress, skyrocket its popularity, and reinvigorate something great that hadn’t had much attention in a while.

My point, is that working on the bb’s is not something I am directly paid by Automattic to do. Instead, my job at Automattic enables me the means to keep my skills sharp *and* work on the software that I love, at the same time; it allows me to spend my free time giving as much back to the community as I am willing and able to. I choose to concentrate on bbPress and BuddyPress.

While Automattic does donate the time of several full-time people directly back into WordPress, and while it benefits Automattic as a business to be coupled so closely to its active development, it is not Automattic’s responsibility to staff anyone to contribute back to any open source project anymore than it is your own to do the same.

WordPress is free and open for anyone to build off of and dedicate resources towards. The bb’s are both free and open like WordPress is, with a lower barrier of entry to make a a much larger impact. If you’ve ever been intimidated by the amount of activity happening around the development of WordPress, or have been afraid your contributions aren’t good enough: 1. you’re wrong; 2. use the bb’s as your training ground.

If you choose to stick around and help work on the bb’s, your influence carries more weight because there are fewer people contributing. Dedicated contributors walk up the ranks quickly, earning core commit access like Boone Gorges, Paul Gibbs, and I with both BuddyPress and bbPress. We’re not the founding developers, we’re the currently active ones, and we would love to have your help. From code to codex, everything is an iterative work-in-progress.

Who knows, maybe eventually you’ll be an open source workaholic, too.

Categories
BuddyPress bbPress WordCamp

I’m Speaking at WordCamp San Francisco!

Following Ian’s lead, I too am speaking at WordCamp San Francisco this year! This will be my second time attending and first time speaking at the annual WordPress conference, so needless to say I (like Ian) am super-excited about it!

The details of my session haven’t been officially released, but you can bet the farm it will be something totally awesome about BuddyPress or bbPress.

Categories
BuddyPress bbPress WordPress

My Favorite Circles are Open Source

My Favorite Circles are Open Source

Categories
Life BuddyPress bbPress WordPress

I’m an Automattician!

Today was a very awesome day for me; it was my first full day as a Code Wrangler with Automattic, Inc.

First, I’m really excited about the opportunity to work with such amazing, talented, and ulta-cool people on a daily basis. Over the past 2 years I’ve had the pleasure of meeting a fair number of Automattic employees at various WordCamps across the US. They all do-what-they-love and love-what-they-do, and to say that this has been a goal of mine would be an understatement; it’s a dream job come true.

Second, I’ll continue to support my existing WordPress plugins. If you use anything that I’ve written or helped develop, that will keep on keeping-on. Regarding BuddyPress and bbPress, those are still very much full-steam-ahead, as well as some other really neat implementations of both of those projects.

Third, I’ll be available for speaking opportunities at more WordCamps and conferences. When I was working freelance I really needed to budget my time and finances months in advance, and consider the out-of-pocket cost to my family and my business for each individual trip. That made it really hard to cherry pick which ones to visit since the decision was directly linked to how much gas I had in the car and how full the refrigerator was. Now I’ll be able to be more involved with the community again, not just at WordCamps, but the support forums, IRC, and other various conferences (which as a brief aside is something I’ve really been missing lately.)

Lastly, I’m appreciative of everyone that I’ve met in the WordPress community. The past few years have been amazing, and words can’t express how excited I am for what the future holds for me at Automattic.