h1

End of an era

January 8th, 2015

Please celebrate with me the FINAL time I will have fixed a Windows machine for anyone, anywhere. It will not happen again unless they want me to fix it by installing another operating system on it.

Over 48 hours ago I reluctantly took on the task of restoring a Windows 7 netbook to factory settings. Of course, this process restores Windows 7 Starter Edition to its installation state circa 2010.

The first thing I did was remove all of the preinstalled software, including McAfee and Norton Backup. Then I installed Microsoft Security Essentials and began the long, slow process of system updates.

After the first day of fighting a single stalled IE11 update, I changed to “important updates only”. Over two days later, I have ONLY JUST NOW succeeded in getting all the windows updates installed.

For the first time, cpu is at 1% (was mostly pinned at 100% on both hyperthreaded halves of the Atom cpu for 2 days) and memory is at 581 MB (was over 900MB until now).

Starting Firefox “only” takes 10 seconds, starting Skype “only” takes 15 seconds. Luckily it won’t be used for much else.

I will recommend that my aunt takes a picture while it’s still in pristine working order if she wants to remember this moment, for it will be fleeting.

h1

When a textbook is not a textbook (redux)

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?

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

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)

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

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

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?

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