Going to Traffic Court During the Pandemic

I was ticketed during 2019 for a minor offence in my neighbourhood. I requested a court hearing at the time and had an original court date set in the spring of 2020. Of course this coincided with the beginning of the Covid-19 pandemic, when almost all provincial services have decided to shutdown to adhere to the pandemic closure.

Throughout the remaining months of 2020 there were many emails and phone calls with the court services for me to find out the rescheduled date. After more than three follow up calls and many emails I finally received a “virtual” court date for March 17, 2021, earlier this month.

Let me detail my experience of my traffic offence virtual hearing. Hopefully you will find this useful in case you have to go through a similar event.

The meeting was conducted with Zoom. I have used Zoom before so I was pretty comfortable with the format and functionality. I joined the meeting 15 minutes prior to my scheduled court appearance. After waiting for a couple of minutes a prosecutor appeared and pre-registered me and briefed me to what will happen. The most important information is to mute your mic when you are not talking, and unmute when you are talking. I also had to remind myself to address the “Justice of the Peace” as your Worship.

I learned something new with Zoom during the session. Zoom has the ability to create rooms and the prosecutor can move individuals from one room to another. When I first joined Zoom, I was automatically sent to a virtual waiting room. Once the court room is made available, I was then transferred to the virtual court room. I thought this was a pretty good coordination and worked very well.

Once in the court room, the experience is pretty standard. You get to hear in great detail all of the other hearings that were scheduled with the same court room. There were more than 10 other individuals that were scheduled within the same time slot. I had to wait for about 40 minutes before I was called up by the prosecutor. Her Worship was very friendly and accommodating and my session did not take more than 10 minutes to conclude our business.

We reached a mutually agreeable arrangement, and I proceeded to pay my offence on paytickets.ca the next day. Overall it was good to get this monkey off my back without having to visit a physical court during the pandemic. The experience was more streamlined than I thought, so kudos to the Ontario Court Services.

Windows 10 on Ubuntu 20.04 with VirtualBox

It is tax season again in Canada. In the past I had a VirtualBox virtual machine that I would only bring up for the purpose of running the Windows version of TurboTax because the member of our family who files the taxes dislike the too simplified online version.

Unfortunately VirtualBox refuses to come up on macOS BigSur due to new security considerations enforced by macOS. The new System Integrity Protection (SIP) disallows the kernel extension required for VirtualBox. Instead of going around SIP via the crsutil disable command, I decided to move all of my virtual machines that is currently sitting on my Mac to my Ubuntu NAS, since the Ubuntu box is up 24 x 7 and should be more convenient.

Below is what I had to do on my Ubuntu 20.04.2 LTS server.

Add the apt source where we can get VirtualBox.

sudo wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

sudo apt update

Install Virtual Box and our user to the vboxusers group.

sudo apt install --yes virtualbox-6.1
sudo systemctl status vboxdrv

sudo usermod -aG vboxusers $USER

We then need to install the extension that enables RDP. The virtual machine is going to be hosted on a server without a graphics user interface, so we have to use a Remote Desktop Client (from Microsoft) on another machine (e.g. my Mac) to gain access.

VBOXVER=`vboxmanage -v | cut -dr -f1`
wget -P /tmp \
https://download.virtualbox.org/virtualbox/$VBOXVER/Oracle_VM_VirtualBox_Extension_Pack-$VBOXVER.vbox-extpack

vboxmanage extpack install /tmp/Oracle_VM_VirtualBox_Extension_Pack-$VBOXVER.vbox-extpack

I tried to import my existing Windows VM without much success, so I decided to create a new one from scratch and reinstalled Windows 10 Pro.

vboxmanage createvm --ostype Windows10_64 --basefolder "/home/kang/VirtualBox" --register --name "win10"

vboxmanage modifyvm "win10" --memory 4096 --nic1 bridged --bridgeadapter1 em1 --vrde on --vrdeport 3389

vboxmanage createhd --filename "/home/kang/VirtualBox/win10/win10.vdi" --format VDI --size 100000

vboxmanage storagectl "win10" --name "SATA" --add sata

