If you have two cars parked beside each other, with radios on, both tuned to the same station and each radio with the volume turned up to ‘5,’ (halfway, in other words) is this any louder, in practical terms, than only one car?

One of the points that Edward Hasbrouck makes strongly in his book Practical Nomad: How to Travel Around the World is that it’s inherently dangerous to use a public computer (like in a library or Internet cafe) to do things like online banking.

Even if the activity over the network is secure — using a browser to connect to a secure banking website, for example — there’s no way of telling whether or not the computer itself is secure. For example, there could be something in place, installed by a earlier user, that logs all keystrokes to a file. So you naively type in your credit card or bank account number into a “secure” browser, but it’s also logged to a file where it’s later examined and used for nefarious purposes.

The same danger applies to anything you do with a browser that’s not public — checking your Hotmail, for example.

I’m wondering it others have tips and techniques that can mitigate this danger. I imagine, for example, that using a version of “Linux on a floppy” or “Linux on a CD” that you could use to reboot a public machine would go a large way towards averting things like keystroke logging. Any other suggestions?

This is of concern not only for nomads, of course, but for the large number of people for whom “Internet access” is “driving down to the local library.”

I ran into Catherine Hennessey on Queen Street this morning, and she mentioned several benefits of the new central parking kiosks in Charlottetown that I hadn’t thought of previously:

  • Because you can buy the same “chit” for windshield display from any machine, no matter the location, you can buy a couple of hours worth of parking and park in several different locations downtown over that time. Can’t do that with parking meters.
  • The chits aren’t specific to the car, nor to the person, so if you’re leaving your spot early, you can pass your chit on to someone else who can live it out for you. This is commonly done (although officially disallowed) with public transit transfers in big cities.
  • The presence of card-readers in the kiosks will enable, at least in theory, merchants to be able to give their customers “free parking” but giving them pre-charged cards good, say, for an hour of parking.

Here’s a website that’s entirely devoted to hitchhiking. I found a like Airhitch, which appears to be the airliner version of the practice, albeit somewhat more formalized.

One of the afflictions we untrained, shoot from the hip, make it up as you go along programmers suffer from is a tendency to get stuck in our ways. If it works, you keep doing it. Learning happens when things don’t work, and there’s seldom enough time to go back and retrofit code for new learning.

This affliction hit me in a big way this week.

My little project of the day was to take a database of 700,000-odd Canadian postal codes and turn them into an ESRI shapefile that I could load into MapInfo. Or, in simpler terms, I needed to plot postal codes on a map.

Using PHP/MapScript, I wrote a PHP script to loop through the database of postal codes, grab the required information — postal code, place name, province, latitude and longitude — and add each, in turn, to a map layer.

And it worked.

Except that it worked really, really slowly.

It started off quickly enough — zooming through the first 10% of the postal code file in a couple of minutes. But once it got more than 50,000 points in its belly, things slowed to a crawl, and adding each point to the map layer was taking 5 to 10 seconds. I left the script running over the weekend, and it was only halfway through the “J” postal codes in Quebec, alphabetically, when I returned on Monday morning.

My immediate suspicion was that the more points I was adding to the map layer, the slower it was to add new ones. So I tweaked the part of the script related to adding points to the map layer. But things still ran just as slowly. I stripped out even more fluff, and made the code even more efficient. Still got bogged down. I switched the code to created ten individual layers, one for each province. No improvement.

This morning, with a clearer head, I though “maybe it has nothing to do with the map layer part of the code — maybe it’s something else.” So I stripped out all of the map-related code, leaving me with, essentially, a script that looped through 700,000 records in a database and displayed its progress. Much to my surprise, the code ran just as slowly as when it was creating map points. So the problem was database related.

To the manual.

I’ve written hundreds of thousands of lines of database-related PHP code over the past 5 or 6 years. And the vast majority of the queries have returned less than a dozen records. Which is far less than 700,000.

Right here in the PHP manual it says, about the mysql_result function I’ve always used to grab results:

When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As these functions return the contents of multiple cells in one function call, they’re MUCH quicker than mysql_result(). Also, note that specifying a numeric offset for the field argument is much quicker than specifying a fieldname or tablename.fieldname argument.

So I modified the code to use mysql_fetch_row instead.

And now I can digitize the entire country in about a minute.

Which, assuming the originally script would have ever completed, is about a 300,000 times improvement in speed. Presumably that’s why the word MUCH is capitalized in the PHP manual!

Moral of the story: never make assumptions about where problems lie, never assume you know everything. And read the manual.

Here’s the Canadian Dept. of Foreign Affairs description of the safety and security of a country. Can you identify which country it is (without using Google)?

