Thursday, January 26, 2023

Danielle Smith's Magical Email Investigation

So, last week very serious allegations of the Premier's office attempting to intervene in the prosecutions resulting from the Coutts blockade last year. By Saturday, the Premier's office was going to "investigate" by reviewing the GOA e-mail servers.  On Monday, the Premier issued a "we found nothing" statement. 

There are more than a few problems with this approach. 

Monday, January 23, 2023

Spring Election?

Are Canada's conservatives lining up for a federal election this spring? 

Predicting such things is a bit like scrying, but there are signs that lean that way.  

First are some questionable polling numbers which show the CPC getting very close to minority government territory, even while their current leader seems about as well liked as half a worm in your apple. This combined with the NDP apparently riding high in the polls is interesting. Years ago, I realized that the conservatives in Canada only win when the NDP starts rising in the polling. (* I'm not going to spend time here on a detailed critique of Poilievre and Singh as leaders of their parties - that isn't the point of this post *)

I say that the polling numbers are questionable for a few reasons. First, the general sampling strategy for polling these days is increasingly problematic from a statistical methods perspective, and second it's getting increasingly difficult to access fundamental materials like the questions asked.  The latter issue makes it very hard to assess whether a given poll is done with "push polling" tactics or not. 

The recent election in Ontario was an interesting case of the headlines for months pushing a polling-based narrative that "the conservatives have it all sewn up, and sure enough, Doug Ford's OPCs won handily - with one of the lowest voter turnouts in years. The argument can be made that the media campaign was designed to depress the overall vote - which always favours conservatives. 

The next sign comes out of Alberta. In theory Alberta is heading into an election this spring with newly-minted Premier Danielle Smith leading the incumbent UCP. Except the UCP is far from "united", and Ms. Smiths first months in office have been plagued by a series of missteps on her part that have many wondering if she is even suitable for office at all. 

For the last couple of months, the Alberta government has been flailing about trying to pick a fight with Ottawa. First it was the so-called "sovereignty act", then it was over LNG exports, and most recently over the federal government's proposed "just transition" legislation. These "fights" are intended to tee up an easy win in Alberta for Poilievre, who will be able to simply say he will stop the feds from "blocking Alberta", and presto, the conservatives have an easy 20 odd seats. 

However, given the bizarre behaviour of Danielle Smith, a UCP victory in a spring election is anything but a sure thing at the moment. Therefore, while the UCP fosters squabbles with the incumbent LPC government federally (sucking up oxygen for real issues), a federal election would also serve as a distraction for an Alberta electorate fatigued by a constant rush of missteps and scandals on the part of a UCP that is barely holding itself together. 

So, the second sign of a potential election call is in fact the chaos in Alberta which both the UCP and CPC stand to benefit from. 

The third sign is perhaps more important - and it's the ramping up of rhetoric in conservative aligned news media. In particular, I'm poking at PostMedia here. Long a part of the conservative propaganda machine, PostMedia has been ramping up both in its content, as well as how it is promoting itself on social media like Twitter. 

A quick glance at the National Post's front page online this morning turns up 2 columns about "free speech" (mostly roiling around Jordan Peterson), two columns which are designed to whip up more moral panic over transgender people, a bunch of "the world is falling apart" articles based on Ukraine, a handful of articles implying that the Liberals are corrupt, and a few praising Doug Ford for "innovating health care" by privatizing it.  

I think you get the picture - the conservative media is now lining up to take a broadside shot at the Trudeau-led LPC, in hopes of tipping a few more votes their way. 

What's harder to read is whether there are enough votes in the opposition parties willing to topple the current government.  While the CPC and NDP might be willing, that's only 144 votes, and they need support from the BQ - and it's not at all clear to me that the BQ sees a gain in going to the polls at this time. 

Regardless, there are definite signs of a move to kick off an election this spring.  Whether it happens or not is another matter. 

Sunday, January 22, 2023

Joe Oliver and the Wand Of Economic Bamboozlement

In the Financial Post we find Harper era cabinet creature Joe Oliver expounding on the future of the economy - and the evils of "progressivism"

