Speaking at WordCamp San Francisco 2011

I'm speaking at WordCamp San Francisco 2011!So it seems I’m speaking at WordCamp SF this year, which is awesome! I’ve attended for the last few years, and it has been instrumental in getting me involved more with the WordPress community and specifically with the development of WordPress.

Andy Stratton and I will be presenting Getting Involved: Contribution & Courtesy A conversation about methods of contributing to WordPress and the community, why you should do it, and how it benefits everyone – including you. Do you think you don’t have time to contribute to WordPress? Are you unsure what makes contributing worth it? Do you not know how to contribute or how to interact with the community as a whole? Then don’t miss this!

WordPress Q & A

I realize that I’ve done a horrible job of posting here over the last year. I made exactly two posts in 2010. However, just because I haven’t been posting here doesn’t mean I’ve disappeared. I’ve still been working on WordPress, WordPress powered sites, WordPress plugins, and even some side projects built on WordPress (Like Beer?). My biggest problem is deciding what to write about, so I’ve come up with a solution. I’m going to answer your questions. Not only will this help me come up with ideas of what I should write about, it will also make sure that my content is specifically useful to you.

So, if you want to know how to best use WordPress’s built in http class to integrate with an existing API, how to add your own taxonomies to your site, how to make your theme more extensible, or almost anything else WordPress related, please just ask!

WordPress Question

Ask me your WordPress question!
  • This field is for validation purposes and should be left unchanged.

Google Summer of Code 2010

It’s official (and has been for a few days, I’m a little behind schedule), the 15 students selected to work on WordPress this summer as part of the Google Summer of Code have been announced. The lineup is pretty great. There are some names on the list that will be familiar to those who are already involved in the WordPress development community. Andrew Nacin for example was given WordPress core commit access in February. Also,
Justin Shreve and Daryl Koopersmith both participated in last year’s GSoC (quite successfully).

This year there are a lot of great students and projects. I’m definitely excited to see what happens with all of them. However, I’m most excited about the student that I’m going to be mentoring. Jon Stacey is going to be implementing stream wrappers into the WordPress file API. He did a similar project for Drupal as part of GSoC last year, and this year we were able to woo him over to WordPress.

Not only does the project have great potential, but since stream wrappers were introduced in PHP 5, it will help push WordPress toward PHP 5 as a minimum requirement (which I’m all for). So good luck to Jon and all the 2010 GSoC students.

How To Make Your Own WordPress Widget

In this article, I’m going to show you how to write a simple plugin that adds a new widget to WordPress. We’ll be using the new WP_Widget class, which is the newest method but means that the widget will only work in WordPress 2.8+. I know that 2.8 isn’t actually out yet, but it will be soon and there’s no sense in learning the old method.

The widget we’ll be creating will display upcoming posts (scheduled posts). A lot of sites schedule posts to automatically publish at a specific time, helping them keep a steady flow of articles. I know that I use this trick on Web Developer News and Attackr, and I’ll use it on this site as soon as I get some more articles written. Since the articles are already there and ready to be posted, why not tease them and give your readers something to look forward to? That’s exactly what this widget will do.

Read more

WordPress Core vs Canonical Plugins

There has been intense discussion about what should and shouldn’t go into the core of WordPress and what should be in plugins since way before Matt talked about canonical WordPress plugins in his State of the Word, but that mention has definitely caused some serious buzz. The question is whether WordPress should stay small and fast or grow and be feature rich. Both have their advantages and disadvantages.

The advantages to the “WordPress should stay small” philosophy are not limited to the WordPress download staying small (although that is one advantage). A smaller code base will make it easier to keep WordPress fast, reliable, and easy to test as well. The people that support this side of the argument would argue that WordPress could be extended to still accomplish any of the “missing” features through plugins and custom themes, and having built-in functionality that you don’t use is a waste.

The disadvantages are that many users (remember there are millions of WordPress blogs out there, many ran by people that are not tech savvy) are not comfortable with or even capable of installing plugins to solve their problems. For those people, having the functionality in the core WordPress install is probably the only way they’ll get to use it. Not to mention if 99% of people that install WordPress install a specific plugin, isn’t it obvious that the functionality provided by that plugin should be included in WordPress itself? Unfortunately, what if it’s 95%? 90%? 75? It’s hard to figure out where to draw the line. Additionally, if something is popular but doesn’t make it into core, should the programmers test against it before releasing new versions of WordPress or does that responsibility fall to the plugin author?