vboxmanage storageattach "win10" --storagectl SATA --port 0 --type hdd --medium "/home/kang/VirtualBox/win10/win10.vdi"

vboxmanage storageattach "win10" --storagectl SATA --port 15 --type dvddrive --medium /home/kang/VirtualBox/en_windows_10_consumer_editions_version_2004_updated_feb_2021_x64_dvd_f42b7d6d.iso

vboxmanage storageattach "win10" --storagectl SATA --port 14 --type dvddrive --medium /home/kang/VirtualBox/VBoxGuestAdditions_6.1.18.iso

Note that I had to pre-download the Windows 10 ISO and VBoxGuestAdditions ISO files. The guest additions iso file was available from this site.

https://download.virtualbox.org/virtualbox/6.1.18/

For some reason my motherboard did not have the cpu virtualization mode enabled, so I had to do that with my BIOS settings. It was cryptically called AMD SVM (secure virtual machine).

I started the virtual machine with:

vboxmanage startvm win10 --type headless

However, I had issues with remote desktop. I had to set some permissions with the VirtualBox extensions. The following commands were executed to create a user and its password for Remote Desktop access.

vboxmanage shutdown win10 

vboxmanage setproperty vrdeauthlibrary VBoxAuthSimple

vboxmanage modifyvm "win10" --vrdeauthtype external

vboxmanage internalcommands passwordhash YOUR_PASSWORD
Password hash: 1ffc0406b9891fcd265a225e83a668fa045f1282588f80c8d11c029bad156d85

vboxmanage setextradata "win10" "VBoxAuthSimple/users/tax" 1ffc0406b9891fcd265a225e83a668fa045f1282588f80c8d11c029bad156d85

Now, I can access the VM through Remote Desktop from my Mac. I continue through the process of installing Windows 10, and the VirtualBox guest additions.

The rest is pretty simple. Install Chrome, Buy TurboTax for 2020 tax year, and we are all set!

One final note, I shared a macOS folder to the VM using normal SMB protocol, so that once my taxes are completed, this VM is a throw away, until next year!

The Day After: Installed a security update in regards to virtualbox-dkvm and VirtualBox now refuses to boot from any bootable iso. I gave up and used Parallels on my MacBook Pro. I may try kvm later.

Covid-19 Vaccine Appointment

Today marks the opening day at York Region where appointments will be taken for covid-19 vaccine appointments for people who are 80+ years of age. We were instructed to visit the following link (york.ca/covid19vaccine).

Since both of my parents are within this age group, I proceeded to the site this morning at 8am sharp to book their appointments. No surprise, the site was not available and I saw this:

At around 8:10am, the site was finally active. It was not immediately apparent to me how to book the vaccine, but after more reading, menu hunting, and a few clicks later I finally figured out. I had to choose the location first and then proceed to book an “activity” at that location.

At first, I was delighted to find out that there were hundreds of spots available at Richmond Green, a community facility just 10 minutes walk from our place. Unfortunately, when I proceeded with the booking, I had to create an account first. By the time I created the account, all the spots at Richmond Green were gone, and I had to book elsewhere. At around 9am, all spots from all locations were gone.

My advice is that if you don’t have a york.ca account now, go and create one before you make a booking.

Below is a video that may be useful to others showing how I navigated their web site to get to the booking. Good luck with your bookings!

The Objective Fascade

Objective, impartial, these are words that media outlets use to convince the readers or viewers that they are providing you with the facts. However, do not forget that the ones who is doing the reporting, in the West and East, performs a selection and interpretation on what they report. This may be intentional but is also natural. The selection of stories and their context is very difficult to get right even if they wanted to.

The only way to attain more objectivity is to broaden your own consumption of news media from multiple sources and with multiple perspectives, just like in the court of law. Placing any central trust in a single media outlet is misguided, in my opinion. Unfortunately this will require those of us consuming news to be critical, which I don’t believe as a population we are ready for.

One key area of critical thinking is your own personal knowledge base. This is of course your own experience but also your education. Just like many courts depend on precedence (history), as individuals we also need to continuously update ourselves so that we can be better judges ourselves. If we surrender this right of making our judgement then we become followers and at the mercy of other judges, like media outlets.

