Category Archives: Web

OGRE Web

I hate Mondays – ogre3d.org hack

Great. I got a call from the provider of the server on which ogre3d.org runs today saying that the server had been compromised, and that they were going to have to resinstall it. Seems that an unpatched flaw in a Joomla! component allowed a backdoor to be created which was spamming.

My fault – I should have patched Joomla! more often. But, I’m busy. What’s annoying is that even though I can 100% guarantee that the compromise could not have extended beyond a certain defined scope, since SELinux prevents that at the kernel level, the host has insisted on taking a tough line on this – their unshakeable policy says that a completely fresh reinstall is required, and it has to be done today. I can understand that, but I see now it’s been pointless for me to use SELinux in this case then. They’ll charge me extra for the reinstall too :( The only benefit is that at least while I’m doing it I can hop onto RHEL 5 which will mean MediaWiki can be upgraded at last.

This is going to cause some major downtime on ogre3d.org, firstly for the physical reinstall, and secondly for the time it takes me to get the ton of application software reinstalled. First priority will go to getting the forums running again, obviously. I’ll have to decide what to put on the main site page – it’ll be a placeholder at first. It’s very likely to be a few days before everything is completely back to normal again.

Don’t expect me to be doing much except getting that sorted out for a little while. I’m expecting to be stressed. Once I’ve fought these particular fires and got things on an even keel again, I’m considering moving host again since clearly the ‘premium’ support that I pay for is actually a pretty blunt instrument (you can say  you told me so now).

Update: ogre3d.org is offline as of now for reconstruction. Subversion and downloads are still available on Sourceforge, once the server has basic functionality back I’ll put up a placeholder letting people know what’s going on.

OGRE Web

Tweeting about Ogre dev

I’m a bit of a grump when it comes to a lot of the Web 2.0 startups of recent years. I still dislike Facebook – originally it was just an in-principle reaction based on their rather irritating child-CEO and his ability to attract vast amounts of investment based on a business plan made entirely of arm-waving and wet tissue paper, but now having used it for a while, I dislike it on its own merits. Even with my relatively small friends list it seems dedicated to the task of swamping me with as much useless information, stupid applications, and other such nonsense as it possibly can. Occasionally there will be a nugget of something in there, but it’s drowned in so much crap it’s hardly worth the effort to filter it. Sure, it allows me to keep up with the activities of ‘friends’, but in a much more shallow and sterile way than actually meeting them or talking on the phone/skype/in-game chat. Anyone who thinks Facebook is a good way to develop actual friendships is deluded. As a supplement for real-world or voice meetings (e.g. arranging get-togethers, sharing photos etc), I can see the utility, but I attest that it’s really not even the most efficient way to do that, what with all the junk on there. So generally, pass.

LinkedIn I like, because it sticks to the point. Every business person needs their Rolodex, and that’s what LinkedIn is – a business tool. It doesn’t claim to be central to your life, or that you can build / sustain real friendships there or other such twaddle. The focussed nature of it means there’s less noise, so it’s easier and quicker to get what you need. Contacts there are not personal, they’re a reference for it you’re looking for work, a contractor, a partner etc – which is appropriate for the medium in a way that personal relationships are not. I don’t feel the need to constantly update it or prod my contacts, or keep track of all their statuses; it just does what I need and gets out of the way.

I’ve avoided Twitter because again, it just looked like a way to pour time down the toilet. It seemed like blogging without the in-built filter that says ‘is this worth blogging about’?. Besides, I already actively participate in forums, mailing lists, blogs etc – I really didn’t feel I needed yet another dimension to have online discussions in. And I don’t really want to tell the entire world what I’m doing at any one time – I strain out the small number of actually interesting things already and post them up on this blog, and the rest of the minutae rapidly decreases in value the more degrees of separation away from me you get; so in fact real-world communication works far better as a filtering mechanism for that. Clay Shirky described why information filters in the real world have historically done a much better job with these kinds of things.

However, I decided to open a Twitter account anyway, but only for a very narrow subset of ‘what I’m doing’ – that is, what I’m currently doing in core Ogre. Obviously I blog about that sometimes, and I post in the forum for things that people need to know about, and keep the roadmap on the wiki up to date, but sometimes there are low-level things that don’t warrant that, but people are still interested in. I used to use IRC for this, but over the years drifted away from it, as it was too time consuming to loiter in channels for extended periods looking for topics in real-time, and people just bombarded me with questions all the time anyway so it was a little too much like hard work. So, for things that don’t warrant a blog or forum posting, I’m going to try to keep Twitter informed. There’s also a widget on the right there.

The focus will be kept deliberately very tight – so nothing about my other work commitments, personal life etc are going on there. If any of those things merit comment, they’ll get a more considered entry in my blog. Consider this a sort of ‘pre commit log’ of sorts! If I continue with it, anyway…

Development OGRE Web

MySQL full-text indexing & TLAs

Here’s a quick tip – if you run a technical site and have decided to use MySQL’s full-text indexing feature to make searches faster, you will want to change something out of the box. I’m upgrading the Ogre forum over xmas to phpBB3, and I’d found that the default ‘native’ search index took over 18 hours to build, simply because the forum is so large (and has in fact been ‘pruned’ back to the last 3-4 years now), plus my test server here is a more modest spec. I tried the MySQL full-text index instead, and it built in under 30 minutes, so that was a major boon, in addition to the searches themselves being faster. I have to admit I didn’t realise MySQL had this facility (it has had it since version 3 in fact); I’d only used similar features on Oracle and SQL Server in years gone by.

However, there was one problem – it didn’t seem to give me the results I was expecting, at least not all the time. The problem was that Ogre, being a technical forum, uses a lot of TLAs (Three Letter Acronyms), which  you really want to be able to search for. However, the default configuration for the MySQL full-text search is only to look for words that are between 4 and 84 characters, presumably to avoid small common words like ‘the’, ‘for’ etc (although those will get excluded by the ‘stop word’ list anyway).

mysql> show variables like 'ft%';
+--------------------------+----------------+
| Variable_name | Value |
+--------------------------+----------------+
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
+--------------------------+----------------+
5 rows in set (0.00 sec)

So, the answer is to change your configuration file (by default, /etc/mysql/my.cnf on Debian / Ubuntu, just /etc/my.cnf on RedHat), like so:

[mysqld]
ft_min_word_len=3

Hey presto, once you bounce the MySQL daemon and rebuild your indexes, you can search for words like ‘GPU’, ‘CPU’ and ‘PCF’ again. Phew.

Tech Web

Fixing YouTube crashing Firefox 3

I noticed that in the last few days, Firefox started crashing a lot, and it seemed to be related to viewing YouTube in a tab – something I’ve done regularly for a long time. It started to annoy me, so I looked into it, and it turns out that there’s some issue with some Flash ads YouTube started running recently.

So, if you get YouTube crashing when you close or open a YouTube tab, just add this filter to AdBlock:

http://*.ytimg.com/yt/swf/PMS*

Hey presto, no more crashes. There’s a discussion going on in this thread about longer term fixes but this does it for me for now.

I generally opt not to block ads on websites by default, because I derive some of the funds required to host the Ogre website from ads and therefore it would be hypocritical for me to universally opt-out. However, I do draw the line sometimes when website admins start taking the piss. Eurogamer in particular has been running some incredibly irritating ads lately, consisting of massive surrounds with multiple video feeds and all kinds of other bollocks that make the site limp like a wounded badger, especially if I’m taxing my machine running a build in the background (which I normally am – that’s when I tend to check news sites). So for them I’ve specifically blocked their silly uber-media ads until they get a bit more sensible about it.

Games Web

Calibrating the game review system

I’ve said for a while that I don’t think individual game review scores are particularly useful, on account of the fact that an individual’s taste varies. It’s always important to read the detail of a review rather than to take the score on face value, where (hopefully) a decent reviewer will explain the reasoning behind the aspects he/she did and did not like, so you can judge how much they apply to you. Even this, however, is a hit-and-miss affair, because English being the rich and imprecise language it is, all sorts of emphasis creeps in based on the reviewer’s own opinions, which may or may not be your own – it’s easier to detect and cancel out when you read the text rather than just look at the score, but even so there’s no getting away from the fact that a review is far from an empirical measurement.

I do tend to find Metacritic useful – despite my mistrust of individual review scores, when taken in aggregate, the natural statistical process tends to smooth out the anomalies and result in a reasonably good guide. Again though, you have to take into account your genre preferences – Halo 3 and Oblivion scored persistently highly but personally I’m not keen on either of them, but that’s down to my preference rather than the quality of the games themselves. When restricted to a genre though (and often, restricting to subgenre is required, for example Halo 3, Gears of War and Bioshock should all be in separate subgenres IMO), Metacritic’s results do seem to align with my overall opinion; such as rating Rock Band 1/2 and Guitar Hero 2 as the leaders in the music performance/imitation genre, and Geometry Wars 2 and Rez HD in the arcade shooter genre. I don’t think the overall numerical rankings are at all useful, but within subgenres the relative ranking does seem pretty sound, meaning that while you might want to filter your non-preferred game types out, if you’re looking for a good game in subgenre X, Metacritic is quite a good way to find one – provided you can reliably identify those subgenres (again, reading the full review text should help here).

However, Metacritic scores can take a little time to settle down, and inevitably purchases are made based on the earliest 2-3 web reviews (or even previews sometimes). In these cases, you need to evaluate the reviewer as much as the game, IMO. While most sites do credit the author of the review, few of them make it easy to find what other games this reviewer did or did not like, which is vital information. Some people categorise individual sites as reliable for them or not, but I don’t buy that – you can’t say that you trust 1UP or Eurogamer universally, it’s all about the individual reviewers. I tend to read Eurogamer for the humour, but whether I agree with their reviewers varies wildly. I often agree with Kieron Gillen (a veteran of several PC games mags I used to read too) but have strongly disagreed with their Keza MacDonald, who for example said that Guitar Hero III was ‘in every conceivable way, a better product than its predecessors’, which is pure, unadulterated tosh. It’s partly his fault I bought GHIII, only to abandon it in disgust within 2 weeks, so I discount any opinion he has on music games now.

So ideally, in online game reviews I’d like to see a box-out summary of a few other games in the same genre that this reviewer has judged, in order to figure out how much weight I should give to their opinions. Any chance of that Eurogamer/1UP/IGN et al? I think games reviewers should put their own face / personality out there more so we can identify with those we do / do not tend to agree with – this is the kind of thing some 8-bit mags used to do in the 80′s, with several people pitching in and each identifying themselves with a little picture or something. Why is everything so impersonal on the web?

Personal Web

Mouseless Firefox

I’ve been trying to use the mouse on my main desktop machine less, because it’s awkward to use when I’m typing away in my ‘recliner’ position which has been helping my back. On my MacBook, the trackpad is a joy, and while it’s possible to get keyboards with in-built trackpads, I like my current keyboard and don’t want to get rid of it, or to get a separate trackpad / trackball which will be awkward.

I don’t need the mouse most of the time anyway, VisualAssist makes it particularly easy to get around Visual Studio without the mouse (ALT-M to jump to a method, ALT-O to flip between header / source file, SHIFT-ALT-O to jump to a file, etc) and XCode is already pretty good in that regard, but navigating around Firefox with only a keyboard was a problem. Sure there’s CTRL-L and CTRL-K for the location and search boxes, CTRL-B for bookmarks, CTRL-TAB to flip between tabs etc, but once you’re on a page, following links was awkward – your only option was to tab through the links laboriously, trying to keep an eye on where the focus was going. Not fun.

Luckily, the Mouseless Browsing plugin solves all that. It places numerical ID boxes next to every link, and all you have to do is type the number to follow the link. It looks like this:

So by default you can type ’6 Enter’ to get to the ‘About Me’ page for example. If I want to open that in a new tab, I type ’6 Plus Enter’ (the numpad is the most convenient). There’s a bunch of configuration options, such as allowing you to turn off the IDs and just have them toggle on when you press a button, which is what I generally prefer (so site styles are not interfered with), or to remove the need to press Enter at the end of the sequence based on some timings. All in all, very useful.

Business Political Tech Travel Web

Streaming media from Amazon S3

Thanks John for the reminder to investigate S3 as a business media hosting service, it works like a charm!

Now that I have far fewer bandwidth worries (max $0.17 per GB), the Torus Knot site includes a nifty dynamic selector so you can pick low, medium or high quality – the latter is at a higher resolution too, clocking in at about 100Mb. I may well use S3 for future public commercial downloads in the future too. It’s altogether more convenient than the block bandwidth allocations you get with regular hosting packages, since it scales dynamically at a very fine level of detail depending on demand. And don’t be fooled by ‘unlimited’ bandwidth offers, all hosting companies have to pay for bandwidth and there’s no such thing as ‘unlimited’ resources; you’ll actually find your bandwidth being throttled or cut off via a ‘reasonable use’ clause in the small-print; ‘unlimited’ is simply a marketing lure. If you want truly scalable guaranteed bandwidth, you have to pay for it.

Getting S3 media hosting working wasn’t that hard, but did require a few discrete steps. Firstly, you need to create a bucket in your S3 account which is all in lower case, is globally unique and is DNS-compatible; so for example I created a bucket called ‘media.torusknot.com’.

Then to make it all look nice you need to create a DNS CNAME entry to map a sub-domain of your site to that S3 bucket; in my case I mapped ‘media.torusknot.com’ to ‘media.torusknot.com.s3.amazonaws.com’. That allows me to access any files I upload to that S3 bucket via ‘http://media.torusknot.com/somefile.jpg’. You do just need to set the ACLs on the files & the bucket to make sure public access is allowed.

Finally, if you want to stream video files via a Flash player from S3 to another domain, you also have to tell Flash that it’s ok for the content to be pulled in from a different domain. Create a file called ‘crossdomain.xml’ in the bucket, with these contents:

<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
</cross>

That allows the media to be accessed from anywhere – you can be more specific if you want but this is the simplest approach.

Once again I’m using the excellent FlowPlayer; my only issue with it is that the ‘buffering’ animation seems to not work all the time (so be patient if you’re viewing the high quality version).

Gotta love this cloud computing business :)

