Archive for the 'blather' Category

h1

Is Google Voice scrutinizing our conversations?

Monday, July 27th, 2015

This morning, my wife and I were sitting up in bed discussing the best route for her to take to park at St Joseph’s Hospital in Hamilton, the next city over from ours.
We had never communicated before about this location in any way.

Clare tells me the parking lot is at 50 Charlton Ave. I open Google Maps on my Android phone to look it up. I type 5, then 0 then SPACE, and voila, I’m presented with suggestions, the first one being 50 Charlton Ave, Hamilton.

This struck me as way more than a coincidence. I know that Google will correlate a whole bunch of things it knows about you to enhance search, so I searched my email to see if Clare had sent me that address before, which she had not. I had never searched for it before. We have driven past there recently, but we have driven past #50 of any number of streets.

The only explanation I could think of was that Google Voice (OK Google!) had picked the address or other hints such as cross streets out of our recent conversation and had used this information to narrow the search.

From the papers in front of us I had Clare clearly state the address of a medical building at 1960 Appleby Line, very close to us. I went to Maps, entered 1 then 9 then 6 and it immediately completed 1960 Appleby Line. Now it’s possible that there are no other addresses within a 5 km radius of our home that begin with 196 but I’m not entirely convinced.

We tried a couple more with less success, and even the two examples cited don’t work any more, but these two instances have me very close to convinced that recent ambient conversation is being used to augment search results.

As a programmer, I think of the data exchange that would need to take place for this to happen, and I wonder how much of a private conversation could be picked out of the data.

I would be interested in hearing from anyone who can replicate this behaviour.

h1

When a textbook is not a textbook (redux)

Wednesday, May 7th, 2014

In a move reminiscent of OCAD’s textbook debacle of a couple of years ago, law schools are now jumping into the fray with ridiculous controls and DRM designed to use a textbook as a vehichle to perpetuate revenue streams rather than to teach students.

h1

Are you preparing for the IP-ocalypse?

Wednesday, April 23rd, 2014

ARIN (American Registry for Internet Numbers) just announced they have now entered Phase 4 of their IPv4 Countdown, whereby only one /8 address block (in aggregate) remains to be allocated.

Between Phase 2 and Phase 3, the 3rd-last /8 was depleted in 11 months. It took only 8 months for the penultimate /8 to go, so it would be optimistic to think that there will be any IPv4 addresses available by the end of 2014.

You may want to look at ARIN’s IPv4 Depletion FAQ to see how this will affect you.

If you have not done so, it’s time to get familiar with IPv6. I recommend you start at IPv6.net, where you can find a ton of resources.

h1

The Ex-XP Experience

Tuesday, April 8th, 2014

Being that it’s XP End of Support Day, I made sure this past weekend that there is no more XP in my home environment.

I still have Windows 7 Ultimate on my trusty yet crusty Dell 9400 and Win7 Pro on Clare’s Lenovo SFF desktop, however the one remaining XP instance was the kitchen machine, a venerable IBM T60 Thinkpad with 2G RAM.

The kitchen machine is used for general web browsing, Yahoo Instant Messenger, Skype, RDP/VNC client and sometimes playing music. I needed all these things to work just as easily as before, including the cheap USB webcam and mic, and the wireless network.

I installed 32-bit Ubuntu 12.04 LTS Desktop by downloading the ISO image to my Macbook Air and burning it to a DVD with my USB DVD drive, then booting up on the DVD. I used all defaults except for system name. When the system came up for the first time I used Firefox to download the Chrome package, installed it with the package manager, and then did the same with Skype. I used Pidgin to connect to Yahoo Messenger. In about 45 minutes and with a minimum of fuss, I had everything working. I set up accounts for my family, connected to wireless, and left it on the kitchen counter.

So far the only problem I have is that the video driver will only do 1024×768 and not the full native 1400×1050 that the T60 allows. This is not a big issue since Clare and I both need reading glasses now. Skype video is even clearer than it was on XP. My daughter started playing music with Grooveshark and it just worked. There are Office-compatible programs installed by default. Remote desktop access works great for both RDP and VNC hosts.

I heartily recommend Ubuntu 12.04 LTS Desktop as a great XP replacement with a fantastic out-of-the-box experience. You may also want to try Linux Mint.

h1

Goals are for Losers (and other wisdom)

Thursday, March 20th, 2014

Scott Adams of Dilbert fame has another book out – “How to Fail at Almost Everything and Still Win Big”. As the owner of four of his previous books (that is to say four of his more-than-cartoons books), this one did not disappoint. Thanks to Alex Sirota and NewPath Consulting for sending the book my way.