Obviously the advantages and disadvantages for the “WordPress should be feature rich” philosophy are the exact opposite. The problem is, both sides have valid arguments, so the real question becomes “is there something better?” I think canonical plugins may very well be the answer to that. The idea of canonical plugins is that WordPress would back a specific plugin as being the “solution” to a specific problem. For example, maybe you want to display related posts and WordPress has decided that “Efficient Related Posts” is the solution for that. They may have a list of commonly asked for features and their solutions on a page somewhere, or they may take it one step further and package the plugins with the official WordPress download.

I think that if they package some plugins with the official WordPress download, they may be very close to a great solution to this tiring debate. The advantages are that the core would stay lean, fast, and reliable. The functionality would be available to all users because it’s just a matter of activating the plugins rather than finding, downloading, and installing them. Also, the plugins that are shipped with WordPress would need to be tested with each new version, which means they’ll be stable as well. The only real disadvantage is that the download size would grow, but we live in the era of broadband. It seems a small price to pay to solve so many other problems.

WordCamp San Francisco 2009

As some of you already know, I went to WordCamp San Francisco last weekend. I took the wife (who didn’t attend WordCamp, but did come to the party) and had a great time taking in some of “The City” in the process. I went to the main event on Saturday, the WordPress Anniversary Party Saturday night, and also the developer day on Sunday. It was really nice to meet some of the people, and just get a feel for what a WordCamp is like.

When I first showed up on Saturday, they weren’t even ready to check people in yet. I tend to be quite prompt, so I was there a few minutes before eight, and they were still alphabetizing name tags. Luckily there was a nice little place to sit, with power for my laptop and free wi-fi (unsecured to be exact…). The plan was to tweet about the experience as @wpinformer, which is the Twitter account for WordPress Informer where you’ll be able to read more detailed posts about each speaker I listened to. once they were ready I checked in, and just a few minutes later I was passing the check in tables and overheard them turning away walk-ins because they were already overbooked. I don’t know what the actual totals were, but I’m guessing there were about 800 people in attendance.

I ended up attending the welcome by Matt Mullenweg, “Cooking With BuddyPress” by Andy Peatling, “Straight from Google: What You Need to Know” by Matt Cutts, State of the Word by Matt Mullenweg, “Your Business Web” by Dave Gray of XPlane, “Customizing Themes and Plugins” by Ann Oyama, “Even Faster WordPress Themes” by Steve Souders, “FAILs, LOLs and User-Generated Content” by Scott Porad, “Lessons from Mozilla” by John Lilly, and the Goodbye by Matt Mullenweg. The fact that there were two tracks means that I missed a lot, but I was able to see pretty much everything I wanted to.

The tracks were upstairs and downstairs, with the main room being upstairs. The welcome by Matt Mullenweg was extremely quick and generic. It served as a kind of kickoff, but I honestly could have skipped it and just started downstairs at the first speaker.

The first real presentation I saw was “Cooking With BuddyPress” by Andy Peatling. You can read Why BuddyPress to get more detail about what I thought, but overall it was a really great session. Andy obviously knows what he’s talking about (he is the lead developer of BuddyPress), but he’s also good as conveying that knowledge to his audience. It was nice to hear a little of the history of the project (421 days to version 1.0) and some of the plans for the future (such as better BBPress installation), but the best thing was getting a quick overview of how BuddyPress worked, what it did, and how it could be extended and customized.

Next I went back upstairs to listen to “Straight from Google: What You Need to Know” by Matt Cutts. Matt is the head of Google’s Anti-webspam department. His job is to find those spam sites that plague the internet, and make sure that Google doesn’t offer you links to those kinds of sites in your search results. Since he spends so much time dealing with Google’s algorithms, he’s extremely current on best practices in Search Engine Optimization. The biggest thing to take away from this talk was that Matt said that WordPress is a “great choice” for SEO because it solves “80-90% of Search Engine Optimization (SEO).” That’s really saying something coming from one of the true experts out there.