Weaponizing Social Media & Revolving Governments

If you asked me 10 years ago, I would be a strong proponent of democracy and how the Internet and social media will harmonize and amplify our inherent goodness of the majority and make the world a better place. Of course, I can see this is now totally incorrect. I now see modern mass media technology is being weaponized to promote ideas that benefits those who want to seek or stay in power. Perhaps I would further suggest that any communication advancements will ultimately be utilized in such fashion. Think about how consumer marketing has evolved with communication tech.

When you couple the power of what I described above with the modern liberal democracy ideals of, “everyone should have a voice”, you have a perfect storm fostering opposing, divisive, and influential views, which creates ever growing friction in the efficiency of governing within a democratic process. Decisions at the grass roots levels tend to be more emotional and less pragmatic. The current pandemic reaction from the liberal West can be viewed as a barometer of this effect. Also the leadership is representative of a mass emotional breakdown.

Recently I have become blasé to the instruments of government. Instead of focusing on how a government should work, we should treat it like a product which we the people all consume. Is it a good product and are we happy with it?

People are advocating or dear I say “preaching” one form of government as better than another instead of looking at the actual results of governing and people’s livelihoods. If you look at it from a high enough level, I come to the realization that modern advocacy of liberal democracy has become a religious crusade, one that seeks the conversion of all non-believers.

I am now toying with the realization that governments like all products will evolve or revolve on the changing needs of the consumer. I am not saying a simple change in leadership of a static system, but a massive reformulation of the government itself.

Perhaps we as a race have already figured it out, and the solution is already naturally practiced. Instead of our myopic planning horizons of every four years, or a life span, perhaps the fabric of governance is working through generations.

In essence every government is a crude form of true democracy. Everyone has the ability to vote, of sorts. When life gets too tough to tolerate and you blame the government and leadership for it, you vote by rebelling. This mechanism is of course called a revolution. Instead of an election that temporarily appeases the mass population, the mass population revolts and overturns the government and reinvents it. Social content settles to a new way of governing and the population is content until the next revolution. There is a natural social contract between leaders and those being governed. The votes will truly matter because they are being offered by sweat and blood, and not some, “going through the motion of an election turn out”.

So if you look at it from this granularity, it is somewhat immaterial to continue to debate on which type of government is a better or best government. The people will ultimately decides which government is best for them over the course of time.

In between revolutions, and we don’t feel like “voting / rebelling”, the best we can do is to play the current game that was established in the previous revolution.

Having said all of this, I do think a hierarchical structure of leadership properly established through merit vs a representation of a popular vote is probably more stable and beneficial. A party is in the depth of hypocrisy when it preaches for democracy that is infrequently practiced at intervals of spanning from 2 to 6 years, while we all goto work under a hierarchical structure with clear master/slave relationships for the majority of our working hours of our day.

Notes: I wrote the above in response to a Quora post here.

Trying out Apple Fitness+

I’ve switched to indoor cycling since mid-November when it got too cold and windy to perform an outdoor ride.

My indoor routine is to typically hop on my road bike which is affixed to a trainer (Kinetic Road Machine), and watched an Electronic Dance Music (EDM) filled with either English or Chinese dance mixes.

For each workout, I do my own HIIT sessions that usually last for about an hour or so. A typical session looks something like this recording on Strava. I try different things on different rides. Sometimes I do 1:1 intervals, sometimes I do 1:4 intervals on rest days, and other rides I do pyramid build ups, etc. I try to do an hour and at least for 45 min. The intervals can be between 30 seconds to 5 min depending on how I feel.

Yesterday Apple released their Fitness+ service. Since I’m part of their Apple One subscription, we get the service along with the subscription, so I figure I give it a go.

Today, I did two workouts, one 45 min with Emily and another by the same trainer for another 20 min. I think these workouts are nice for those who wants to get moving, but I personally found it hard to my liking.

The trainer is motivating, and upbeat. The workout is of a lower cadence than I am use to. The only lead in that you get is from the trainer, so there is no visual cue to help you with the next set of effort, or prep you how much rest you are going to get before the next hard effort. I also missed the power and cadence reading on the screen. For those measurements, I have to look down to my Garmin unit.

