Monday, January 23, 2012

How many WTFs per language?

Recently I've had to work with PHP an increasing amount. I've not been enjoying it. A few recent IRC conversations also got me thinking - is there an entirely arbitrary but kind of fun (and hey aren't they all arbitrary, really?) metric of programming language FAIL / coder FAILs per-language ?

So on a whim, I decided to invent one: number of entries on The Daily WTF which mention a given language.

Here we go - "web" languages only, numbers correct at time of writing:


Or in chart form:


So what does this prove? Well, nothing - to draw any conclusions at all, we'd have to normalise this for all kinds of factors such as

  • number of coders / lines of code using each language (anyone have a decent set of figures?)
  • average experience level of coder (I'm pretty sure that more beginners use PHP than Perl, for instance)
  • you name it

...but it is kind of fun. Let the flamewar commence continue!

Tuesday, January 10, 2012

FeedWordpress duplicate posts with YD Domain Mapping


Using FeedWordPress to pull in aggregated feeds to a Wordpress blog? Also using the Wordpress MU Domain Mapping plugin to map an arbitrary domain to your blog? Seeing posts get duplicated? Then read on ....

I've isolated the duplicate posts issue to some kind of interaction with the Wordpress MU Domain Mapping plugin. We're using this so that we can map arbitrary domains to our network sites.

E.g.

  • our Wordpress Network is set up as wp-network.foo.com, on a subdomain setup
  • a network site 'bar' would then be bar.wp-network.foo.com
  • we setup the feedwordpress plugin to pull in posts from a tag:uri feed
  • we get unique posts in, with GUIDs of the form bar.wp-network.foo.com?guid=(some guid)


All well and good. BUT,  then we use the domain mapping plugin to map blog.bar.com to that network site...

It seems that when we hit a network site on its mapped domain (blog.bar.com), it instantly duplicates the syndicated posts with guids of the form blog.bar.com?guid=(the same guid)

I set up 2 identical blogs, subscribed them both to the same feed, and applied a domain mapping to one but not the other. All was fine until I hit the blog homepage on the new mapped domain-  at which point all the posts got replicated with mapped domain GUIDs as above.

So I don't know if this is an issue with FeedWordPress or with the Wordpress MU Domain Mapping plugin, but they definitely don't seem to play nicely with each other.

Hope this helps someone!