After that, everyone came upstairs for “State of the Word” by Matt Mullenweg, whoch actually continued with a question and answer session after lunch. We got a lot of the normal history, WordPress was a fork of B2 and was later officially recognized by the B2 creator as the “official” continuation of B2, etc. There were a couple interesting WordPress facts such as that plugins were introduced in WordPress 1.2 and themes were introduced in WordPress 1.5. He also gave his summary of GPL Freedom to use software for any purpose, freedom to modify software, and freedom to redistribute. Then he talked about the fact that WordPress.org would be featuring themes that had paid support available, which he sees as perfectly in line with the essence of the GPL (and I agree). Alex King was brought up to talk a little about Crowd Favorite which now has eight full time staff in Denver and WordPress development and support is their primary revenue stream.

The Internet According to Dave Gray After the Q & A with Matt, I went downstairs to listen to “Growing Your Business Web” by Dave Gray of XPlane. Dave started by saying his slides sucked and wouldn’t be available for download, but I disagree. As a matter of fact, I loved “the internet according to Dave Gray” which spread pretty quickly across Twitter (so I’m not the only one). The whole talk was great, but was unfortunately cut short because he was going over his allotted time. It would have been nice to let him go a few more minutes, but I understand that they needed to keep things going.

Next up was “Customizing Themes and Plugins” by Ann Oyama, again downstairs. Ann was extremely nervous, and it showed. I was fine with that, I get nervous too. It seems like she knew most of the material, and I credited her nervousness with the bits that she seemed to leave out, skip over, or jumble up. Unfortunately, some of the information she gave was simply wrong. For example, functions.php and plugins are not really “the same thing.” They are loaded at different times, so they can do different things. For example, plugins are loaded before pluggable.php and can therefore override about 43 functions (depending on the version of WordPress) that functions.php cannot. Plugins can also modify settings before the global $wp_query is set up, which can be extremely handy. There are more differences as well, but that’s not really the point. Nervousness aside, there was some misinformation and while many of the people in the room will never need to know the differences (and some of the people there already knew), it’s still pretty unfortunate.

After Ann, things really picked up. Next was “Even Faster WordPress Themes” by Steve Souders, who wrote “High Performance Web Sites” and “Even Faster Web Sites” (both must reads in my opinion). Steve has spent time optimizing web performance for companies like Yahoo and Google, and he really knows his stuff. A lot of it was repeat info from his books, but it was definitely extremely useful information.

Following Steve was “FAILs, LOLs and User-Generated Content” by Scott Porad. He went over some of the highs and lows of having users generate your content for you. Steve Porad is the CTO at Pet Holdings, Inc. (aka lolcats) and I think everyone will agree that they’ve definitely succeeded at user generated content. They also run completely on WordPress.com, which really says something for WordPress.com.

For the last full session of the day I listened to “Lessons from Mozilla” by John Lilly. I loved his style of talking. He was a little ADD, running a lot of tangents…which reminded me of…well…me. He offered no “magic” key to succeeding as an open source project, which I respect because I don’t think one exists. However, he did give a good picture of what it’s like at the top of the food chain, with no one to copy or follow. It had been a long day, and I was tired, so I slacked off on tweeting as well as notes. I wish I hadn’t.

The day ended with the Goodbye by Matt Mullenweg. It was nearly as quick as the welcome, but by the end of the day it didn’t seem so bad. The big announcement? Don’t forget about the sixth anniversary party at the Automattic lounge. The party was nice, but let’s face it…we geeks aren’t all that outgoing. It seemed pretty dead by about 10pm when I left. So what was the best part of the conference? Definitely the developer day on Sunday, which I promise to write about soon.

The Problem with Related Post Plugins

Showing related content to your users is important. I don’t think there’s anyone disputing that (at least not that I’m listening to). The real question is “how?” How can you show your user good related content without adding a ton of extra work for yourself? This is where related posts plugins come into play.

