Goings on at Softwire, technical and otherwise

Softwire develops CMS for BBC’s Festival Coverage

This week sees the launch of the first of many BBC microsites to be created using the Content Management System (CMS) we developed for music festival coverage – Radio 1′s Hackney Weekend.

The BBC develops dedicated microsites for the major music festivals it covers. These sites provide lots of useful information: practical advice on how to get there; live coverage; profiles of the acts performing; and tips on who to watch. They also contain a large amount of audio and video content and, in many cases, offer live multiscreen viewing.

To date, these microsites have been built on a constantly improving template. The BBC wanted to commission a CMS that would radically reduce the amount of effort and time needed to get a new event site up and running. Softwire were very proud – and excited – to be selected to develop this CMS, in collaboration with our design partner Picture.

These live event sites are extremely popular, with usage spikes in the region of 100 requests per second. You can read about how we met this and other challenges involved in this project in our case study. In the meantime, enjoy the festivals and we hope you find the websites useful!

Hackney Weekend Home Page


Softwire Speed Coding Challenge – Question 3 Discussion

previous article in series

In our last coding challenge post, we posted question 3 from our coding challenge. Did you try it yourself? Here’s the question again, as a reminder:

READ MORE…


Easy internet fonts

You may recall a recent blog post about fonts in HTML5. As we discussed there, three of the biggest issues with using embedded fonts are:

  • You need the same font in at least two formats to cover all the major browsers.
  • You need tricky CSS to cover all the major browsers.
  • You need to ensure that the fonts you use are properly licenced.

Probably the simplest way to reliably use a font is to pick one of Google’s web fonts. These fonts are open source and are served by Google’s servers all over the world, which means that they should be fast to download for your visitors. The number of fonts available has been increasing steadily and is currently around 450, which means that there ought to be a suitable font for most occasions.

READ MORE…


Softwire Speed Coding Challenge – Question 3

previous article in series

Welcome to the next in our series on Softwire’s coding challenge! Last time, we discussed the winning answer to the second question. This time round we’ve got a cryptography question for you (although you won’t need to know anything special) - I’ll post the winning answer and some further discussion in a week or so.

Truly Unbreakable Security

Inside the linked zip file (Secret.zip) is a file (secret.dat) I have encrypted using the “truly unbreakable” security offered here.

  • Short summary of the encryption: XOR each byte of the plaintext file with the next byte produced by a new instance of System.Random in C#
  • I have linked the source code of the encrypting app as Vernam.zip (NOTE: you do not need to read this)

I would like you to decrypt secret.dat (feel free to unzip it manually first).

To aid you in this, here are the 7 most common “magic numbers” from Wikipedia. These are byte sequences which appear at the start of a file to mark the file format:

CAFEBABE    class
47494638    gif
FFD8FFE0    jpeg
89504E47    png
4D546864    midi
25504446    pdf
504B0304    zip

As if that weren’t enough, you also get these two enormous hints:

  • There are two constructors for System.Random – the default no-args constructor uses Environment.TickCount as a seed
  • I rebooted my system less than an hour before encrypting this file

Best of luck with this one, we’ll post the winning solution and the answer in a couple of weeks!

next article in series


Softwire’s work with the BBC on The Listening Project

The Listening ProjectSoftwire recently worked with the BBC on an audio recording archive to run alongside The Listening Project.

The Listening Project is an ambitious, large-scale BBC initiative, in partnership with the British Library. It’s based on an American initiative called StoryCorps, and its mission is to preserve, in an audio format, the stories and experiences of as many UK citizens as possible. As well as making these stories easily available online, they will be broadcasting a selection on Radio 4 and a number of regional radio stations.

READ MORE…


Development methodology: Agile and Scrum

A development methodology is a set of processes which can be employed to ensure quality, timeliness of delivery and confidence in the success of the project.

Every software project requires a development methodology of some kind, and picking the right one, and using it correctly, is vital to the success of that project.

READ MORE…


Softwire Speed Coding Challenge – Question 2 Discussion

previous article in series

So, in our last speed coding post, we set you the second question in our challenge. Here it is again, just to remind you!

READ MORE…


Getting my feet wet with Scala

The hype around the Scala programming language just got too much recently and I decided to give it a go. I’m two thirds of the way through Programming in Scala, a massive but very good tome and I’ve been experimenting with the language and tools, though only a little bit so far. I have also just received the newly published Scala for the Impatient (a deliberately much more compact book) and will be working through that as well.

Scala is an attractive proposition to the adventurous Java programmer (it being a JVM-based language) bringing a wealth of advanced features that promise to cut down on boilerplate and deliver more elegant solutions with less code. Scala is not for the faint hearted though, or anyone who just wants to get some stuff done ASAP. There is a big, steep learning curve and the relative immaturity of the language and the small community means you’d better be used to the pains of the bleeding edge. I thought Ruby was hard work, but Scala is frankly more so in my experience so far.

However the language is somewhat addictive – or perhaps I just like the challenge of learning stuff that takes a bit of grokking. It’s a big language, with many very clever facilities and features. It’s mind-boggling to start with but I think it’s sinking in now. Of course there’s the functional paradigm to understand and master, but I did plenty of that at university so it doesn’t frighten me.

Enough people have written about the frustrations and wonders of writing code with Scala (here, for example), so instead I shall reflect on a few miscellaneous findings, mostly of a practical bent.

READ MORE…


Softwire Speed Coding Challenge – Question 2

previous article in series

Welcome to the next in our series on Softwire’s coding challenge! Last time, we discussed the winning answer to the first question. Here’s question 2 for you to try, which may require a bit of mathematical knowledge – I’ll post the winning answer and some further discussion in a week or so.

READ MORE…


JavaScriptSerializer circular reference error when serializing a proxy object

One day, my code suddenly started throwing circular reference errors while trying to serialize objects into JSON. There was no circular reference, and I couldn’t figure out why the couple of extra lines that I last added would affect serialization. What’s more, it only threw an error when I was logged in as certain users, and not as others.

The problem was that the object it was trying to serialize sometimes appeared as a proxy instead of the actual object. This happens if NHibernate doesn’t have enough information to resolve all the dependent objects after the first load – in our case it was dependent on the length of the chain in a parent-child tree. We first attempted to tweak our lazy loading config via .LazyLoad(Laziness.NoProxy) in our Fluent NHibernate mapping, but that laziness mode is only supported on some relationship types and not on the ManyToMany that was the cause of our problem, so this didn’t help us.

There seem to be a lot of people out there asking the same question, and some very complicated solutions being offered (such as this one using Json.Net).

However, in some cases there is a fairly easy workaround you can employ: unproxy the object before you serialize (see here).

Put this in the EntityBase:


public virtual T As<T>() where T : EntityBase
{
  return this as T;
}

And then when you want to serialize it, do something like

var lSerialiser = new JavaScriptSerializer();
unproxiedObject = originalObject.As<User>();
return lSerialiser.Serialize(unproxiedObject);

Note that this will not fix the issue in all cases. But if it works for you, then we’re glad to have been of service!