I'll give you a minute or two to read it ... 

Before we examine it more closely:

Let’s Talk About ‘Political Discrimination’

A few months ago, MP Garnett Genuis tabled a bill which would add protections to Canada’s human right legislation for “Political Belief”.  Then, as the Ontario College of Psychologists moved to discipline Jordan Peterson for spreading hatred, he started crying that this was political discrimination, that he was being “persecuted” for his “politics” (spoiler - he’s not).

This concept of “political discrimination” is really little more than another construct to tell the same people who tried to overthrow a government in February 2022 that their grievances are justified.  You will note that Genuis invokes the grievances over COVID, and Peterson tries to globally call his activity on Twitter “political speech”. 

While it is true that politics is always loaded with opinion, we need to recognize that politics can be reasonably informed by facts and evidence. Is Peterson calling a non-binary person “it” a matter of “politics”, or is it simply a mean spirited attack on the person? Are the protests against vaccines based in a sound understanding of the science? I am not going to argue the veracity of those claims here, they are provided to illustrate the issue being raised. 

Politics is a complex space, and it’s no secret that malign actors have been deliberately injecting disinformation and misinformation into our discourse for some time. It’s also not hugely surprising that conservative politicians here are often aligned with the propaganda. 

It is no surprise that it is conservative politicians pushing this narrative now. It’s convenient, it aligns with their ongoing campaign against Trudeau, and it further undermines public confidence in the institutions of democracy. It fits incredibly well with narratives like “the election was stolen”, and the narratives used to justify practices like gerrymandering electoral districts. 

I find it particularly interesting to note that this is coming from an Alberta conservative though.  Political discrimination has been rampant in Alberta for years. Decades of single party conservative rule long ago made it perfectly acceptable for all sorts of activity that could fall under the rubric of “political discrimination”.  

Stories of bosses telling their employees how to vote in elections have been a common occurrence in Alberta for years; an overtly aggressive form of conservatism has long made it very difficult to openly hold perspectives at odds with conservatism (or whatever is wearing that cloak today). Candidates have had their cars sabotaged, and having signs from other parties is also a good way to find your home vandalized.

I’m not saying any of this is good, rather that it is more than passing strange that conservatives are pushing this narrative today, when they’ve actively engaged in creating a political environment in Alberta that supports “political discrimination” for years - without moaning about it once.

Looking at our Charter, an argument could be made that Political Discrimination is in fact protected under a combination of fundamental rights.  In particular, the fundamental rights in S2. I do not think that it could easily be ‘read in’ under S15 because S15 is generally reserved for immutable characteristics of the person, and political perspectives are reasonably subject to change over the course of one’s life. 

To be clear, nobody who lost their job for refusing to be vaccinated did so over “politics”.  They lost their job for failing to comply with a new requirement. Yes, you can moan all you like about whether that’s coercion or not - but it’s not politics.

There are some interesting, and perverse consequences to introducing such a clause into our non-discrimination laws.  For example, political parties (who are employers), would suddenly find it much harder to get rid of an employee whose political beliefs no longer aligned with the direction of the party. Employers would find the murky waters of “political beliefs” being brought up in dismissal suits, and so on. 

In fact, the concept of “Political Discrimination” is so murky that it could be twisted into all sorts of forms.  That means it’s far more of a political weapon today than it is an actual tool. 

Saturday, January 21, 2023

Side Trip - Virtual Memory

It has come to my attention lately that the concepts around virtual memory and how your computer actually uses memory are not well understood by many people. What follows is a general description of what is going on when you are using your computer, and why at some points in time, your computer will seem to get really slow when there’s a lot of open processes.

1) The Physical

Your typical computer has two main types of storage:  Short term storage (Random Access Memory - RAM), and Long Term storage (the Hard Disk). Think of RAM as a great big whiteboard that is constantly being written on, and the Hard Disk as containing the contents of the whiteboard you want to keep as documents, programs, etc. 

A common computer configuration these days has 8 Gigabytes (Gb) of RAM, and 512 Gb of Hard Disk (HDD).