There are a lot of options out there. So many that it’s quite time consuming to try them all until you find one that suits you. Two of my favorites are WordPress Related Posts and Yet Another Related Posts Plugin (YARPP). Yarpp gives you more control over how matches are made, but for that very reason it’s also less efficient. Joost de Valk referred to it as a “heavy plugin” in his article on Optimizing WordPress database performance, and it definitely is. WordPress Related Posts is far more efficient, but offers you a little less control over how matches are made. Unfortunately they share the same problem.

So what is this problem? They all find matches to a post in the front end rather than the back end. They do it when a user views a specific post, rather than when a post is created or modified. On a brand new site I launched, which has only 7 posts, we’ve received roughly 2000 pageviews. That’s pretty low, but lets take a look at it. About 700 of those visits were to the home page and about 1300 were to single post pages. If you only show related posts on single post pages (which is how we currently do it) then the related posts plugin has been run over 1300 times for only 7 posts, which is roughly 185 times per post! If I were to show related posts for each post on the front page then it would have run another 4000 times (which is a conservative estimate), bringing it to 757 times per post. If you think this seems excessive, lets take a look at the stats for Web Developer News. It has had over 13,500 page views in the last 30 days. About 750 were to the home page, about 140 were to other static pages, roughly 550 were to tag pages, and another 250 were to miscellaneous pages such as search pages. That leaves 11,810 visits to single post pages and 21 posts during that same time. That’s about 562 times per post! If I added related posts to the home page, tag pages, and search pages it would need to be run roughly another 15,000 or 1,276 times per post.

Read more

The WordPress has-patch marathon

Xavisys is participating in the WordPress 24 hour has-patch marathon. We’ll update this post as we go, but wanted to encourage others out there to participate as well. Grab a ticket and get started!

#8014 has been fixed as part of the marathon.
Now you can use dbDelta() with SQL containing backticks!
#9507 has been fixed
You can now localize the “tag” word in the new plugin page
#9408 has been committed
WAI-ARIA landmark roles have been added to the default theme to increase accessibility
#5710 – wp_tag_cloud should echo get_tag_cloud
For this one, my patch was replaced with a better solution offered by DD32 which added an echo option to the args array for wp_tag_cloud
#9472 – Fixed
Now wp_list_pages() applies the “current_page_item/parent/ancestor” classes when browsing image/attachment pages!
Some new filters were added
I always like to see new filters. It means that plugins can be more powerful. They added wp_trim_excerpt and admin_footer_text so far.
#9442 – Login UI
They added a password recovery link to the login error messages

Exciting new things in WordPress 2.8?

WordPress 2.8 is slated to be released late this month. Unfortunately, I’ve heard a lot of talk that 2.8 isn’t anything to get excited about. People are saying that it doesn’t have a lot of new features. As a matter of fact, in the WordPress Weekly PodcastEpisode 49 Were You Fooled?, David Peralty even said that it only had “stuff that should have been in WordPress already”.

While I agree that 2.8 will have fewer noticeable new features than 2.7 did, it definitely has plenty packed into it. First, more than 270 tickets have been closed for 2.8, over 240 of those were set to “fixed”. Many of the changes in WordPress 2.8 are cleaning up what was added in 2.7, as well as strengthening the foundations of the core code.

The widgets code has been completely reworked and all the core widgets have been updated to use the new WP_Widget class. Personally, I think it’s pretty exciting! Previously, writing widgets that followed the multi-widget pattern (the ones that can be used more than once, like the text widget) was a real pain. Using the old widgets methodology, the text widget was 104 lines of code, and rather confusing. The new WP_Widget class has reduced that to 39 lines of considerably simpler code. I’m looking forward to updating my WordPress Twitter Widget, Gallery Widget Pro, and Get Free Web Designs Widget. I also plan to release a few new widgets using the new framework.

Another new feature in 2.8 that I find important, is support in the Admin UI for taxonomy descriptions. Currently in the WordPress admin interface, you can add descriptions to categories, but not for tags or any custom taxonomy. Since categories, tags, and other terms are all the same now, there’s really no reason you shouldn’t be able to control the description of all of them. The patch that was committed (which I submitted), adds a description box to the tag/taxonomy forms in the admin section, adds a description column to the tag and custom taxonomy tables in the admin, and adds two new helper functions for use in your theme called tag_description and term_description.

Here are some other things I find interesting that are new in 2.8:

