Archive for February, 2013

Super Bowl Champions

Monday, February 4th, 2013 | Distractions

blog_49ers

We did it! Long may my team, the San Francisco 49ers, reign supreme!

Note to self: don’t forget to turn the other one of these off.

No acceptable C compiler found on Mac

Monday, February 4th, 2013 | Programming, Tech

If you’re trying to compile from source, you may get an error similar to the following.

mac configure: error: no acceptable C compiler found in $PATH

This may be because you haven’t installed Xcode. If you have, something has broken, and you need to reinstall it. First, remove it with the following command.

mac configure: error: no acceptable C compiler found in $PATH

Now restart your system and once it has started again, go to Applications and select Install Xcode. This will reinstall it.

Billy Talent – Dead Silence

Sunday, February 3rd, 2013 | Reviews

Ah to be 17 again. Billy Talent were rocking the scene, I was there before they were big, etc, etc.

Now, I’m somewhat older than that, and I would imagine Billy Talent are too because time works like that (on this scale at least). I didn’t expect great things from their fourth studio album, and first not to be self-titled, given their previous albums had been good, but not amazing. But it turns out I was to be pleasantly surprised.

While the screaming of Benjamin Kowalewicz has certainly become greatly toned down as the band have matured, it turns out that they actually have some great music underneath it. My personal favourite so far is Show Me The Way.

Web workers

Saturday, February 2nd, 2013 | Limited, Programming

These days, we’re all trying to do very clever things in the browser, that take up heaps of system resources. Often, your application will be doing so much that the system can barely cope – and with JavaScript being a single thread language, heavy processing can tie the UI up and make the user think the page has crashed.

Enter web workers – a background process that essentially allows you to do concurrent JavaScript. You can create a background process from a script, and then send messages back and forth between it and the page, ensuring you don’t tie up the UI.

They’re really simple to use too.

var worker = new Worker('worker.js');

worker.addEventListener('message', function(e) {
  console.log('Message from worker: ', e.data);
}, false);

worker.postMessage('Hello, World!');

Then create a simple JavaScript for your worker.

this.addEventListener('message', function(message) {
  this.postMessage(message.data);
}, false);

You can read more about web workers on HTML5 Rocks.

Snowman

Friday, February 1st, 2013 | Photos

snowman

Not selling loose carrots when it snows is actually genius marketing by Sainsbury’s.