Search This Blog

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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <body>
      <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">
   <body>
      <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.