Posts Tagged ‘code’

Who’s actually using RDFa?

Jess Norwood - February 21st, 2011

A year ago we were very excited about RDFa, and in particular about using it to mark up consultations in our Citizen Space software. By providing certain bits of metadata in a machine-readable format (for example the consultation’s title, start and end dates, target audience, author etc) the consultation record can be used by third-party systems, and potentially incorporated into applications that hadn’t even been envisaged when the data was originally published.

RDFa actually became a mandatory requirement for all central government consultations published after 1st January 2010, but in the past year we have seen very little use of this new wealth of freely available data. There were rumours that Directgov planned to use it to import consultations, but I can’t find any evidence of this on their site.

We were sad that we’d gone to all the trouble* to incorporate RDFa into our clients’ consultations, and nobody was making use of it, so we decided to do something with it ourselves. We’ve made an Aggregator that can collect together consultations from any website as long as it publishes its consultations in an RSS feed and includes the appropriate RDFa markup. It also publishes its own RSS feed so that the aggregated consultations can be fed into a further tier of applications.

We’d be really interested to hear of other apps that are making use of RSS and RDFa in relation to consultation data. Surely we’re not the only ones?

*actually it wasn’t much trouble at all thanks to the helpful guidelines from the COI.

Google tracking failing XHTML validation

Robin Greene - October 28th, 2009

Came across an interesting problem today, whilst creating a template for a new website, I noticed that the Google analytics tracking code was failing XHTML validation.

<script type=”text/javascript” language=”javascript”>
if(typeof(urchinTracker)!=’function’)document.write(‘<sc’+'ript src=”‘+’http’+(document.location.protocol==’https:’?'s://ssl’:'://www’)+’.google-analytics.com/urchin.js’+'”><’+'/sc’+'ript>’)
</script>

I later discovered that wrapping the script in CDATA tags allowed the script to parse and validate – happy days!

<script type=”text/javascript” language=”javascript”>
//<![CDATA[if(typeof(urchinTracker)!='function')document.write('<sc'+'ript src="'+'http'+(document.location.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com/urchin.js'+'"><'+'/sc'+'ript>')//]]>
</script>

Mini-LD #6

Tim Wintle - January 10th, 2009

(3:33 am)

I didn’t have anything planned for this weekend, so I thought I’d take part in the Mini Ludum Dare – the monthly version of the infamous Ludum Dare 48 hour game-programming challenge.

You can keep up to date on my progress over the weekend in my Ludum Dare Blog, and you can see all the entrants in the competition blog.

At the last minute I got an arrangement for Saturday, so with only 24 hours of code time (I need to sleep tonight if I’ve got things to do tomorrow…), I decided not to attempt anything too complicated. It’s roughly nine hours in, and after a few hours thought I chose the secondary theme “Infection” to go with the primary theme of “monochrome”.

Working in Python with PyGame, here’s what my attempt looks like so far (remembering I’m not a graphics type of person):

screenshot 2 Mini LD #6

At the moment it’s fairly much like Asteroids – the player is the cell in the middle of the screen, and the nucleus points the direction you fire. The aim is to shoot all the infections with capsules of medicine.

I’ve still got a long way to go – loads of ideas for features to code, graphics to do/improve, and sound effects to make, but it’s on it’s way there.

If you want to comment, I’ll be blogging frequently on the ludum dare site whenever I’m online this weekend.

Fractals and lots of Machines

Tim Wintle - May 23rd, 2008

After setting up a test hadoop map-reduce cluster for our viral seeding service here at rubber towers earlier this year, I needed to come up with a simple task to run to get my head around the map-reduce programming model.

Stumbling upon this great blog post, I decided to run a task to render a Buddhabrot in glorious detail (6000X4000 pixels).

These images are released under a creative commons non-commercial share-alike licence (click the image for a low-resolution desktop background)

image out forblog Fractals and lots of Machines

88x31 Fractals and lots of Machines
BuddhaBrot by Team Rubber / Tim Wintle is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales License.

Here is a close-up of the “head” of the brot (the part on the left) in it’s original resolution:

image out closeup forblog Fractals and lots of Machines

You can download the image scaled down to a desktop background, the high resolution image (not on the site to preserve bandwidth) is roughly 40Mb as a png.

For those interested, the intermediate data (passed between the map and reduce phases) was roughly 250 Gb of raw data. The mapper and reducer were both written in Python, with a single final reduce done off-cluster using PIL (the Python Imaging Library).

UPDATE

You can now download a torrent of the entire, full resolution image.