Then there’s your CPU.  Most processors these days are 64 bit processors which have an address space that is 64 bits wide, and typically work with data in 64 bit chunks called “words”.  A 64 bit address space means that the computer can address up to 2^64 individual memory locations - about 18 Exabytes.  Address space is the absolute addressable memory for the CPU.  18 Exabytes is 1024^6 bytes, and 1 Gb is 1024^3 bytes (a byte being 8 bits, and commonly understood to be the base unit of meaningful information in a computer) - so an Exabyte is an absolutely huge range compared to the physical address space of your computer.

2) The Basics 

Your computer’s operating system, whether it is UNIX, Linux, or Windows, play some interesting tricks.  Let’s say you have 8Gb of physical memory, and your processor thinks it has access to a lot more than that, how do we deal with that requirement?  The first point is that we don’t just let the processor address all 18 Exabytes of its address space - usually the motherboard address bus takes care of that for us - and that’s partially why most motherboards restrict to a maximum of maybe 128 Gb of physical memory. The size of board required to have a full 18 Exabytes of physical memory would be mind-boggling. (Not to mention the cost!)

That means off the top, your operating system has to play some tricks to let the CPU think it’s got more memory than it actually does. In UNIX and Linux systems, that’s usually done by setting aside a chunk of disk as a “swap” partition, Windows usually makes this a discrete file somewhere on the disk, but the effect is similar. 

The operating system then divides physical memory (RAM) up into chunks called “pages”, and it will move pieces of a process onto the swap partition in order to keep enough RAM available to facilitate the demands of active processes for memory. This process is often called “paging”.  So if you hear your technical support person saying “your computer is paging itself to death”, it basically means that the computer is spending all of its time moving stuff to and from the swap area, and you have either too many processes for the amount of RAM, or your swap is too small - sometimes both. 

The combination of physical memory plus swap is the total amount of virtual memory you have available. Of course, this will lead some to think “wow - so if I buy a terabyte of disk, I’ll have tons of available memory”.  That isn’t always true. Windows, for example is much more conservative with its swap, and too large a swap file can cause other problems.  In UNIX/Linux type environments a huge swap may not cause problems, but it won’t buy you much if you aren’t utilizing it all. Remember, swap is much slower than RAM, even with today’s solid state disks.  So using swap always comes with a performance penalty of some kind. 

3) The Kernel View

The kernel of your operating system treats memory as a great big heap.  When a process is started, it requests a certain amount of memory to run in, and the kernel does some juggling to make that happen.  If there’s lots of physical RAM available, chances are your new process gets its request fulfilled, and everything continues on its way.  

If, on the other hand, RAM is getting a bit tight, the kernel may look at the usage of other processes, and force some parts of other processes into swap. More cleverly written algorithms will examine how often the process is accessing a particular page, and only move parts deemed to be “low frequency” off to swap, gambling that the cost in time is “cheaper” than moving other parts. 

The kernel acts as a librarian here, it controls how much physical memory and swap space your process is allowed to occupy at any given time. It may even have specific limits so that no one process can consume your entire computer (and yes, one ill-behaved program really can ruin your day).  

4) The Process View 

There are some interesting aspects of virtual memory that affect your process as well. Virtual memory schemes also mean that every process will “think” that it has access to the entire computer.  In other words, each process will believe that it has access to the full memory resources of the computer.  In principle, that means you can have multiple processes that all want 8Gb of memory, and they will all think they have access to it all.

Even more intriguing here is that the processes will all believe they can access the full 64 bit address space of the CPU - which is utterly huge.  There are a lot of reasons this is beneficial, but those are mostly of interest to programmers.  

The process thinks it has all the memory in the world, but it’s up to the kernel to maintain that illusion.  That means the kernel sits in the background and moves parts of the program in and out of RAM from the swap area on your HDD.

If this sounds a bit like it’s “black magic”, it kind of is - few people have the experience to really understand the underlying code in the kernel without spending a long time in that space. 

5) Tying It All Together

