Archive by Author

Corona SDK: Solving JSON decode error with UTF-8 files.

While working with JSON-encoded data files, I had some problems getting the darn things to work.  Apart from an unhelpful error message, the Corona simulator gave me no clues as to what was wrong. Turned out that the problem was actually to do with the UTF-8 encoding. And in the end, what fixed it was changing the UTF-8 encoding to “UTF-8 without BOM” – the default UTF-8 encoding just didn’t cut it.

Improving your website with Nibbler

If you haven’t encountered Nibbler before, Nibbler is a free-to-use website quality checker.  It’s developed and maintained by Silktide, and is a tool for checking up to 5 pages of a website against 20 different quality checks – from Social Media to W3C compliance, Alternative text to Semantic HTML.

Read More…

Link: Moment.js

Moment.js is a lightweight javascript library for working with dates -
manipulating them, parsing them and outputting them into a human-readable
format. And it even does languages, too!

Hacking Facebook “Like” buttons for W3C Validation in HTML5

So, it turns out that the good old Facebook ‘Like’ buttons and Google’s ‘Plus one’ buttons don’t behave well on HTML5 format websites. That’s because they make use of XHTML and namespaces. Sure, mixing XHTML and HTML5 together on a single page works just fine for the end-user, but when it comes to validating your pages on the W3C, it just won’t work.

What’s the ‘solution’? Why, hacking it, of course. Take the code for those elements out of the source, and embed it with JavaScript instead.  And it doesn’t have to be complex either – you can use inline JavaScript code.

Wrap your button embed HTML in a <script> tag, add a CDATA block, and encompass it in a document.write() function, and you’re done.

So this code:

Becomes this code:

Of course, this being a hack, I can’t really speak for this being good practice, but it works. Evaluating the pitfalls will come later, I’m sure!

FOTB2011 Highlight #1: HiSlope

Here’s one of my highlights from Flash on the Beach 2011 – something that I’d never seen before, but blew me away with its coolness.

HiSlope is a realtime video effects framework/library, which allows you to see and experiment with those effects in realtime.  The underlying coding framework sounds interesting, and the final effect is pretty neat.  I have a feeling I’m going to be messing around with it and picking apart the source code some time soon!

In the meantime, you can: