Literature

I’ve been looking for a book on parenting and this one stood out from the others.

Bye bye NS Liberals…

So the ruling Liberal party took a big shellacking in yesterday’s election, which yielded a majority for the Progressive Conservative party in Province House. And of course liberal backers are now wandering in a daze wondering what went wrong. Well, wonder no more.

Rankin’s Liberals gave us nothing to vote for this year. I’d even say that they reminded me of that federal election that ushered in Stephen Harper in 2005 — apparently they just never even remotely considered the idea that people would not just blindly vote for them. But they made no substantive promises and ran on a record which was frankly pretty bad.

But, you will say, how about the province’s handling of the pandemic? Yes, the numbers have always been good. However, the government was never really the reason for that. Nova Scotia weathered the COVID storm mostly because it only shares a border with one other province, and because the economy is permanently depressed in this area of the country. Given that air travel is regulated by the federal government, there was only so much the provincial government could screw up. They did do a decent job, but there wasn’t that much to it.

On the other hand there was a lot to dislike about the Nova Scotia liberal party. They are kinda defined by their enduring fight against unions of all types. They waged very public wars on the nurses’ and teachers’ unions which lost them a lot of votes. They basically used arbitration and bad-faith negotiations to strip unions of real power and to limit workers’ rights in the province. This has gone on throughout the McNeil years, and Rankin had no plan to change that. So if anyone is afraid of the PC being right-wing on union issues, well, they can’t do much worse on this score than the government they replace.

Two more political decisions also took put the government in a pretty awful light. One of them was to eliminate the Graduate Retention Rebate, which was a tax rebate intended to keep people who had graduated in NS staying here to work. One of the big issues in the Atlantic provinces is that young people tend to leave the province as soon as they can find work elsewhere. To be honest I wish I had been more aware of this before moving here. The cost of living is ridiculous given the low level of economic activity compared to pretty much everywhere outside the Maritimes, and getting rid of the rebate pretty much ensured that the exodus of youth from the province was set to continue indefinitely. And then the government tried to eliminate the Nova Scotia Film Tax Credit, which was a pretty successful way of attracting film production to the province. Neither program really cost much in the bigger scheme of things but the government was surprisingly insistent on killing both. Eventually they had to back down on the film production tax credit issue, but it left the liberals looking like they were championing austerity politics over people, especially considering the province’s frankly poor economic position.

That being said, the two bigger issues that sank the Libs this year were education and health care.

In 2018 the government decided to unilaterally dissolve the province’s school boards (with the exception of the French-language Conseil Scolaire Acadien Provincial) and instead put all decision-making into the hands of the Education Minister. A provision existed for the creation of an advisory board but that board was to be entirely peopled by… the Education Minister. Also the government decided to break up the provincial teachers’ union by declaring that executive employees would no longer be part of the union, which is a pretty classic bout of union busting. Again there were big protests at Province House but since the government had a majority they bulldozed things through.

However the bigger failure of the Liberal government was in the area of health care. Ever since I’ve come to this province it’s been bleeding doctors. The government’s authoritarian tendencies has been leading doctors and nurses to leave the province in high numbers, resulting in 70,000 Nova Scotians being unable to find a family doctor. This doesn’t sound like much until you consider that the entire province has less than a million people in it. In a way it’s more symptomatic of the province’s more enduring problems — the cost of living is absurd, and to top it off we have the costliest electricity and taxes in the whole country. As a result it’s pretty hard to attract medical personnel. With each budget more money is allocated to cash incentives for doctors to come over, but inevitably they leave once the conditions of these incentives expires. This has serious repercussions for NS residents. Seeing a specialist can take a very long time, depending on the specialty. For women a gynaecological appointment is a 9-12 month wait. Seeing a dermatologist involved a 6 month wait. Thankfully I’ve not had to see many more doctors but it makes it very difficult to get things like my tinnitus taken care of.

Ultimately all the Progressive Conservatives had to do was promise investment into the health sector to tip the government. And that they did.

Ultimately the Liberal government’s downfall was due to themselves. They arrogantly began to adopt the “who else are people going to vote for” attitude and it’s bitten them solidly on the rear end. It’s not a shift to the right, just a changes of faces at the top.

Overthinking much?

I admit I’m guilty of overthinking things as much as the next guy, but it’s never been “is PAW Patrol authoritarian propaganda in disguise” bad.

Jonathan Pie

Here’s a prime example of why you should be following Jonathan Pie’s account on Youtube…

YouTube player

COVID-19 Numbers in Canada

I was looking at the number of active COVID cases in Canada when it struck me that because our population density really is all over the place a simple breakdown of cases per province/territory is just not telling the whole picture. So I just threw together a spreadsheet and settled for a “cases per 100k population” figure to get a better basis for comparison.