In the end, the changes may not be as flashy as they were in 2.5 or 2.7, but 2.8 is a solid step forward for WordPress.

Becoming a Freelance Web Developer/Designer

It wasn’t all that long ago (although in “web years” it’s been ages) that I was trying to break into web development as a career. Now that I’m more established, people are asking me the same questions I asked others when I was starting. They all amount to one thing: How can I take this from a hobby to a career?

In my experience, most web developers and designers (especially those trying to begin a career) enjoy what they do. They usually start building small sites or themes as a hobby, often getting together with other like-minded people at sites such as Open Designs. They do what they do because they like it, but who can fault them for wanting to get paid for doing something they love? It’s the ultimate goal.

So what do you do? First off, you need to understand that it’s a highly saturated market, and you’re going to have to put in serious time and effort to turn this into a career. You’re going to be putting in 40 hours at work to pay the bills, and another 20-30 hours laying the foundation for your future career. If you aren’t ready to put in the time and effort, you can stop reading right now. This is not a get rich quick scheme, it’s a plan that you can follow if you’re really serious about it.

Now that you’ve agreed to put in the necessary effort, here are some steps to follow:

Step 1:
Register a domain name, and get some inexpensive hosting. You can get hosting through GoDaddy for less than $5/mo, and if you do, you can get a domain name from them for $2 for the first year. Install something like WordPress or Drupal on the site, and put up some general info. As you go, you will build this out into a portfolio, but you need to start somewhere.

Step 2:
If you haven’t already, you should join a community like Open Designs. If you are a designer, create and submit designs. You’re not looking for quantity, you’re looking for quality. Your designs need to stand out as better than all the rest. Be unique. Find out what you’re good at, and perfect it. While you are aiming for quality, quantity DOES matter. However, that won’t be a problem since you’re spending 20-30 hours per week doing this right? I’m sure you can turn out a design every week or two, so you worry about quality, and quantity will handle itself. Release your designs as public domain, but keep your absolute best design for yourself. Creative Commons is more hassle than it’s worth, and you want your designs to be used.

If you are not a designer, try to network with designers. Offer to code their designs into themes for common CMSs, etc. You probably won’t make it very far as a freelance programmer if you don’t have some designers you can use. Build relationships with the quality designers, and remember that quantity will handle itself as you put in those extra hours. Also try to post helpful tidbits in the forums and answer people’s questions when you can. Networking is important.

Step 3:
Continue to build the site you started in step one. Take your best design and add it to your site. If you are a developer, ask a quality designer if you can barter work for a custom design. Document your work on there. Not just a gallery, post some content. Walk a visitor through your design process or make a tutorial on converting a design to a theme. Make sure to set up a contact page with your info so clients can reach you.

Step 4:
Do some inexpensive work for hire. Consider finding a charity or a socially proactive business and do some work for almost nothing. Get used to working with clients and doing things up to their standards. An alternative to the charities is to try out a freelance website. The competition is massive, because the market is global, but if you’re persistent you can get work.

Step 5:
Go for clients with a vengeance. Make a form-style E-Mail that has information about you, links to your portfolio (which should look pretty good at this point), etc. Leave room at the beginning (NOT the end, this is important) for a personal note that will let the potential client know that you personally read and replied to their request. Find places where jobs are posted for work that you are especially good at. Consider finding niche places like a WordPress or Drupal job list where there may be less competition.

Don’t limit yourself to job lists. More than 80% of jobs are never posted anywhere. Find local businesses that have poor sites or no site at all, and take them a proposal (in person) with specific ways they will benefit from it. If they have a bad site, make sure to be careful what you say, it’s VERY common to hear an owner say “my {insert relative here} made that site for us” and you don’t want to be insulting. Base your argument on facts and statistics, possibly taking mockups or printouts of sites that are similar to what you are recommending.

Step 6:
Make the leap. At some point, you have to let go of your regular job and switch to this full time. I haven’t really found a rule of thumb for when this is. It’s different for every person. If you’re having a hard time deciding if you’re ready to drop the 9-5, consider getting a part-time job elsewhere and doing this full-time. Maybe the extra income will help ease the transition. Mostly remember that freelancing is still a job, it’s just one you like. And it’s not against the rules to like your job.