{Control Your Internet}
Controlling your Internet means having a web presence that does exactly what you want it to do, and does it easily. Xavisys thrives on giving you full control of your Internet, from communicating with your clients to rich web applications. If you have a vision for the web you would like to translate into reality, contact Xavisys and find out how our programming and design team can help you take control of your internet.
Efficient Related Posts
There is a problem with related posts plugins, and Efficient Related Posts is fixing that by approaching the problem from a different direction and offering a very different solution. Basically, current related post plugins build the list of related posts on the fly when the user needs to view it. Since blogs tend to be viewed far more often than they are updated (often hundreds of times more often), these queries are run way more times than they need to be. This not only wastes CPU cycles, but if the queries are slow (which they will be if you have 1000s of posts and tags) then the user gets a poor experience from slow page loads.
Here are some of the statistics. On WordPress Informer, when it was very new (less than a month old) it had only 7 posts, and had 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 on there) 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.
In addition to the simple waste of memory and cpu cycles, putting the calculation of related posts on the front end means that when they start to slow down your users are left with a bad experience and slow loading pages. And they will slow down eventually, if your site gets big enough. I just recently worked on a site with more than 6,000 posts and over 1,800 tags (they offer investing advice, and have a lot of tags that correspond to ticker symbols). At that point, some of the related posts queries were taking 10 seconds to run. That’s really slow. We can do better than that right? Well it’s not easy but I think we can.
Efficient Related Posts moves all this effort into the admin section, finding related posts when a post is saved rather than when the user views it. The advantage is that if the query is slow it happens less often and the post writer is the one that waits rather than the user (which I think is WAY better).
There are limitations. For example, since the related posts are stored as post meta data, we only store a certain number of them (10 by default, but you can set it to whatever you want). This means that if you decide you need to display more than 10, you need to have the plugin re-process all posts. I generally display up to 5 related posts, but store 10 just in case I decide to display more in some areas. Also, since the related posts are calculated when a post is saved, manually adding a tag through the database will have no effect on the related posts, although I recommend not doing that anyway.
Requires PHP5.
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.
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.
Client Craziness
The client is always right aren’t they? Of course they are, just ask them! (Yes, that was sarcasm at it’s finest) The reality of the situation is that we’re all in business to make money. There are some clients that make that impossible. I don’t want those clients and you shouldn’t want them either. I’m a firm believer that the absolute best vendor client relationships are mutually beneficial. The vendor can make a decent profit, and the client can benefit from the product or service. Try to make that happen. Be flexible, be friendly, be helpful, but don’t be a door mat. Just remember, this is what “those clients” are really acting like:
As a final thought, remember to never be that kind of client…in any situation. Keep that in mind whenever you’re negotiating for something.