The number of cases is taken from this tally, and the population numbers from here.

Here are the results:

Provincepopulationcasescases per 100k
ontario1467790013959.50
quebec84945008039.45
bc510350079115.50
alberta4472800117326.23
manitoba138190049836.04
saskatchewan119510036230.29
nova scotia96710090.93
new brunswick77560081.03
newfoundland522300397.47
pei15740000.00
nwt4500000.00
yukon4130087210.65
nunavut3930000.00

You can draw your own conclusions from that.

Life Lessons

When you face a life-changing decision and think “what’s the worst that could happen”, it’s very important to actually answer the question before going ahead with the thing.

Of fractures, splints and other unpleasantness

My fractured hand

Unless you live with me, work with me or have me as a friend on Facebook you won’t know that I have accidentally fractured a bone in my right hand (as opposed to *intentionally* breaking it I guess).

I knew it was serious pretty much right away but hoped it was just a sprain, but as my hand kept swelling more and more it was quickly obvious that something more serious had happened. I went to the hospital, got an x-ray, and was told I needed a splint. I’ve had a splint to heal a pinky finger before, it was just a metal bar with foam on one side. I wasn’t so lucky this time and this splint was made of a large, heavy piece of plaster covering the outside of my right hand.

Now, I am right-handed. VERY right-handed. I could probably lose my left hand and not have to adjust my life much. I have NO fine motor skills in my left. In fact I remember from my early 20s incidents where I went to a book shop, selected a book, picked it up with my left hand, then realized that I had grabbed the book next to the one I wanted. So, this past 10-11 days have been a real pain in the ass. For those of you who have never temporarily lost the use of your dominant hand, here are a few things this affects:

  1. Writing. I have tried to write with my left. It just doesn’t work. At all. In a pinch, if my signature is required, I can manage to grab a pen with my right thumb and index finger and sign by moving my whole arm, since my wrist is immobilized. Anything more than that and it looks like I fell asleep in the middle of writing a word. It’s completely ridiculous.
  2. Typing. My left hand can carry on typing, but the best I can do with the right is to bend my middle finger down and type with that. This works and is not too uncomfortable, but my typing accuracy has gone to sh*t and I have to look at the keyboard all the time.
  3. Eating. I look like someone who’s never handled utensils before, or perhaps have some sort of tremor issue, but if I take my time I manage, as long as I don’t have to cut anything.
  4. Cooking. Oh boy. I always handle knives with my right hand, so that’s not going so well. My brain knows how I should hold a knife, but that knowledge fades sharply as the command gets to my left arm.
  5. Driving. Good thing I don’t still have my manual transmission A4. Driving an automatic is at least straightforward. Getting into and out of the car is a little arduous.
  6. Hygiene. That one’s tricky. Because I have this plaster splint I can’t just jump into the shower carelessly, I must wear a plastic bag , but that’s not so bad. I can take the splint off for short periods too but it’s a pain getting everything back on so I try not to do it. The more difficult aspect, and no one talks about this because it’s not a comfortable thing to talk about, is that wiping is surprisingly arduous. After all I’ve been doing it for what, 45 years the same way, but suddenly I have to re-develop the skill with a hand that’s extremely *gauche*. It takes a long time everytime, and if you combine this with my mild claustrophobia it usually means that I come out of the washrooms sweaty and somewhat flustered. That’s definitely something that gets taken for granted in normal life.

This is all good and fine, but by far the aspect of life most affected by this is my mood. People think that having this fracture hurts physically, but that’s very minor and more discomfort (from being immobilized) than pain really. Along with the cast it feels like I’m carrying a dark cloud over my head all the time.

It all comes down to having to live the life of a 48 year old, father to two including a rambunctious four-year-old, with a shocking lack of fine motor skills.

While I can still do pretty much everything that was a normal part of my life a mere two weeks ago, it’s like someone’s turned up the difficulty level on every single task. And while the difficuty itself is not insurmountable, but every little thing takes a little toll on my state of mind. I end up at the end of every day frustrated, bitter and angry. My ongoing depression isn’t making things any easier either.

So, what’s the point of all this besides venting? It reminds me of how important it is to be patient with people, because inevitably you have no idea what’s really going on in their lives besides the obvious. All you really know is your own situation, and oftentimes you’re not even fully aware of that. Stop judging and cut others some slack. Someday you’ll realize how much you need that yourself.

The power of a song

You know how sometimes you’re just going about your day in an oddly light-hearted way, and then something innocuous happens that puts you down in the dumps in a way you just can’t shake off?