In a Virtual Memory environment, the operating system kernel “owns” the physical resources of RAM and HDD, and makes your computer appear much bigger than it actually is by using a combination of RAM and HDD space (swap) to give your processes the illusion that they all have full access to the entire computer. 

You sacrifice a bit of long term storage on your HDD to make this work, and there is definitely a performance price compared to everything being in RAM, but overall you end up with a lot more flexibility in how you use your computer.  

Virtual Memory is what enables you to have a ton of PDF documents open, your word processor going, and your web browser all at the same time. Much of the time, the stuff you aren’t actively using is sitting on swap, and just enough is left in memory to allow it to become active when you switch to that process. 

6) What Virtual Memory Isn’t

Virtual Memory is not infinite - even when it seems so vast.

Virtual Memory should not be confused with “Virtual Machines” (VMs).  A virtual machine is a software abstraction of a complete computer - from hardware all the way to software. Just to make your life more interesting, a Virtual Machine may well have its own virtual memory system when it’s running, and your computer hosting it will subject that VM to the rules of your computer’s Virtual Memory system.  

7) What About Buying A Computer?

The rule of “the more RAM the merrier” still applies. If you have an option to buy 16Gb instead of 8Gb, do it. Software continues to grow in complexity and resource needs.  4 years ago, 8Gb was lots, now the floor is moving towards 16Gb.  (… and back in the 1980s, Bill Gates once quipped “640 Kb ought to be enough for anybody”) 

For disk drive, look for arrangements that will let you put the OS on one drive, and your files on another drive entirely. Today’s solid state SSD and NVME drives are awesome, but they do have a limited number of read/write cycles before they degrade.  Being able to swap out your operating system drive without losing your data is a good thing. 

… and for goodness’ sake - backups matter. Get a nice big external disk for backups and use it regularly.  

Friday, January 20, 2023

Let's Talk About "Time Theft"

So, this morning, I woke up to find the lurid headline "What is Time Theft, and Why Are Some Employers So Worked Up About It?" on CBC.  After reading it, I'm still spitting nails angry with the article and its suppositions. 

First, let's start with the general idea of "time theft".  Fundamentally, this notion has been around ever since the early days of the Industrial Revolution. Whether it's called "slacking off", "goldbricking", or now "time theft", it's the fundamental idea that if you aren't going full out 100% of the time at work, you are somehow "stealing time" from your employer.

The roots of the idea lie in a very old, feudal concept that you "owe" your employer somehow for the privilege of having a job, and the deep suspicion of the "nobility" that the peasants will do everything they can to short-change their "lord". In the feudal era, that was a very direct, tangible exchange. The "lord" was entitled to a percentage of your crops, or whatever it was you produced.

It works well when things are tangible and concrete. Work hasn't been that concrete since the end of the 19th century. The emergence of administrative workers, supervisory jobs, and knowledge workers very quickly started to erode the direct and tangible exchange going on. In today's world, where an increasing number of people are doing work that is knowledge work, the idea of of "time theft" is not only archaic, but downright wrong. 

Let me explain. Consider a software developer for a moment - it's a relatively new profession - only really in existence since the 1950s, and the struggles around measuring developer "productivity" are much better documented than in other domains I can think of.  At first, it was mostly seen by management as some kind of voodoo, and programmers pretty much got to do as they pleased without oversight because there was no understanding of what exactly they were doing. Then various attempts at "managing" things crept in - setting deadlines around projects, trying to "estimate" how long it might take to do particular tasks, and so on. 

None of this worked particularly well for a variety of reasons, but perhaps the most notorious attempt at measuring productivity came in the form of "Lines of Code".  Basically, the idea there was that the programmer was now being measured on how many lines of code they wrote in a day.  Except that turns out to be a terrible metric because a lousy programmer can churn out hundreds of lines of absolutely useless code, and a talented programmer might only turn out a handful of lines, but they would be robust and reliable. 

