Shaun Mccran

My digital playground

24
O
C
T
2012

XML Whitespace is evil and should be punished

I've spent a bit of time recently working on a flash based reporting website. The project is all pretty standard architecture for a flash website, but there has been a persistent issue about loading times and poor user experience.

After having a bit of digging around behind the scenes it appeared as though the flash SWF file was streaming a configuration XML file in the background. This isn't a great idea at the best of times but in this case the file was 147k lines long and weighed in at 22.5mb. So this accounted for a stack of loading time when the flash app loads up.

After downloading the XML file and browsing through it in Eclipse my first impression is that there was a ton of whitespace in it. After running a quick 'find and replace' on any double space characters (to avoid removing spaces in legitimate text strings) and re-saving the file was down to 3.2mb.

So let this be a warning to anyone loading up machine-to-machine text files. Squeeze them down, don't include whitespace, your Apps don't care about it, the file doesn't need to be human readable, all you are doing is using up network bandwidth.

I won't even get into the risks involved in allowing your config files to be downloaded by people here, that's a whole different issue!

26
S
E
P
2012

Samsung TouchWiz bug found and squash – in a day

Yesterday (Sept 25th) news site across the web were buzzing with the news that an entrapeneuring type had managed to find an exploit in the Samsung Touchwiz software. It basically allowed foreign code to be run on the phone, without the users authorisation or prompting, that formatted the handset.

You can read more here:

http://techcrunch.com/2012/09/25/got-touchwiz-some-samsung-smartphones-can-be-totally-wiped-by-clicking-a-link/

By today (Sept 26th) the same news sites are reporting that Samsung have fixed the loophole and are urging users to download the fix for it. So if you are running a Samsung handset then go check for system updates.

http://techcrunch.com/2012/09/26/samsung-speedily-plugs-remote-wipe-flaw-urges-galaxy-siii-owners-to-update/

That sort of timescale for bug fixes is admirable, whoever you are.

11
S
E
P
2012

NHS Launches Blood donor mobile app

I've donate blood for a few years now. I view it as a relatively easy thing to do, that causes no harm to me, and can help save someone life. I won't miss the blood they take, my body will just create more of it naturally, and there is a reward card system where they change the color of your card based on the number of donations (I'm a sucker for any kind of reward based system).

What's the biggest problem with donating blood? Finding and booking a session.

[ More ]

02
S
E
P
2012

Blogging and Zombies: 'Feed' by Mira Grant

A few months back I had 'Feed' by Mira Grant recommended to me by Tim Blair (https://twitter.com/timblair) mainly because it is based on Zombies and Blogging and I'm a fan of both.

This is what I thought of it.

[ More ]

_UNKNOWNTRANSLATION_ /