Crime occurrences are high in many… cities, but are generally concentrated in areas that travellers are unlikely to visit. Travellers, however, should remain vigilant and alert to their surroundings. Full cooperation is recommended when stopped by police. Street crime can spill over into commercial, hotel, and entertainment areas. Racial tensions and poverty occasionally prompt riots; these are usually confined to the poorer districts of major cities, but the violence can spread to central commercial and hotel districts.

Spectrum, the weekly Deutsche Welle science program, has an interesting piece about the use of iris scanners at Nine Zero, a Boston hotel where I’ve stayed before (albeit in the off-off season, when rates are cheap). You can listen here (it’s the second item in the programme, about 7 minutes in).

The piece was produced by Sharon Dempsey, who interviewed me last month at the DNC.

Let’s say you have a MapInfo polygon layer called “Regions,” and a point layer called “Points.” You can get find out which Region each Point is inside using a MapInfo SQL query like:

SELECT Points.id,Regions.id from Points,Regions WHERE Points.Obj WITHIN Regions.Obj

But what if you want to do the opposite: get a list of all of the Points that are outside any Polygon (you might call them “orphans”). You can do this:

SELECT Points.id from Points WHERE not Obj within any (SELECT Obj from Regions)

Cool.

Through our work with YANKEE, The Old Farmer’s Almanac and Elections PEI we’ve had to become adept at understanding the basics of GIS — Geographic Information Systems, or, more generally “maps on computers.” And we’ve had to become adept at finding sources of free GIS data.

The United States is much more enlightened about the public use of government information, and so a lot of U.S. Government generated GIS data is freely available online. Ironically, it’s often possible to get Canadian data for free from the U.S. too. Three excellent starting points are:

  • The Map Layers Warehouse of the U.S. National Atlas has a great selection of base layers, running from basics like roads and state lines to magnetic field, zebra mussels infestations and time zones. I’m a particular fan of their Shaded Relief of North America. They make their data available for free download in ESRI Shapefile and SDTS formats.
  • The AWIPS Map Database page, from the National Weather Service, is, as you would expect, weather-focused. But they do have some basic layers, like Canadian provincial and territorial boundaries, that aren’t available from the U.S. National Atlas.
  • The Canadian GeoBase site is proof that Canada is catching up. In particular I’ve found their National Road Network is a useful resource (although, at least for PEI, it’s currently without street and road names attached; this is coming in a later revision).

Put the data you can get from those three sites together with an open source mapping application like MapServer and you can create powerful mapping applications (like this and this) at no capital cost.

What’s missing from the mix is, alas, an open source GIS editing application — something along the lines of MapInfo or ArcView. There is GRASS, but I have found its complexity so insurmountable as to be almost useless. I’m sure it can be very powerful if you are willing to mount an assault on its learning curve, but that would take the kind of time and dedication I can’t afford.

Even without a GIS app to create new layers, however, you can still, using MapServer and PHP or Perl, programatically create new layers — both points and polygons. Although this isn’t “point and click,” it does make it possible to map your own data on top of others’ base layers.

I’m pretty convinced that things are heating up inside the nexus GIS, GPS, telephony and the web: these tools, and this data, can drive a lot of interesting experimentation in people’s basements.

My friend Stephen has a theory, mentioned here before, that people without children cannot understand what it is like to have children. In other words, all those “hey, you should have kids… it’s great” advertisements that we the childed beam out are effectively “blah blah blah children blah blah” to those without. Stephen would maintain, I think, that some sort of switch gets thrown as soon as you’re caring for children, and that after that switch gets thrown, nothing is ever the same.

I tend to agree. I certainly know that nothing I imagined about having a child bears before bears any resemblance to what it’s actually like. Partly this means that none of the “we’ll never be able to have any fun again” paranoia didn’t pan out. And partly it’s that it isn’t possible to understand the whole “I will jump in front of a train for you” kind of love that child rearing engenders almost instantly.

Put another way, there is a great divide of understanding between people with children and people without. I don’t mean to suggest that people who, through choice or circumstance, don’t rear children are lesser people, simply that there are certain things they can’t sense.

Which is all to say that, after reading this observation from Tom Peters about his own life circumstances, I’m left, mostly, saying “huh?”

I’m pretty sure that he’s describing something substantial and important. And I’m just as sure that from here on the outside of his life looking in, it’s almost completely impossible for me to understand anything about it.

Something has happened to Tom Peters, and as a result he’s standing on the other side of a great divide of understanding. I’m not sure whether he’s capable of communicating where he is to me, or whether I’m even capable of listening.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

I have been writing here since May 1999: you can explore the 25+ years of blog posts in the archive.

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search