The observation that comes out of this is that a lot of "work" happens in people's heads, and doesn't necessarily mean that it's "stolen time".  I've had many times where I have spent hours thinking a problem through only to find that the solution was a handful of lines of code - or even a mere few characters in one line of code. In the time I was thinking about the problem, I might get up and go grab a coffee, go downstairs and grab a snack, vacuum the rugs if I was working at home, etc.  None of that is "stolen time" per se, even if the monitor boss thinks I wasn't "working".  

The argument being made is essentially that "doing anything that benefits you" while "at work" is somehow "theft" because you're being paid for it.  In the context of working from home, that means that doing things like starting a load of laundry, or running a vacuum over the floors is somehow "stealing" from your employer.  The reality is that those "thefts" of time always happen, whether one is working at home or in a formal office. What do they think those conversations in the water cooler, or in a colleague's office amount to?  It doesn't mean that productive work isn't happening, it means that the person is taking a break in order to be able to finish thinking something through. (and yes, thinking something through often means giving the brain a rest)

This is basic human factors stuff. Whether you are working at physical tasks, or doing something that is more abstract, it's necessary to take breaks, do other things for periods of time in order to maintain productivity. You could argue "well do something else, just as long as it's work related".  Except that's not how people function. 

If the tasks of the job aren't getting accomplished, you might have reason as an employer to address with the employee whether or not they are doing their job.  However, especially in knowledge work, or other kinds of labour that is now possible to do remotely, we have to recognize that current approaches to tracking productivity are mostly garbage. Intrusive technologies like activity logging are arguably abusive, and make the same error as the old "lines of code" metric, and "a bum in a chair" is similarly a less than useful way to track someone's working habits. 

We are also a long ways from the days of it being practical to directly oversee the work going on - far too much of the work in today's world is abstracted by technology, and more and more of the physical work is being automated to the point that those jobs are gradually disappearing. (Yes, this is a problem, but it's another issue entirely).

Employers are essentially demanding absolute "loyalty" from workers, but offer little in return except a paycheque at the end of the day (and if the employer goes bankrupt, workers are at the end of the line for creditors - another part of our system that is broken). Arguably, employers who refuse to pay their workers a living salary, or engage in active wage suppression games, are themselves engaging in a form of theft from their workers. 

It is high time for a new compact between employers and workers, and this one has to be legitimately reciprocal. It has to be built with a less cynical view on both sides. 

Wednesday, January 18, 2023

In Response To A Comment

The previous post on the actions of conservative legislators attacking the fundamentals of democracy brought the following reader comment that I wish to address in more detail.

The comment itself reads as follows: 

In the case of Scotland's Gender Recognition Act, it should be up to the national government to protect the rights of women, and not simply throw them under the bus to satisfy a smaller, vocal group. Canada, on the other hand, simply threw women under the bus while claiming to be feminist. You might find that reading the Cass Report would be helpful in understanding the situation in the UK. You might also notice that in the UK, Stonewall had free rein for years mis-informing businesses and governments about what the law actually said. Housing male rapists in female prisons (generally the rapists are white, and the overwhelming number of women in Canada's prisons are aboriginal) should be considered outrageous. Having women forced to share spaces like change rooms and hospital rooms with men is definitely a loss of women's rights. https://www.youtube.com/watch?v=_2xhZm9f8t4 Gender Ideology Destroying Women's Prisons with Heather Mason - Life Through a Distorted Linds - YouTube. Article 25, fourth paragraph, and Article 29, second paragraph, of the 1949 Geneva Convention III provide that in any camps in which men and women prisoners are accommodated together, separate dormitories and conveniences shall be provided for women. In Scotland, men then "detransition" after serving time in women's prisons https://www.thetimes.co.uk/article/trans-prisoners-switch-gender-again-once-freed-from-womens-units-qjjsd0nlx The left SHOULD be outraged, but will not look at any of the details of the idea of self-ID.

This is broadly off-topic relative to the point of the post, but it warrants being addressed in its own right.  If you're feeling brave, read on. 

Danielle Smith's Magical Email Investigation

So, last week very serious allegations of the Premier's office attempting to intervene in the prosecutions resulting from the Coutts blo...