Welcome Home Xeer2000!

My gaming blog, Xeer2000 has found a new home. You’ve guessed it, here!

Yesterday I imported all the entries from there into the xeer2000 tag here. I converted status messages on my old blog into Asides which look well. I did have to edit a huge 5MB xml file but thankfully it imported without a hitch. (Tip: always import into a test blog first, and make a backup!)

Why? I used to post on that blog every day but lately that hasn’t been the case, and since I have really failed to keep updating this blog on a regular basis I thought it was time to merge them together. This is after all my personal website. If you came here for WordPress goodies check out the WordPress section!

Following in the grand tradition of asides as used by Matt and others I’ll be making smaller posts and snippets more often. I used to do this all the time years ago. Some things I’d fire off to Twitter without a thought will get pushed here instead. Half the time I retweet something it’s to have some record of a witty or interesting article. I’ll invariably never go look for those RTs ever again (such is the fleeting nature of Twitter) but if they’re here I like to think I’ll stumble across them again and enjoy once more. I can reference them a lot easier here too! So is this a Twitter vs Blog thing? Not really. I just want ownership of my thoughts.

I actually hesitated to bring everything over here. I mean, a grown man playing computer games? Aren’t they for kids? Well, apparently I’m part of a growing demographic.

Most striking is the ESA’s claim that the average gamer is now 37 years old. This theoretical person has been playing games for 12 years and there is a pretty solid chance that he might actually be a she.

I’ve no idea where the ESA pulled those figures, but it’s not hard to believe. Most of the guys I play online with are in their 30s or 40s with only a couple of exceptions!

If you’re a regular reader thank you for hanging around even though this site wasn’t updated very often. Feed readers are great aren’t they? Hopefully you’ll continue to enjoy what I post here in the future. If not, well, thanks for stopping by!

Boqueria mini review

We had a most delicious meal in Boqueria, Bridge St. Cork this evening. It’s a tapas, wine and cocktail bar that serves delicious food and I’m sure the alcohol tastes nice too but I only had a sip of my wife’s white wine. Staff are super friendly too and even though they squash people in there you should try it out. Recommended!

Futureproof on Newstalk

This morning there was a compilation of interviews from the science radio show Futureproof on Newstalk. It’s a show that broadcasts at 6pm on a Sunday evening and so I’ve hardly ever listened to it. No more, I subscribed to the show podcasts. Hard enough finding the xml feed. You have to listen to a show and in the Flash interface click on the XML link!

Good interview with Richard Dawkins during the year too.

The Irish Citizenship Test

I saw this on reddit a few days ago but this morning Rick O’Shea retweeted this 2fm tweet announcing the sale of a poster with the image above:

The Citizenship Test Poster! On sale now & with all profits going to Médecins sans Frontières, the world’s… http://fb.me/1ySOHnDU5

You can buy the poster here where “€4.50 from the sale of every poster will be donated to Rick and RTÉ 2fm’s nominated charity, Médecins sans Frontières, the world’s leading medical humanitarian organisation.”

Click on the image above to get a slightly bigger and more readable version. You’ll still have to squint a bit but it’s worth it. Well done to everyone who contributed a tweet!

Now, where’s the Cork Citizenship Test? (You knew I had to bring this up didn’t you?)

WP-Super-Cache: bug fixing and PHP object destruction

If you use the WPTouch mobile plugin, or the preload function in my caching plugin, or noticed that annoying but random and (thankfully) rare “front page isn’t showing my front page” bug then you might like to try the development version of WP-Super-Cache located on this page.

Mobile plugins need to tell WP Super Cache what user agents they support. I documented the filters you can use (“cached_mobile_browsers” and others) to do this but I don’t think they’ve been used by any plugin. It’s not hard to do and I added code that checks for WPTouch so when you visit the WP Super Cache settings page it updates the mobile user agents. So far it works for me but please feel free to view this site on your mobile phone and tell me if it looks ok! I also added support for the theme switcher in WPTouch based on code posted on the wporg forum.

It appears that the “random post on the front page” problem is a side effect of how PHP works. WordPress incorrectly reported that the current page wasn’t a search page, even though it was. I put an extra bit of code in checking if $_GET is non empty and that fixed it, so far.

Just in case anyone else is interested, this is why is_search() fails randomly when run during PHP shutdown. When a PHP process shuts down it starts by killing off objects. Unfortunately this happens before PHP stops executing your code, something that changed after PHP4.

Anything that runs when the output buffer finishes or that is registered by register_shutdown_function() better not depend on objects or classes. That means no using $wpdb, the object cache may disappear or to be completely paranoid don’t expect $wp_query to be around either! The functions is_search(), is_feed() and other related WordPress functions depend on $wp_query so you should cache the values of those functions earlier in the process. I’m thinking of hooking into wp_head but that depends on the theme unfortunately. Not every theme uses that action.

Many years ago I changed the format of the cache “meta file” from an object to an array because of the way the PHP desctruction process works. More recently, but still two years ago I had to remove all calls to get_option() and update_option() in the output buffer handler because occasionally people saw the error, “Call to a member function get() on a non-object in cache.php” in their error log. The object cache object had been destroyed by PHP! That was a right pain to figure out as the code looked perfect yet didn’t work right some of the time.

To help figure out problems I’ve added a lot more debugging to the plugin too. If $wp_query disappears it’ll appear in your debug log, and preloading will generate a lot more messages now.

Next up is caching is_search(), is_feed(), is_single() etc. Where should those be cached? The “init” action is too early for is_search and probably others but I don’t want to depend on actions that may not be in a theme.

Skyrim is pretty good and on PC you…

Skyrim is pretty good and on PC you can use mods to change things around. skyrim nexus appears to be a good place to get those mods and I’ve tried a few:

Edit: two articles on being a battlemage and a followup article.