Ord’s Blog
RSS icon Home icon
  • Riding with the iPhone

    Posted on June 21st, 2009 Ord 1 comment

    V Star 1100

    I’m on a motorcycle trip this week, and left all technology behind… Except the iPhone. It gives me the chance to get away without having to lug along a laptop and plan my trip around wifi hotspots. Before leaving, I subscribed to the Rogers data roaming plan. It’s still unreasonable, but it’s better that the abuse I’d otherwise take for data roaming. It makes email cheaper than text messaging while I am in the US.

    It’s then end of the first day, and the iPhone has already proved itself. First save came when one of my friend’s bikes broke down. Google quickly gave us the location of the nearest Harley dealership, and their technician helped us with the diagnosis. A bit of tinkering and we were on our way.

    A couple of hours later, I got a SMS telling me that there was a problem with one of my servers. I launched the SSH client on my iPhone, logged into the server, found and fixed the problem. A few minutes later I was emailing my partner to let him know it was running.

    Of course, the three other guys did make fun of me for not having the tip calculator app installed after lunch, but we were able to pay our bill anyway.

    At stops for food and gas, I updated my facebook status so my wife could follow my progress. Mapping is quicker and easier that it ever was with my handheld GPS. The Wordpress app let’s me write and publish all this from my iPhone. I even use it on occasion to make phone calls.

  • Local Solr

    Posted on June 12th, 2009 Ord 6 comments

    For searching at our Open Business Information Directory project we have been using a Solr server.  Based on the Apache Lucene library, it consistenly works well for the type of searches we need to do.  Since a lot of the applications for business data will be local searches, we looked at ways to implement distance algorithms.  For a quick solution, we turned to LocalLucene/LocalSolr.  This package adds distance search to Solr, so that we can send queires for matching within a certain radius of a point.  LocalLucene is available from SourgeForge.

    Getting started takes some doing.  First of all, we need to perform geocoding of  our records.  It is worth noting that not every record needs to be geocoded – ones that aren’t coded just won’t appear in proximity searches.  To get up and running quickly, we used a postal code database to get a rough location of the records that weren’t already geocoded.

    For the changes to the Solr installation, I referred to the helpful tutorial at GISSearch.com.  Once the changes had been made, I reindexed our records.  This was the longest part of the process – even though I only processed the Canadian records for this test, there are still over a million to go through.  If the server wasn’t being used I could have shut it down, deleted the indexes and rebuild to save some time.

    Along the way, a few problems came up.  First was that a version build with the latest sources didn’t work, I had to revert to some earlier stable versions.  At GISSearch there is an example package that has a compiled solr that works, so that is a good place to start if you are having issues there.  The other big problem was that a bug in the phps output writer was preventing the searches from running.  Switching to xml or json output solves that.

    Using Local Solr instead of writing our own solutions has saved a lot of development time.  We still need to do some performance testing to see how it will hold up under heavy usage, but so far it looks like with a dedicated server for geo searching we will be able to keep up with the loads.

  • What’s right, now?

    Posted on June 9th, 2009 Ord 1 comment

    I recently heard that a study has shown that wikipedia was more accurate that Britanica as an encyclopedia. I don’t know the details of the study, but to me the important question is how do we define “right” when it comes to facts.

    Not so long ago it was a fact that the earth was the centre of the universe. Anyone who disagreed was considered wrong, or crazy, or both. At one time, it was “fact” that an atom was an indivisible component. Later we came to accept that electrons, protons and neutrons were the smallest particles, but we no longer believe that today. In all cases, the scientific community and the world at large accepted these as truth.

    At one time, a student who answered that light was composed of particles would have been told he was wrong. At other times those that said light was waves would be called wrong. The physics of light didn’t change, but our understanding did.

    So how do we define right or true? In some cases we can check for ourselves. I can count how many sides a cube has, and that becomes a fact to me, and absolute truth. However, in many practical matters we accept what the majority of the people we trust say to be the truth. As we are exposed to more and more information we increasingly encounter facts that we can’t check ourselves by simple observation. The more specific or intricate the subject is, the less chance there is that someone I know and trust has direct knowledge of it. In these cases, truth becomes whatever the majority believes it to be (more specifically, those that have chosen to make their beliefs known through writing). I may filter the information according to my perception of the reliability of the source, but in the end I am accepting it because the greatest number of credible people say so.

    By defining truth this way, it isn’t surprising that a community edited encyclopedia proves to be more accurate than one edited by a limited staff. The one that conforms to the beliefs of the greatest number will be considered right by more people.

    This extends to the principle of using Twitter or other social networks as a search engine. If I define a relevant result for a search as the answer that most people who think like me believe, then I won’t be surprised that my network of contacts would give “better” results than an algorithm. The challenge will lie in building the right human networks for different queries. This isn’t a new concept – anyone who has asked a question on a discussion forum or newsgroup has used a human powered information system. The differences now are in the speed with which we can get feedback, and the number of people we can access.

    Information is being updated and spread faster than ever. The “truth” as we understand it can change from day to day. I can no longer consider right and wrong as static conditions, facts need timestamps to be meaningful now.

  • Life without laptop

    Posted on June 8th, 2009 Ord 4 comments

    I am on the road at a conference as I write this. Normally, I don’t leave home without a laptop – but since I was travelling by motorcycle and space is at a premium I left the notebook at home. This meant putting a lot of faith in my iPhone, and so far it has paid off.

    Of course, getting & sending emails, voicemails and tweets is commonplace with the iPhone, but could I do any “real work” if needed? Turns out the answer is yes.

    A client contacted us about a change to an online project that was needed urgently. It wasn’t a big change but it did need to be done before I’d be back. I quickly logged in to the server over ssh conection using TouchTerm (touchterm) launched vi and edited the file. A quick check in the browser, and I was emailing the client back to say that the change had been made.

    I’m still not sure if I’d be comfortable to be away for a few weeks without a laptop, but I won’t worry for a few days as long as I have the iPhone with me.