So this morning I’m driving along to work and things are going fairly well. There have been no irritating slowdowns, and I was just about to turn into work when *that song* came on. It was No Doubt’s It’s My Life. Not the worst song in the world or the best, it was the kind of cover I often feel uneasy about because it’s so close to the Talk Talk original that it seems a bit pointless, a bit like Weezer’s Africa.

In a heartbeat I was taken back to the first time I heard that song. Let me take you on that little journey. Well ok, not so little, in fact this is probably the longest post on this site, but whatever.

The year was 2004, late June. 15 years ago although it feels like a lifetime. I lived in Hoboken NJ at the time. It was league pool night in the square mile (Hoboken is a small place) and my team was having a home match at The Quiet Woman. As I had walked into the bar that night it was obvious that most of the team were ill at ease greeting me. We were mostly a coworkers team, and 6 hours earlier I had gotten fired.

[Rewind noise]

Yes, fired. The saga had started about 3 weeks earlier on a Friday afternoon around 5. I loved those Fridays – me and a bunch of guys from the office would get together downstairs at Dorrian’s and get tipsy, then head over to a bar in Hoboken, typically Mulligan’s Pub. Beer would flow freely and it was generally a great start to the weekend.

I don’t know why I felt like I was in a hurry to get to the pub that day. I’ve replayed that day’s events over and over in my head a million times and there’s no reason besides my eagerness to get drunk with my work buddies like on any other Friday. I had been working on this piece of Javascript (I was a web developer at that place), something stupidly minor. When I checked the code into our SCCS the diff looked wrong, but I decided to ignore it.

Little did I know that this little screw-up would basically tear apart the life I had become accustomed to over the previous 5 years. Even now I feel enraged at myself for it. I don’t think I will ever forgive myself for that day.

What happened was that I had been working on an old, outdated version of the file, so when the new build was tested the UI was broken. I tried to fix it as soon as I was made aware, but the series of events I had set into motion ended up snowballing — for a highly embellished version of the story read this post on The Daily WTF which is loosely based on the story I myself submitted to Alex — and on that aforementioned Wednesday at noon my supervisor took me into a side office and informed me that I now had, er, unlimited vacation and no pay.

So, six hours later, we’re at The Quiet Woman having a drink. At that point I was still experiencing the other-worldliness and “lightness” you feel when the ground has completely disappeared from under your feet. It was the last league night for the season. We played our matches — I don’t have any recollection of them really — then we stuck around and had a few drinks while exploring the jukebox. We were losing two of our team members, man and wife — I so wish I could remember their names now but it’s been many years, and many rough years at that — because she was soon starting a new job in California.

That’s when that song came on. My brain, desperate to find something to occupy it instead of keeping on reminding me of how badly I had fucked myself over, just latched onto it, but I was drunk and 80s music had not yet made a big comeback so I couldn’t replace it. Only when I got home and looked it up on Google was I able to trace back the original, and the lady who was off to California IM’d me the name of the original artist within 5 minutes of that.

The next day I opted to walk around Manhattan. I spent part of the afternoon in Bryant Park, listening to the mp3 of the song over and over again, trying to read but making no progress. 4 weeks later I was moving back to Montreal because $1800 US/month in rent was just too much.

All this was going through my head this morning as I drove onto my current company’s lot and parked my car for the day. It instantly reminded me of how much I have fucked things up for myself, not just that one time, but so many times. It reawakened the bitterness and self-loathing I had put aside and yet so richly deserve. Since that time I have not had a job that paid so well as that, nor has my social life ever recovered from that loss.

And it’s all down to me.

A Technical Writing Tip

As a technical writer myself I’m often in a situation where I need to take a Word document and turn it into a Framemaker or XML-DITA package.

This is not usually a huge problem, except when there are a lot of images in the document (screencaps mostly). You see, Word incorporates images by copying them right into the document (embedding); with Framemaker it’s preferable to simply link the image as you would on a web page, and with XML-DITA linking is the only way to include images. If you simply import a Word document into a Framemaker document the images become embedded, but then you are limited as to how you can interact with those images. Scaling, particularly, does not seem to be supported for embedded images.

So you’ll want to get the images out of the Word doc and into separate image files. One way you can do this is to go through the original file, and every time you see an image right-click on it, then save the image file. This can be really time-consuming (and boring).

There is, of course, a better way.

This is not common knowledge but Word files are made up of several different, smaller files compressed together using the ubiquitous .zip format. So the trick to getting all the images at once is simply to unzip the Word document.

Here’s how to do this:

  1. Find your Word document in the windows explorer and change its extension from .doc (or .docx) to .zip.
  2. Extract the files to a new folder.
  3. Open the folder and navigate to the word\media subdirectory, then open it.

