Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Getting ready for WordCamp Birmingham 2009

WordCamp Birmingham 2009In a short while, I’ll be leaving Atlanta, and heading west to Alabama for WordCamp Birmingham 2009. I’m giving a presentation on Saturday morning about Jumping Into WordPress Plugin Programming. Of course, my presentation still isn’t done, so I’ll be burning the midnight oil tonight, finishing up my notes, gathering up my bookmarks, and turning it all into a slideshow. Unfortunately, my presentation is in the first slot of the morning. Fortunately, once that’s over with (for better or worse), I can enjoy the rest of WordCamp relatively stress-free.

Mainly, I’m looking forward to talking to people, both the people I’ve met before, like Mitch Canter of StudioNashvegas, and those I haven’t, like Matt Mullenweg of…everything. If you see me wandering around, feel free to introduce yourself. I might be brain-dead from lack of sleep, and not the best conversationalist, but I’m usually more than happy to talk about WordPress, programming, or other general geekery. 🙂

Most Useless iPhone 3.0 Feature

In the iPhone OS 3.0 update, there were a lot of nice features added. Some of them are fairly major and useful, like cut-and-paste. Some of them are subtle and useful, like the 30-second rewind button when playing a podcast. But there’s one feature that sticks out to me as totally useless: “Shake to Shuffle”.

I guess there’s some tiny “cute-factor” to it. But in practical terms, it’s pretty darned useless. When you’re using your iPhone or iPod Touch to listen to music, you’re probably either: on the move (in your car, jogging, biking, mowing your lawn, etc.) or in a passive environment (working at a desk, connecting your iPhone to an external amplifier/speaker system, etc). Rarely are you going to be carrying your iPhone in hand, but still enough to avoid accidental shuffling.

And accidental shuffling is what makes this feature so useless. I didn’t realize that Apple had defaulted this feature “on”. So imagine my confusion when on a couple of occasions I was driving down the road and my iPhone skipped the the next track in the middle of a song. I didn’t think much about it at the time, but then somebody mentioned “shake to shuffle” on Twitter, and it suddenly occurred to me that I should check that setting. Doh!

Thanks, Apple. You re-invented the Sony Discman.

W3 Total Cache Plugin

There’s a new WordPress cache plugin in town, and it’s called W3 Total Cache. This plugin is one of the contestants in the 2009 Weblog Tools Collection Plugin Competition.

The W3 Total Cache plugin (W3TC for short) is an advanced cache plugin, and you can only have one of those on your site at once. So if you’re currently using WP Super Cache, you’ll have to disable that first before enabling W3TC. [side note: I tried to find a good link for information about the advanced-cache functionality, but I came up empty. we need a Codex page for that]

If you’ve used WP Super Cache before, you’re probably wondering what’s different about W3 Total Cache? Everything. WP Super Cache is a static disk cache. It creates files  on disk with a certain lifespan, and gets the web server to use those instead of firing off PHP to generate pages on-the-fly, thus saving CPU and time. So, on the bright side, it saves your server a lot of work. On the down side, you lose some of the dynamic nature of your site. The entire page will remain cached as-is until the cached version expires, or until it is forced to regenerate (because you update the page, a comment is added, etc).

W3 Total Cache works differently. It utilizes multiple techniques to improve performance, including: object and query caching; page caching; HTML, CSS, and javascript minification; gzip compression; CDN (Content Distribution Network) support; and browser caching via ETags. Currently, the caching is based on APC and/or memcache. I’ve suggested that they add XCache, as well. The closest other plugin is probably Batcache, which also uses a memcached backend for caching.

Read on for details…

Retheme: Stage 1

I’ve pulled the trigger on the first stage of my site re-theme.

Right now, it’s still a pretty clean slate. I’ve switched over to the Thematic theme (actually a child theme using Thematic as its template), and done just a few quick stylesheet fixes and personal plugin tweaks. Currently, there are still a few warts which I need to iron out (some sidebar styles on sub-pages that need fixing, and such).

More major style/branding changes will come later, but this “tabula rasa” state of things will help motivate me to continue making changes.

If you spot any obvious glitches, please feel free to point them out.

Jumping Into WordPress Plugin Programming

WordCamp Birmingham 2009In a few weeks, I will be a presenter at WordCamp Birmingham 2009 (that’s Birmingham, Alabama, not England, by the way). Last year, I did a presentation on “The Future of WordPress“, shortly before the release of version 2.7. I briefly considered doing the same thing this year, updated with speculation about the upcoming versions 2.9 and 3.0, but that seemed like a cop-out. I wanted to do something a little deeper.

One of the things that always frustrates me about starting to work with a new programming language, or with a new framework for a language I already know, is the initial learning curve. Everybody wants to start out with the ubiquitous “Hello, World” example, which is great for a quick syntax example, but is pretty useless for practical purposes. I always want a good primer which doesn’t assume I’m a complete beginner, and dives right into useful examples. I want to know how to find the existing pieces of the system that are going to make my life easier. So I thought others might appreciate something like that for WordPress plugin programming.

So that’s going to be my presentation topic this year. I’m going to try to create an introduction to creating plugins for WordPress. While there are bits of the process that can be complex, the real meat of the API hooks (filters and actions) are really pretty simple. And I think that with a good overview, those who aren’t already familiar with programming for WordPress can get up-to-speed more quickly than if they had to discover everything by searching the web and using trial-and-error. While I will try to keep things as simple as possible, I’m going to assume that my target audience will at least have a basic knowledge of programming concepts to include what functions and arrays are. You won’t have to be a PHP expert, or even be able to sit down and write a program from scratch without a reference book handy.

I will, of course, make the presentation available online when the WordCamp arrives. And since I’ll be limited by time in my presentation, I’d like to publish an expanded version here later as a series of articles where I can go into more depth.

I’ve already started a rough outline of what I want to cover. But I’d welcome any ideas or questions on this topic. If you are already familiar with programming, but you’re new to programming in the WordPress framework, what questions have you had? What concepts confuse you? What areas would you like to see covered?

Analytics Observations

Over the years, I’ve variously either obsessed over or ignored my site stats. I’ve always found website analytics interesting, but since I’m not selling anything here, I don’t have a lot of motivation to really dig in and try to make sweeping changes for the sake of increasing clicks or search engine rankings. Oh, I have dabbled with things here and there — related posts links, the SEO Super Comments plugin, etc. — but my major motivation is typically to 1) make it easier for my readers to find useful content, and 2) make it harder for spammers to slip through my nets.

Still, I do glance at things from time to time, and my interest was piqued again recently by playing with the Analytics360 plugin. A couple of things caught my eye, surprised me,  and got me to look a little closer. I thought I’d share a few of those observations here. “SEO Experts” can probably go ahead and move along — you’ll probably just chuckle at my amateur findings.

Continue reading

WordPress Webhooks Plugin

Check out this demo video of a new plugin by mitcho, called HookPress. HookPress adds the ability to use webhooks as WordPress actions and filters. Since webhooks run from a web server (not directly inside WordPress), this means that you could, for example, use scripts in python, perl, ruby, or whatever to extend WordPress. How’s that for nifty? And what’s extra nice is that the user interface for it on the WordPress side looks super simple to use.

Read more and see the video…