You could be forgiven for thinking that The Dilbert Principle was more lampoon than sociology, however much like its progenitor The Peter Principle by Laurence J. Peter, the book actually makes a lot of sense about hierarchical organizations and their behaviour.

Similarly, this book provides compelling arguments to help you guide yourself through life and the workplace while giving you a chuckle.

In the introduction, we are teased with a list of topics, the first of which is “1. Goals are for losers”. Other topics include maximizing your personal energy, conquering shyness, and managing your luck.

The book is written in Adams’ usual fun and persuasive style, so it is a great read.

Of course, don’t take your advice from this middle-aged nerd, go figure it out for yourself.

h1

Reliability: The Rarest Quality

Tuesday, February 18th, 2014

Of all the qualities that make someone a good employee, friend, partner, or teammate, the most elusive is reliability.

A reliable person:

  • arrives on time.
  • calls if they are going to be late, BEFORE the appointed time if possible.
  • does what they said they would do.
  • pays what they owe, on time, in full, nothing less
  • holds their end of a bargain or agreement.
  • keeps promises.
  • makes good on broken promises, WITHOUT being asked.

It all comes down to respect. A reliable person shows respect to others and earns it in return. All relationships, personal and business, stand or fall on reliability. Lapses in reliability can be tolerated if respect is shown and understanding sought, but unreliability without apology or explanation is unacceptable.

This post is the result of months of personal and business interactions, precious few of which were marked by any acceptable level of reliability.

h1

Using Regular Expressions with SQLite

Wednesday, November 27th, 2013

SQLite is a great database tool that is available almost anywhere and is quick and easy to use.

I am currently using it for work I am doing for a client. I am writing a rules-based data validator in for a tab-delimited file using Perl on Windows. With SQLite, it’s simple to slurp the whole file into a database table and then query it multiple times to see whether columns conform to rules.

SQLite doesn’t quite come with a built-in REGEXP operator. I say not quite because it does alias REGEXP to a call to a function called regexp(re,str), however the function does not exist unless you provide it.

You can provide it by compiling a dynamic library extension (.so in Linux, .dll in Windows, .dylib on Mac), but my experience with that route was frustrating and bothersome. It’s only really necessary if you need to use SQLite with regular expressions from the commandline tool or a program outside your control.

Today I found out that if you are using SQLite in a program, you can provide the function in your own language!

Here is a simple example in PHP (it’s just as easy in Ruby or Perl or Python or whatever). Save this to dbtest.php and run it from the command prompt with ‘php dbtest.php’:

<?

if(! file_exists('test.db')){
        $db = new SQLite3('test.db');
        $db->exec("create table users (name varchar(10))");
        $db->exec("insert into users values ('Robert')");
        $db->exec("insert into users values ('Egbert')");
        $db->exec("insert into users values ('Dilbert')");
        $db->exec("insert into users values ('Ratbert')");
        $db->exec("insert into users values ('Dogbert')");
        $db->exec("insert into users values ('Umberto')");
        $db->close();
}

$db = new SQLite3('test.db');

// add the REGEXP magic to the db
function regexp($r,$s){return (preg_match("/$r/",$s)===1);}
$db->createFunction('regexp', 'regexp', 2);

// find names that start with a capital, two lowercase, then bert
$sql = "SELECT * FROM users WHERE name REGEXP '^[A-Z][a-z]{2}bert'";
$result = $db->query($sql);
while ($row = $result->fetchArray()) {
  echo $row['name'] . "\n";
}

/p?easy/ !

I would have thought it would be really slow, but I can run a REGEXP comparison against thousands of records and it’s plenty quick enough for my needs.

*Update*

I just added a CAPTURE function to SQLite that returns the first captured section of a string when you supply a regular expression with parentheses.

Here it is in Perl:

$dbh->func('capture',2,sub { my($regex,$string) = @_; my($capture) = $string =~ /$regex/; return $capture; }, 'create_function'); # get month from YYYY/MM/DD format where month or day could be one or two digits my $row = $dbh->selectrow_arrayref( "SELECT CAPTURE('\\d{4}/(\\d{1,2})/\\d{1,2}', date_created) FROM invoices" );

				
h1

Looking for a house in Brampton?

Tuesday, October 22nd, 2013

I recommend my house at 60 Foxtail Road. We’ve been in it almost 15 years and it’s nicely finished and well appointed. I’d keep it if I could take it with us.

60 Foxtail Road