Tech Web

Tim O’Reilly agrees with me about Facebook?

I came across Tim O’Reilly’s post entitled Open Source and Cloud Computing today, and I was pretty happy to see that his thoughts reinforced what I was saying a couple of months ago about how I thought isolated, corporate-owned islands in the ‘cloud’ were not a beneficial model for the Internet long-term, despite the short-term convenience in today’s society.

I was also very interested to see from his links in that article that some in the open source community are already forming plans to address it. It’s early days yet, but I look forward to a day when we can have all the convenience of sites like Facebook provide without having to cede control of our data to a centralised corporate entity searching desperately for a way to dissect that data & our browsing behaviour for revenue opportunities.

It’s funny because when talking about this issue to a friend recently, I made the comparison between sites like Facebook now, and the ‘gated communities’ of AOL / Compuserve in the past, before the Internet took off. They too used their sealed community to generate revenue, but when people finally had the option to become free of that and get the same functionality, users deserted in their droves to the liberated environment of the Internet. Tim used the same analogy in his article, so maybe I’m not crazy after all.

OGRE Uncategorized Web

LinkedIn OGRE Group

I consider LinkedIn to be one of the few genuinely useful things to come out of the whole Web 2.0 gold rush, since it’s a business-oriented, generally ‘fluffless’ site (if I see one more virtual gift or stupid time-wasting Facebook application, I’ll lose all will to live) – as such I actually do use it fairly regularly. I finally got around to creating an OGRE Group – feel free to join if you’re a professional OGRE user / contributor. I use LinkedIn to remind me who I can refer OGRE-related jobs to, so it might be worth your while :)