You should see all the document’s images there. They will have generic names which is semantically not the best, but on the plus side it’s then easy to figure out the order in which the images should be shown.

Consensus

At its core the blockchain is about several actors reaching consensus on what a valid block is. Each blockchain must choose its way of deciding exactly how that consensus is reached, and who can contribute to the search.

One of the better statements about the blockchain — and the Bitcoin blockchain in particular — that I have seen, and I wish I remembered when I read it, was something like this:

People think that the blockchain is all about solving incredibly difficult and complex equations, but the reality is that it’s like millions of computer shouting numbers across the internet until most of them reply “I agree”.

This sums up what happens with the consensus algorithm known as “proof-of-work” or POW. This is how the Bitcoin blockchain operates, and why you may read articles warning that it’s a huge waste of energy. With Bitcoin every miner is trying to come up with a single solution in the quickest time possible. If there are a million miners (an admittedly high estimate) then one may say that 999999 of these miners are wasting energy because only one will be the first to reach the correct answer. 

Of course that’s an absurd oversimplification. All the other miners on the network are also verifying the one correct solution that has been found, and are an essential part of the process. The more miners are online, the quicker the solution can be verified, accepted as correct by 50% + 1 of the miners, and appended to the chain. And the more miners there are the more remote the possibility that a brute force attack (the 51% attack) can even be attempted, let alone succeed.

A What Attack?

The 51% attack is the most elementary attack on a proof-of-work (POW)  blockchain network. If the consensus is 50%+1, then you can simply throw more miners on the network until you control 50%+1 of the global hashrate, and then you could rig the whole operation to enrich yourself by cheating, double-spending tokens, or making the network useless. 

With today’s cloud infrastructure it’s easier than ever to create hundreds or thousands of virtual machines in a very short amount of time, so this is not just a theoretical threat. It’s the most common mode of attack on smaller POW blockchains.

When it comes to these attacks, greater network size provides more protection. There’s very little risk of someone coming along and suddenly generating more hashrate than the rest of the bitcoin network. That hashrate, FYI, is currently hovering around the 50 million terahash per second. A terahash is one trillion of hashes per second, or (if my math isn’t completely off) roughly 5 quintillion hashes per second.

That being said, POW is a first-generation blockchain consensus strategy.  Newer blockchains can use a number of different strategies to establish consensus.

Cryptocurrency as a Reward for Mining

At the core of the idea of cryptocurrency is the idea of reward for work. 

For example, miners in Bitcoin all try to solve the same problem at once because whatever miner discovers the solution first wins a block reward. That reward is a number of Bitcoins. Initially 50 BTC were awarded, then it became 25 BTC, and now that number has been halved again to 12.5 BTC.  That is a substantial reward, even at this time. All the other miners get nothing. 

Proof-of-Stake

A proof-of-stake strategy operates with different assumptions. Instead of miners, the network is run by people who have previously invested in the network by acquiring its cryptocurrency. The idea there is that you need to have “skin in the game” to share in the rewards. For the blockchains that implement this, there is no block reward. Instead, fees are paid on the transactions on the network which is then distributed to the nodes that have registered a stake. To register a stake it must be placed in some kind of escrow.

With the POS strategy nodes that have a stake collect, package and encrypt transaction data and push it to the blockchain. Any actor’s participation is equal to the actor’s stake divided by the total number of staked tokens.

Delegated Proof-of-Stake

The delegated POS strategy takes that concept to the next level. In this system the stake-holders (stake-hodlers?) elect a certain number of their own to be witnesses. This is typically a low, odd number to avoid possible deadlock. 21 is generally considered to be a good number of witness nodes. 

Witness nodes are the only nodes that perform work (bundling and encrypting transactions) under this arrangement. Instead of earning a reward, witnesses are paid to ensure that their nodes perform the work.

These are the “big three” strategies at this time. There are other, less currently popular but not necessarily less valid strategies, like mandating that any one node on the network can only do work at certain time intervals, or where a number of nodes are chosen by lottery to perform work, and many more. The implementation details of each strategy can be wildly different.

The uptake on this is that while cryptocurrency saw the day thanks to proof-of-work blockchains, today the landscape offers many other possibilities which can be much more efficient than Bitcoin (which remains the gold standard). Less actors needed for consensus means less energy spent reaching that consensus, and also a much lower level of latency which allows for greater transaction throughput. 

To bring Bitcoin up again here, few people know that it’s a fairly slow network that has a typical ability to process maybe 5 transactions per second. Compare this to the Visa payment network, which can handle over 24000 transactions per second, and it becomes clear that if crypto is ever to see wide adoption as a means of transaction competing with Visa and other payment networks it needs to be a lot quicker.

And that’s today’s lesson.