In short, at least for cycling, these programs are not going to replace Zwift and TrainerRoad. They are good for those who want to replace their typical gym classes. I may give other forms of exercises a shot later on.

Overall I think many will like the service. The integration with Apple Watch is pretty seamless and super friendly. However for cycling, I’ll probably continue with my EDM videos.

Covid-19 Alert App and Scheduling Tests

The Government of Canada has been recommending the Covert-19 Alert App for quite some time now. This is an app that is installed on your smart phone and in a confidential, and anonymous manner, logs proximity interactions between your phone and other phones without sharing any elements of your personal identity or confidential information. If users of the app ended up testing positive for Covid-19, it is up to the users to share their diagnosis with the app in a confidential manner. Once the diagnosis is shared, all the historical phone interactions within the last 14 days that were within 2 meters for 15 minutes will be notified. This in theory should expedite contact tracing with other exposed users.

Any users receiving a notification should get tested before interacting with others or self-isolate for a period of 2 weeks, so I assumed.

I recently schedule a Covid-19 test on behalf of a friend who received such a notification. However, the person who is registering the tests, try to persuade me that a test may not be necessary. Although this person may be correct under certain circumstances, I personally think it is the wrong message to send. First I don’t think the user who is at risk should judge in which circumstances a test is not required. That is simply too much to ask.

I detected a tone of mistrust on the app itself. The person told me the app is “unreliable”. Being in the app business myself, I was curious as why it is unreliable, so I asked the person. They said that many people get an alert because they recently visited a hospital or other high risk areas. I stopped my questioning there, because I did not want to offend the very person who I want to schedule a Covid-19 test with, but in my mind, I am yelling, “WHAT THE HELL! That is precisely the point!”

The idea is to detect a level of risk, and if the threshold (within 2 meters for 15 minutes) is exceeded, then it is best to get tested so that we prevent a possible walking virus breeder. What am I missing here? Instead I get the feeling of, Covid-19 tests are extremely precious, and you should not waste them. The interface that we are using to schedule a test, is discrediting the Covid-19 Alert App, which I think will hinder the prevention of virus spread.

If I did not continue to persuade her that a test is necessary, she could have convinced me not to take the test. This could potentially be poor judgement risking exposures to others.

This is why we do not have this under control people! Our prevention protocols are like sifting baking flour with a tennis racket. This is absolutely crazy!

Getting Tested for Covid-19

Last night I received a call from the vice-principal of one of my son’s high school. They indicated that my son had an indirect contact with a Covid positive individual. That individual was not a member of the school, but is a family member of a classmate.

As a result of this discovery, his entire class now requires isolation and a Covid-19 test is strongly recommended.

Mackenzie Health, located on 10 Trench St., Richmond Hill, ON. is about 10 minutes drive from our house. It just so happens they have a Covid-19 Assessment Centre there. In Ontario, all Covid-19 tests are conducted at these assessment centres, and at the time of this writing, an appointment is required.

I called 905-417-2004 at 8am sharp this morning and ended up first in the queue to make an appointment. I had my son’s Health Card ready, and is the first thing they ask for. They have all of our information once I gave them my son’s Health Card number. They collected his email address so that they can register him through MyChart, an online site where you can get your test results once it is ready.

If you are already a patient at Mackenzie Health, and already have a MyChart account, you can schedule a test online without having the need to call in.

The appointment was for 4:20pm this afternoon, and we arrived at around 5 minutes early. We park in the A-Wing parking lot. They will give you a voucher / ticket to get out of the parking lot, so you do not need to pay for parking.

Here is a top down satellite photo to show precisely where you need to go and park and where the walk-in entrance is.

Satellite Photo (Up is North) – click to enlarge

There was only about 2 to 3 groups ahead of us in line, so the wait was a matter of couple of minutes. At registration, they ask you to change your mask to the ones they provided. The test was completed in less than 15 minutes. They had 8 stations performing the tests in parallel.

