Search This Blog

Thursday, 29 November 2012

jQuery Ajax Call Failing

This is a problem I've been having at work for the last week or so.

I am using Apache 2.2 on Windows 7. In my JavaScript I need to read the contents of a text file, so I make this call:

   var fileContent = '';

      url: 'myfile.txt',
      dataType: 'text',
      success: function (data) {
         fileContent = data;

which worked fine for months. Then suddenly it began failing, though notably only with large files (> 200K).

The symptoms were one of these:

  1. the Ajax call would fail
  2. the Ajax call would hang
  3. the text that came back was either missing bits or subtly mixed up

In the first case, the browser console would show the message NETWORK_ERR: XMLHttpRequest Exception 101. In case 3 the Apache logs showed a message about No space left on device and Error reading chunk.

The solution was to uninstall a Windows 7 update, namely KB2750841.

I actually experienced this problem back in September, when the update to uninstall was KB2735855. Incredibly I managed to completely forget about that fix, and so had to painfully get to the solution again from scratch. It is my fervent hope that the next time I search for NETWORK_ERR: XMLHttpRequest Exception 101, Google will decide that one of my own blog articles should come top of the search results.

Sunday, 18 November 2012

Why You Want to Avoid Sainsbury's Gift Cards

We changed to BT Infinity Broadband last month. Compared to the last time we changed provider it went quite smoothly. I haven't yet seen the sort of top speeds they advertise, and occasionally the download rate drops to under 1 Meg, but by and large it's a big improvement.

Part of the deal for this package was £50 of Sainsbury's vouchers. After they hadn't turned up or even been mentioned by BT for a few days after installation, I decided to contact BT. Not an easy option: I eventually had to register a fault. They agreed that we were entitled to them, although I got the distinct impression that if I'd kept quiet that would have been the end of it. They promised to dispatch the vouchers within 21 to 60 days! Why not in the next post?

Several weeks later two £25 Sainsbury's gift cards arrive. Unlike other gift cards I've received, these needed to be registered online. Groan. So off I head to their site.

Now I find out that to register a card I first need an account, and to have an account I also need to have a nectar card ("click here to register one"). I will try to condense the next twenty minutes of frustration and aggravation; suffice to to say that Sainsbury's now have my date of birth, memorable date and memorable place. (For anyone else trying this procedure, when they mention the 'Proceed' button, they mean the 'Submit' button.)

Finally I can get in to register the two cards. Why did I need an account? Well, now I can go online whenever I want to check the balance in these cards. We've just got back from Sainsbury's having spent the £50 in rather less time than it took me to register. The balance on the cards is now zero, and as I left the cards at the checkout, that's what it will remain until the end of time. Not coincidentally, the end of time is roughly when I will next try using Sainsbury's online facilities.

Friday, 16 November 2012

Anxiety Dreams and Sitting Exams

Dreaming you're back in school and suddenly realising that exams are coming up but you haven't done any revision and can't even remember the last time you went to a lesson seem to be very widespread among my friends and acquaintances. Clearly this dream draws upon some common anxiety.

A question then: what form did this dream take before sitting exams was a normal part of a person's upbringing?

Wednesday, 7 November 2012

Safari on Android

At last O'Reilly have released a Safari Library app for Android. Trying to get into and around their web site in a mobile browser was often a frustrating experience; this app is a huge improvement, albeit a bit buggy.

I discovered its existence by accident while frustratedly browsing the Safari site in Dolphin. I normally have JavaScript turned off for safety, but because of the way O'Reilly serve up books in Safari, that meant I couldn't see any text. So I enabled it, started reading, then noticed the app mentioned, and promptly went off and installed it.

Later that day I went back into Dolphin for a general browse and I was shocked by how slow web sites had become. Then I remembered JavaScript was still enabled. That made all the difference. Whether the JavaScript was there to "improve" the user experience, or just to serve up annoying ads, the effect on browser speed was significant.

Saturday, 3 November 2012

Borrowing Books on a Kindle

I've just borrowed my first book on my Kindle.

This facility is only offered you if you're an Amazon Prime subscriber, which I've been since I read an overly optimistic article predicting that Amazon would soon give Kindles away to their Prime subscribers. In the US prime membership gives you several advantages; in the UK, until recently, it only gave you free next day delivery. As you can sign up your whole household for this, it's proved enough of a selling point to justify the £49 annual fee. It has also made me more impatient: I used to happily go for the free 'several day' delivery, but now I'm stupidly annoyed if any Amazon item isn't available for Prime next day delivery.

Very recently Amazon changed the rules so that Prime members could 'borrow' one book a month on their Kindle. A choice of 200,000 titles!

Sadly, when I investigated it seemed they were mostly by authors I'd never heard of. That makes sense: if you're fairly unknown you can try raising your profile by effectively giving a few titles away. However, I've got a back reading list several bookshelves long already, without adding some more authors to it.

Then today I went looking for a Kindle Single that I'd heard recommended. Imagine my delight when I noticed I could borrow it. (Thus saving me the princely sum of £1.96!)

And the tactic worked. An Unexpected Twist by Andy Borowitz is a little delight, hilarious and moving. It only took 15 minutes to read, and I've already paid for another one of his books, Who Moved My Soap?: The CEO's Guide to Surviving in Prison.

Now a month to kill while I find another book I want to borrow. 199,999 choices left.

Monday, 3 September 2012

Thank You, Heinz!

From the top of a carton of microwaveable spaghetti hoops:

Microwave 850W

Peel back film.

30 sec (full power). Stir

30 sec (full power). Stir


At last I understand the purpose of the microwave! All those years of confusion and unexplained burns over at last. Thank you, lawyers at Heinz and the whole Culture of Liability that made this advice necessary.

A Question of Soap

Bored with the usual hand soap we get, last week instead I purchased a carton of what I shall refer to for legal reasons as "X & Y" hand wash. The design is a clever piece of marketing in itself: the font used for "X & Y" harks back to the early years of the 20th century, underneath the manufacturers name it just says "England", and the top of the bottle is made to look metallic (though still plastic). All in all it seems to hearken back to a more elegant age, and looks like the sort of hand soap you find in a posh hotel.

Apart from this cunningly wrought aura of opulence, what caught my eye was its claim that it contains vitamins A, B and C. So what? Can the body really absorb vitamins through the skin? Lots of soaps and gels inform you of the vitamins and minerals that they contain, but I don't think any ever make health claims based on this, which you'd think they would if they were able. Rather than potentially ruin this blog post, I won't do any immediate research to find out. However, a thought experiment says that if I can lie in a bath full of bath salts for half an hour, without any risk of becoming salty, then chances are that my skin is also opaque to vitamins. Also, I've never had to worry about what I might absorb from sun block, and yet I'm pretty sure that's not supposed to be taken internally.

I may be doing Messrs X & Y a grave injustice here, but I'm starting to think that the real reason they mention these vitamins is to create a mental association between health-giving substances and their product.

They are not the only ones to use this technique. One popular brand makes a virtue of being pH neutral. But other soaps will point out that they contain zesty citrus fruits, while still others talk about their milkiness. So there we have three possibilities: acidic, alkaline, and neutral. Are they all good for the skin? Or is there maybe a range of values between highly acidic and highly alkaline in which the skin doesn't really care? Each one though conjures up a mental image of healthiness through its choice of ingredients.

So is adding these ingredients to soap completely pointless? (I'm now wondering how nicotine patches work.) I shall keep a lookout for soaps that have their nutritional value printed on the packaging. Or perhaps fruit-scented shower gel that counts as one of my "five a day".

[Should X & Y's lawyers be able to identify their clients from this post, I hasten to add that the soap feels and smells wonderful—well worth that little bit extra.]

Learning to Read Resistors

I decided recently to make an effort to learn a bit of electronics, using a kindly donated Arduino Uno and a few electronics components that we had around the house. The choice of resistors this gave me was seriously limited, so I popped over to Maplins and bought a pack of twenty different resistor types. To my dismay, when I got them home, I realised that the only indications of their strength were the colour bar codes painted on their sides.

No doubt if I continue with my current interest I will grow to be able to read these codes as if they were English text. At the moment though it's rather harder to decipher them. A quick bit of googling found sites like this one that provide handy converters; however, to use these tools you have to be able to read the colours off the resistors in the first place, and there are a couple of issues here that I would like to raise.

Firstly, it is by no means obvious in which direction to read the bars. Supposedly there should be a bigger gap between the last bar and its immediate neighbour than between the first bar and the second. In my experience so far this difference is usually not noticeable, and possibly non-existent. Secondly, the choice of colours, while naturally restricted to what the limits of human eyesight have provided, does allow for an incy-wincy bit of ambiguity. Telling the difference between white, grey and silver, when only one of them is present on the resistor, is no laughing matter. Gold and orange are another two colours that some might think are rather similar.

These codes have been around for a long time, so I'm probably going to look back on this post with amusement at some point (oh, please, please be sooner rather than later), but for now I find the best way of decoding them is to measure the resistance roughly using my multimeter (had one for years, absolutely no recollection of why I needed it), and then matching that value with the colours (bright light and a magnifying glass very useful at this point).

It took a while, but this is my list of resistor strengths from Maplin's "Lucky Bag" of resistors:

5.62Ω, 24Ω, 43Ω, 78.9Ω, 113Ω, 287Ω, 309Ω, 422Ω, 1.18KΩ, 1.62KΩ, 3.6KΩ, 5.6KΩ, 10KΩ, 15.4KΩ, 33KΩ, 97.6KΩ, 115KΩ, 261KΩ, 619KΩ, and 2.4MΩ.

There aren't many values there that I would have expected. Whether there's a reason for such obscure numbers, or whether that's why it's called a 'lucky' bag is currently an open issue as far as I'm concerned, and clearly further research is called for.

Working out the last few values was considerably simpler than the first ones I did, as I started to remember which colour matches which digit. There are acronyms to help, and googling "resistor colour code acronyms" throws up several. I was appalled to see how many (including the top result) involve sexual violence towards women, with a couple of people mentioning that that was the acronym they were taught at school!

A few decades ago, in a male-dominated field, this might have been acceptable (though still very wrong), but surely in the 21st century people would think twice before posting this crap onto the web as a learning aid?

For the record, the one I picked to learn is

Bad Beer Rots Our Young Guts But Vodka Goes Well

which also incorporates some health advice. Not sure about the vodka message though.

Friday, 31 August 2012

Ticked off by TalkTalk

I came in just now to have a go at my ISP and noticed that I've reached exactly 7000 page views, only 10 months since I reached 4000. It took me over two years to get to there, and half of those hits came in a single fortnight after the assassin incident. I temper my satisfaction with the reflection that there are bloggers who get more page views than that for a single post.

Anyway, getting back to TalkTalk, who have rung me up three times in the last 24 hours, allegedly to check that I'm not paying too much, although I'm pretty sure that this will somehow involve me paying them more.

Cold calls from TalkTalk trying to get me to give them my phone line rental have been coming ever since I signed up for their broadband, but three calls in a day seems excessive. I can only assume that they're phoning all their customers, and because I end the conversation shortly after they mention who they are, my name isn't being ticked off the list of customers contacted. Ironically I am now very ticked off, and if the calls don't stop I might have to transfer my business elsewhere.

For all the knowledge that I might get a better deal (or fewer cold calls) from changing ISP, it remains a risky strategy. The last time we did it we lost all telecommunications for a week: broadband and telephone. Apparently about a tenth of customers switching ISP experience this level of service. For me the grief was compounded by my previous ISP then not accepting that I no longer had to pay them every month.

(In fairness to TalkTalk I should mention that this happened when I was transferring to Tiscali, which TalkTalk later acquired. Maybe TalkTalk would have done a better job; they certainly couldn't have done a worse one.)

But now it occurs to me that when we swapped broadband provider last time our only fallback was a £20 Nokia mobile phone. If we did it again today we'd still have three internet-enabled smartphones to provide access to the outside world. Hmm, maybe it's time to look again at what deals are available from the broadband providers. Not from TalkTalk though.

Saturday, 21 July 2012

What the Kindle is missing

I recently started reading The Bodhisattva's Brain by Owen Flanagan, published by the MIT Press. This isn't about the contents of the book, interesting though they look. Instead it's about the feel of a really nice book.

Everything about this book is appealing: the simplicity of the front cover design, the superb quality of the typography and printing, the texture of the high quality paper, and above all, the delicious smell of a new book.

I have a Kindle, and I read a lot on it, and I'm happy with it in its way. I'm sure that e-readers are the way the book industry is going. And yet...the experience of reading a book on a Kindle (I cannot speak for Nooks or other devices, but I doubt they're very different) lacks the magic of holding and smelling a really well produced, physical, paper book.

No doubt it will get better. In the meantime, someone has tried to close the gap by bottling the scent of a book. At nearly £70 a bottle I won't be rushing out to buy it any time soon, but I'm pleased to find that people are working on the problem already. Perhaps Kindles will one day come with this smell impregnated in their casing.

And perhaps one day the resolution of its screen will match the skills of the MIT Press and its printers.

Thursday, 14 June 2012

Age before ...

Today on the bus a teenage boy offered me his seat. This has never happened before, and honestly I wasn't expecting it for another twenty years or so.

Top marks for his manners, but I'm left consoling myself with the hope that he does this for every adult, not just the ones that he thinks look old.

Sunday, 27 May 2012

Straying Outside the Law

I just watched this video about the new EU cookie law. I run two small websites, which don't use cookies, but I was intrigued by the claim that 90% of EU web sites violate the law. How could it be so high? A worrying idea occurred to me. I googled "does google analytics violate eu cookie law", and the very first hit confirmed my fears. I had become a criminal!

To be honest, I don't look at the Google Analytics data very often, so rather than pay £50 for someone's jQuery plugin to get me back on the straight and narrow, I just commented out the offending JavaScript.

What a relief! And what a relief too for my few visitors, knowing that I will no longer be able to know that they've visited me, even though I had no way of knowing who they were.

My only lingering worry is that leaving the commented out code in my HTML files could count as conspiracy.

Saturday, 5 May 2012

Tesco Bank targets the Optimistic

The post has just arrived. (11.30am! Remember when it used to come before you set off to work?) A weighty letter from Tesco Bank has my name on it. Inside is a pile of bumpf advertising their Over 50s Plan. There's no way I'm wading through it all, but there's something to do with preserving my photos for posterity, and a free £30 Tesco Gift Card. Actually not that free, as I'd first have to take out a policy that costs at least £7 a month.

Just before I consigned it to the recycling bin, I noticed this wonderful paragraph, which I feel needs wider circulation:

The Tesco Over 50s Plan is a whole of life plan. You choose a monthly mount you can afford, from £7 to £50 a month, and as long as you pay all the premiums until you're 90 years old, you are then covered for the rest of your life.

In fairness to Tesco (and their no doubt formidable legal team), this is a Life Insurance policy, so in the quite likely event that you don't make it to 90, the policy will pay up. Also, the plan is aimed at people aged 50 to 80, and maybe when I'm writing from The Wrong Side of 70, offers like that will be more of a selling point.

Monday, 30 April 2012

My Thoughts on the Fermi Paradox

Enrico Fermi famously asked why, if our galaxy really does contain other intelligent, technologically capable species, we haven't seen any trace of them. Against the great age of the galaxy, the time required for a civilisation to explore every single star system in it is relatively small, so we should have encountered a probe or something by now. That we haven't would imply that in fact intelligent life is not very common.

Speaking personally, I would very much like there to be intelligent extra-terrestrial life. I largely grew up on Science Fiction, so the possibility of humanity one day making contacts with aliens featured highly in my formative years. Ironically, I automatically assumed that ET would be friendly towards Humanity, despite this rarely being the case in SF films and books.

To rebut the Fermi Paradox I used to reason that ET would very likely be thousands or even millions of years more advanced than us, and so would have little interest in making contact with a such primitive species as we would seem to them. Indeed, they might not even recognise us as being intelligent enough to be contactable. A second line of defence was that perhaps we have observed evidence of them, but have wrongly constructed naturalistic theories to explain the evidence.

Recently a third possibility has occurred to me. I wonder if we're being a bit parochial in our assumptions about what an advanced civilisation would do. Sure, it seems natural to us that they would expand out from star system to star system, building that Galactic Empire I used to read about, but maybe your needs and aspirations change as your civilisation advances. When our culture looks into the future we typically have a time frame of no more than a few decades. Many of our politicians seem to look little further than the next election, so that's probably not surprising. I'd hope, though, that this would change eventually. A sufficiently advanced culture might conquer problems like ageing and death, and start to think on a far longer scale. When your potential lifespan might be measured in millions of years, and remote possibilities morph into inevitabilities, you might become rather risk-averse. Galaxies contain supernovas, wandering planets, and who knows what other perils. Sure, their advanced technology might allow them to, say, relocate away from a star that would one day explode, or maybe even dismantle the star to stop it going off at all. But an easier solution might be just to leave the stars behind.

I wonder now if the missing alien civilisations aren't to be found in intergalactic space, millions of light years from anything that could harm them. According to David Deutsch in his book The Beginnings of Infinity (an excellent book, by the way), the density of matter is thin indeed out there, but a volume the size of the Solar System would still contain over a billion tonnes of matter, mostly Hydrogen. A sufficiently advanced civilisation, perhaps one that has moved from organic lifeforms to some form of miniaturised cyber-existence, might manage quite well.

'Might' seems to be the operative word in this post, so I'll permit myself to finish with another piece of even wilder speculation. Maybe a sufficiently advanced civilisation gets the option of abandoning ordinary matter completely, and migrates to dark matter. Then passing threats can be ignored as they'll just pass straight through you.

Additional: maybe this is how you'd do it.

Sunday, 29 April 2012

Isaac Asimov on Life-long Learning

Sometimes you stumble upon someone who's thinking exactly the same as you, only expressing themselves far better.

Here's Isaac Asimov in a 1988 interview with Bill Moyers, in which he explains, among other things, what it'll be like once the internet comes into our homes (sadly he just missed seeing it come about). This bit about his love of learning new stuff really struck a chord for me:

I think it's the actual process of broadening yourself, of knowing there's now a little extra facet of the universe you know about and can think about and can understand. It seems to me that when it's time to die, and that will come to all of us, there will be a certain pleasure in thinking that you had utilised your life well, that you had learned as much as you could, gathered in as much as possible of the universe, and enjoyed it.

Saturday, 21 April 2012

Tom and Jerry

As a child growing up in the 60s and 70s one of the pleasures of early evening television was the Tom & Jerry cartoon. The BBC used to show at least one of these every evening (if my memory serves me right) for a while, certainly long enough for me to get to see a good many of them.

Fast forward to about 2004. By the miracles of digital technology the entire Tom & Jerry collection is now available on six DVDs, and under cover of getting them for my young son, I purchase the whole set. Often when I go back to something I loved as a child I find that three decades or more of experience and growing up have robbed it of the charm it once had for me. Not so Tom & Jerry: all the cartoons I remembered laughing at before I still found funny, and do still, even after repeated viewing. (And if you don't understand why the viewing is repeated, wait until you have a small child in your home.)

Of the six DVDs, four and a bit contained the episodes I loved; the rest were mostly ones I'd never seen before. According to their Wikipedia entry, the cartoons were originally done by Hanna and Barbera for MGM. After those two set up their own company in 1957, 13 Tom & Jerry cartoons were made in Eastern Europe, then a bunch more made by Chuck Jones. The difference in production companies is painfully obvious

In the earliest cartoons, Tom is very much a cat, running on all fours or curling up in a basket, for instance. Quite quickly though he matures into the classic Tom, who walks like a human, stretches out on a hammock, and can play a mean game of tennis. There is huge charm in these cartoons, which feels as if it has been almost surgically removed in the later episodes. There the jokes are rarely funny, and are usually telegraphed well in advance to minimise the risk of laughing at them. The physical appearance of the cat and mouse have also been altered, not for the better.

So much for my opinion.

Here's a thought though: if some enlightened soul at MGM commissioned a DVD's worth of new cartoons made in the same style and to the same quality as the ones from the 40s and 50s, I would be more than willing to pay full price for a copy of them. The continuing popularity of these cartoons on TV networks around the world would surely also provide enough income to justify the expense. And sixty years on the production cost of making cartoons like this must have gone down a bit? All it would take is a production team that loved the originals and didn't (apart from steering clear of outdated racial stereotypes, please) feel the need to update the characters.

Sunday, 25 March 2012

Living in a Simulation - Some Thoughts from Within

It was about 2007 when I first encountered Professor Nick Bostrom's Simulation Argument.

You are well advised to read the original argument rather than my digested version of it, but basically it suggests that, providing it is possible to create a conscious entity in a computer simulation, and if humanity ever achieves the technological ability to run such simulations, and if humanity chooses to, then the overwhelming likelihood is that you are a conscious entity in a computer simulation.

The first condition is still a big IF. However, the second one possibly only involves humanity and our technology continuing on their current path for another few decades. The third condition I would argue is almost a certainty.

Ever since I first met this idea it has intrigued me. If it could be shown to be true, how should that affect the way I live my life? Should I try to be more interesting and entertaining, to decrease the risk of being edited out? Should I try to make contact with my programming overlords?

And might there be a way of working out for sure that our universe was really inside a computer program?

Putting myself in the place of the simulation designers, but using the computer technology available to me today, I tried to imagine what constraints or short cuts might be evident to the inhabitants of my creation, and these three points occurred to me.

  1. The constraints of working in a digital computer would mean it was easier if there was a minimum possible size for such quantities like length, time, etc.
  2. Likewise, it would be nice if it was possible to average the effects of the basic components of the universe, so that a wall, say, could be treated as a surface without needing to calculate the movements of all its component particles.
  3. There would be a largest possible number.

Now as it happens, Quantum Mechanics says that there is a smallest possible value for time and length: the Planck time and Planck length, respectively. They are very, very small: the Plank time is 5.4 x 10-44 seconds, and the Plank length is a mere 1.6 x 10-35 meters. Nevertheless, this feature of the Universe is not intuitive.

And the properties of large objects can be calculated without having to consider all their component particles, which is one of the reasons we could do Physics before the particles were discovered.

The maximum number idea was a non-starter though, as everyone knows about infinity, and some people even know about the many different infinities. It was while hoping to learn more about the fascinating world of transfinite numbers that I recently watched the BBC program To Infinity and Beyond. In the middle of a series of interviews with mathematicians, I almost fell off my chair when one Dr Doron Zeilberger said that he didn't believe in infinity. No, he thinks that if you keep counting indefinitely, you eventually reach a maximum number, after which you get back to zero. The maximum number would be very, very big, but he believes it does exist. I don't know if he is alone in this view, but the fact that any serious mathematician could hold it I find very intriguing.

If Bostrom's Simulation Argument is valid, then its discovery must surely be a landmark in the running of a simulation, perhaps hastening the point when the simulation ceases to be of interest to its creators. I would guess that the 'turn off the program' point is when the bulk of humanity's behaviour becomes influenced by the knowledge of the true reality. If so, publicly speculating on the Simulation Argument might not be quite the good idea it seemed when I started this blog post.

For which I apologise; although if it makes me more interesting...

Saturday, 24 March 2012

Getting Spotify to work on my Android phone - Part 2

For a while now my Spotify app for Android has exited abruptly shortly after launching. True, this was only if I was online, but as I needed to be online in order to save music for playing offline, I was effectively stumped.

In a previous post on this subject I described how I briefly fixed the problem, only to have it come back again shortly afterwards. I have now fixed it again, and it hasn't gone wrong again six hours later, so I thought I should describe how I did it.

It seemed to me that the problem was happening when my phone (a Nexus S running Android 4.0.3) tried to synchronise playlists with Spotify Headquarters. I have a lot of playlists, since I create one for every album I like, and these are themselves kept in playlist folders by band and genre. But in a moment of revelation yesterday, I realised that I hardly ever refer to the playlists when looking for something to listen to. If I'm not playing some album I've just found out about, I tend to play something that just springs to my mind. Occasionally I will tell Spotify to randomly play tracks in my playlists.

It occurred to me that I could save a lot of effort by just starring at least one of the tracks in any album I wanted to remember, and could then forget about making a playlist for it. Spotify can play starred tracks in a random order, and the built-in search facility is usually good enough to find music.

So I went through my playlists, checking for one star or more in each album, before deleting the playlists altogether.

The moment of truth: would Spotify for Android now work? No.

So I switched off WiFi and went in again. I opened the settings and cleared the saved data. Then I uninstalled and reinstalled the App. Now it worked.

It's a shame that the app had this bug in it, but I seem to have cleared the problem, and as a side benefit, I won't spend any more time in Spotify creating playlists I never really needed. As with GMail, where I used to make folders and sub-folders galore to store my mail in, I now just stick it all in a heap and fetch it back with Search.

Update - it lasted for two days. Now, once again, the app exits shortly after launching. Looks like I might need to reinstall it every time I want to use it!

Another update (22/06/12) - I've been using the new version of Spotify for Android for a few weeks now, and all the problems seem to have gone away.

Thursday, 22 March 2012

Updating a ZoneAlarm subscription

ZoneAlarm e-mailed me last month to let me know they would be automatically renewing our 3PC license. I wouldn't need to do a thing. Two and a half weeks later there comes another e-mail:

Congrats! Your subscription has been renewed.

To verify your subscription has been renewed:

  1. Open your ZoneAlarm product.
  2. Look in the lower right corner of your product for the updated number of days your license is valid.

It may take up to 48 hours for your new date to appear, but, rest assured, your product will continue running and you will stay protected.

A week later, the date is still telling me that the sub runs out shortly. ZoneAlarm begins to get edgy, putting up pop-ups to remind me to renew my sub.

For the record, rather than waiting 48 hours for nothing to happen, this is how to tell ZoneAlarm that you've renewed your license:

  1. Open your ZoneAlarm product.
  2. Open the Tools menu.
  3. Select the 'Enter License' option.
  4. Highlight the license key.
  5. Type Ctrl + X.
  6. Type Ctrl + V.
  7. This will have enabled the OK button—click it.

ZoneAlarm should now be showing the correct expiry date.

Update - April 2013

I'm still having this problem, but now I have to come out of the ZoneAlarm monitor, then go back in and repeat the license key procedure. The second time it works.

Saturday, 10 March 2012

First Stab at Geolocation

Like the blog post title says, I've just had a first go at using a browser's Geolocation abilities. I'd imagined it would be quite involved, but nothing could be further from the truth. There are only three functions in the Geolocation API, and they're almost trivial to use.

This is the nub of it:

    navigator.geolocation.getCurrentPosition(function (position) {
        // Do something with the position data.

I particularly like the way they put it all into the 'navigator' object.

'position' contains your co-ordinates and an accuracy. When I tried it in Chrome on my PC the stated accuracy was 25km, but the co-ordinates did look very much like York's. Of course, this begs the question of how my browser knows where my PC lives, given that it doesn't have GPS in it.

Saturday, 4 February 2012

Moving Web Sites Forward

An article from Google today says that 60% of the web is now in Unicode. Interesting. It made me wonder what encoding I was using on the three small web sites I maintain. Turned out to be ISO-8859-1.

Can't have that: I do this sort of thing for a living, and this makes my edge feel decidedly less than 'cutting'. I resolve to move straightaway to UTF-8 encoding, and move onto HTML5 while I'm about it.

Well, what an improvement! This is what the top of one of my HTML files looked like before:

   <?xml version="1.0" encoding="iso-8859-1"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
   <html xmlns="" xml:lang="en" lang="en">
      <meta content="text/html; charset=iso-8859-1" http-equiv="content-type"/>

and this is what it looks like now:

   <!DOCTYPE html>
   <html lang="en-GB">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

I'd never liked the header stuff before, as it was verbose, repetitive, and error-prone. I'd never even bothered to learn its rules, and would just cut and paste an existing file when I needed to start a new web page. HTML5 throws all that dross away, and leaves little more than the absolutely bare minimum to get the job done.

That was basically all it took, apart from my £ signs, which were now showing up as solid black diamonds; they simply had to be changed to "&pound;".

So, make that 60.000001% of the web.

Saturday, 28 January 2012

Another Useless Message from Microsoft

This is what just came up when I tried to run a .mov file using Microsoft's Movie Maker:

"Sorry, Movie Maker can't start."

Why not? Your software must know. Some test was done by Movie Maker and the wrong answer came up, so it bottled out and put this stupid message up instead of telling me what's wrong.

Clicking on the first link took me to a web page that wasn't really very useful. However, it was a beacon of illumination compared to the second link, which took me here:

I gave up and installed QuickTime.

Back in the nineties (before Steve Jobs's return), Scott Adams wrote that Microsoft had turned Apple into Microsoft's R&D division. I sometimes wonder if nowadays Microsoft hasn't morphed into Apple's Marketing division.

Wednesday, 11 January 2012

Spotify for Android exited after logging In

Although I installed Spotify for Android shortly after I bought my Nexus S, I rarely used it; when I have time to listen to something I tend to choose podcasts or audio books. So I couldn't say for sure when the Spotify app stopped working.

The symptoms were that I would start up the app, log in, and a few seconds later it would just quit. No explanation. If I started the app up offline (i.e., no wi-fi or 3G network available), there was no problem, other than not having any music to play. Then as soon as I went online, the Spotify app would crash.

I couldn't find anything about on it on the web, apart from one person who'd 'fixed' it by deleting all their playlists. He suggested it might be due to an awkward character in a song title. This fitted in with my experience, in that the program seemed to crash while synchronising data. Unlike him though, I wasn't prepared to chuck out all my carefully assembled playlists.

But it kept bugging me, and the more I thought about it, the less plausible this seemed. If it was really down to having foreign characters in a title, surely thousands of people would have been hit with this, and Spotify would have quickly fixed it? So maybe it was something else in my playlists. Looking at them on my PC, I noticed that several tracks had a sort of lock icon next to them. In each case the track could no longer be found via a general search, though an alternative version of the track could. I'm guessing that the original track is no longer available, but Spotify is substituting the replacement. So I went through and manually replaced all those tracks. Alas, it had no effect on the Spotify app.

All was not lost: while getting rid of the lock icons, I'd noticed a few 'musical note' icons. These indicate tracks which are local to your device. Could the Spotify app be falling over trying to synchronise music that was on my PC's hard drive? I took all the local music out of my playlists, and my Starred items, and a couple that were in my waiting to play list. And finally my Spotify app managed to start up properly.

So that's the trick: don't have any local files anywhere in your lists. I can log in just fine now. In fact, it's even better than that: I've just noticed I can't seem to log out.

Supplemental: My Android app is bombing out again, and there are no longer any local files in my playlist. So I'm back to square one, or maybe square two, as at least I've established that the problem's something to do with the playlists. I am not giving up on this though: watch this space.

Supplemental 2: I think I've really fixed it this time.

Sunday, 8 January 2012

Skipping through YouTube

Just read this at LifeHacker, and was completely astonished that something so useful isn't better known. (The original story seems to be here.)

It turns out that you can automatically jump forwards and backwards in a YouTube video by pressing the number keys, 1 to 9. It only works when the video is paused or just about to start, not when it's playing. Pressing 4, say, will take you to the 40% mark in the video. And it's really quick.

On my PC it only works for the normal number keys, not the ones on the numeric keypad. However, in verifying that just now, I've also noticed that you can also use the arrow keys and Home/End to navigate through a video.

Now if there was only a shortcut to Pause a video.

Saturday, 7 January 2012

Port Forwarding

My son asked me to explain port forwarding to him last night: he's trying to set up a Minecraft server on his laptop so that his friends can play on it, but he needed to give them his IP address, and this keeps changing.

As I struggled to explain, I realised that I didn't fully understand port forwarding myself. I could see exactly what his problem was, but even though I've been using the internet for 16 years, it had never occurred to me to really wonder how external computers can communicate with a computer that's inside a local network.

We've cracked the port forwarding problem now, after he found out how to do it on YouTube, and then talked me through configuring our router to forward requests to port 25565 to his server. It turns out that I did know what was going on after all: I'd just never got all the pieces properly together in my head before. Going through this exercise forced me to.

My son is still only eleven, and already I'm having to up my game to keep up with him.

One thing I don't understand: how did our router have an up to date list of possible games built into it? Is this coming from our ISP? Nearly all the games are ones we've never used, so it's unlikely it found out from our own computers.

Upgrading a Nexus S to Android 4 (Ice Cream Sandwich)

There's been major excitement (albeit very localised excitement) in this house following the news that Nexus S phones would be automatically upgraded to Android 4. However, as the days turned into weeks I began to wonder if I should ignore my phone provider and do the install myself.

I almost went ahead with it over the Xmas holiday, but news reports about Google suspending the process because of unspecified problems made me back off. Yesterday I cracked.

The process was very simple, and took less then ten minutes. I followed these instructions here. There were no incidents, although I would advise you to read all the instructions before setting out. (I have nobody to blame that I didn't read the words "when you see the warning triangle" before I actually saw the warning triangle.)

What's Android 4 like? Well, the Look & Feel of the UI has improved, and it looks like I no longer need a couple of apps because Android now does the job for me. The default Camera app is much better, and there are several other enhancements. Nothing earth-shattering, but perhaps I haven't yet found all the changes. (I only a couple of hours ago found that I can dismiss individual notifications by swiping over them from right to left.)

Now for the downside: I have encountered three problems since I upgraded.

Most worryingly, last night for the first time ever the screen stopped responding to touch. I tried to power it off, but of course couldn't confirm the action. Then, when I pressed the power button to turn off the display, it was still faintly visible. After a few cycles the phone started responding again, so I quickly powered it off fully before it changed its mind. It hasn't done it again since I switched it back on.

Secondly, I've had notifications that Google+ has stopped. Google+ seems to be built-in, because you can't uninstall it. I disabled it instead, in case it's behind the first problem.

Finally, I've twice been told today that my phone provider is unavailable. To be fair this does happen, but not often, so I mention it here for the sake of completeness.

All in all, I do like the new look, but it may take a few days before my confidence in the phone's reliability is fully restored.

Monday, 2 January 2012

A Pniower Map

This map hung on my mother's wall for as long as I can remember. It was drawn by her father, the landscape architect Georg Pniower, and I always assumed it was a map of gardens he'd designed, as indicated by the 'P' shaped spade handles.

Looking at it again yesterday I noticed for the first time that the writing on the left is in verse. Now I wonder if it was some sort of puzzle ('for 1939'). My German isn't good enough for me to be able to transcribe the writing accurately without considerable effort, and even then I've noticed that Google Translate can be very poor when given poetry to work on. I'm posting it here in the hope that someone can one day shed light on it.

In 1939 my grandfather was no longer officially designing parks and gardens, the Nazi regime having long since decided that his Jewish ancestry made him unsuitable for this role. After the war though he became a Professor of Horticulture at Berlin University.