Internet Tech Web

Switching to Firefox 3

Now it’s out of beta, Firefox 3 has become my primary browser – it’s a nice speed upgrade and I like the little extras like the unobtrusive ‘remember password’ prompt, smart location bar and reduced memory usage. It’s a shame their servers went belly-up on the planned release day, but then they did paint a bullseye on their face.

There were a few hiccups- I have a few add-ons I generally feel I couldn’t live without and a couple of them didn’t want to work immediately.

  • Firebug won’t upgrade itself, you have to switch to the beta 1.1 version if you want it to work with FF3. Seems to work fine.
  • Google Browser Sync doesn’t work and Google have apparently dropped future development support for it – because they never released it as open source (why?) it’s essentially a dead product. Foxmarks is a nice quick alternative, although it does only synchronise bookmarks and not open tabs, cookies or passwords. It does have the advantage that you can sync it to your own server if you want though. Long term Mozilla Weave looks like it could be the best option, but it seems a little young right now.

Also oddly, I had no back / forward button block to begin with. I don’t know if that was linked to the fact that I’d been running the beta beforehand, but I had to customise the toolbar to add it back in.

Still, overall it definitely feels faster and slicker, so it’s a useful update to a major staple of my application toolset. I haven’t tried the native look and feel on OS X yet, I’ll be updating next time I’m on the Mac to see what it’s like.

Opera is still the fastest browser of course, but IMO they really missed the boat by holding on to the concept of being able to sell a browser for a little too long, and I’m not sure they’ll ever catch up in terms of the sheer breadth of available add-ons. I have Opera installed on my machine too (for testing) and although it’s good I always gravitate back to FF just because of all the useful add-ons & the more active community – the same applied to Safari on the Mac.

Whatever your preference, with all these options there’s really no excuse to still be using that buggy piece of trash called IE!