The cotton swab test was a bit uncomfortable for my son. He characterized it as a bit of a burning sensation afterwards.

Overall the process is fairly simple and straight forward. Now we await the good news in 2 to 3 days.

Adding Ceiling Fans to HomeKit

I have two legacy ceiling fans in the house. One upstairs and the second in the living room. Both uses a radio frequency remote control. I could replace the fan or its remote control units to be more “smart”. However, I found out about this Bond Bridge product, which acts a WiFi to RF bridge for these products. Both my Hampton Bay fans are supported.

Hampton Bay Fan

I had some issues setting up the Bond Bridge to my home WiFi network, but their customer support was extremely helpful. After setting up both of my fans on the Bond Home app, and tested the light and fan speed controls, I integrated the Bond Bridge to my Homebridge server on my NAS.

I had to use the homebridge-bond plugin, which by now I was old hat in setting up these homebridge plugin’s. A quick edit in the homebridge configuration file as instructed by the plugin, and I can control the fans with Siri and the HomeKit app.

Next step is to probably wait for Black Friday and get 2 HomePod mini, one for upstairs and one in the basement, so that our voice commands can be picked up throughout the house. All common accessories save the basement has now been integrated into HomeKit.

Converting iPhone 12 HDR Videos to SDR with FFMpeg

In a previous post, I talked about how to view HDR (High Dynamic Range) videos from the iPhone 12 on my OLED TV. However, sometimes I like to take that HDR video and converted into SDR (Standard Dynamic Range) videos for posting or distribution.

During the course of experimenting with FFMpeg, as the primary tool for this purpose, I found out that it is not always necessary to convert the video depending on where you are going to use the video. For example, uploading the raw HDR footage from the iPhone 12 to YouTube works just fine. However posting HDR video footage to Instagram currently yields a very washed out result.

I personally prefer to store all my raw footage in its high resolution 4K HDR goodness. However, I also keep a rendered down SDR version for practical use. How does one get an SDR video from an HDR source? This is what FFMpeg is for.

All the command line instructions below have been tested on the macOS, and it is assumed that you already have brew installed.

You will need to install a version of FFMpeg that has the zscale filter. If you have a previous version installed without this filter, then you will have to uninstall it first.

brew uninstall --ignore-dependencies ffmpeg

And then we install the version with the filter from the homebrew-ffmpeg tap.

brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac --with-libbluray --with-libbs2b --with-libcaca --with-libgsm --with-libmodplug --with-librsvg --with-libsoxr --with-libssh --with-libvidstab --with-libvmaf --with-libxml2 --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-openssl@1.1 --with-rav1e --with-rtmpdump --with-rubberband --with-speex --with-srt --with-tesseract --with-two-lame --with-wavpack --with-webp --with-xvid --with-zeromq --with-zimg

I recorded a sample video from my iPhone 12 Pro, below is the raw footage.

The included videos in this article are all HEVC encoded. If your browser does not support this encoding, then you will not be able to play the videos. Safari has no issues. If you have Windows 10, then you can install an extension. How the videos are displayed also depend on the quality and capability of your monitor.

Raw footage from iPhone 12 (4K HDR 60fps) – 92M in size

If you just perform a simple conversion, you will get the washed up version:

ffmpeg -y -i raw.mov -map v:0 -map 0:a -c:v hevc -preset veryfast -tag:v hvc1 -c:a copy sdr_washed_out.mp4
Simple conversion without filters gets a bland result – 5.8M in size

The HDR colours have to be appropriately mapped using some filter trickery with FFMpeg. I found these filter settings about two years ago when trying to convert HDR videos from YouTube in the BT2020 space to BT709. Below is the set of filters used:

ffmpeg -y -i raw.mov -filter_complex "[0:v]zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p[v]" -map "[v]" -map 0:a -c:v hevc -preset veryfast -tag:v hvc1 -c:a copy sdr.mp4
SDR result with filter – 5.6M in size

As you can see the SDR version with filter is a lot closer to the original one.

These FFMpeg conversions require a lot of CPU horse power, so beware that they will take a long time. Let me know if there is a better way, as I’m always open to optimize this workflow.