Corona – devilish dilemmas

This blog is just based on my own opinion, as a software engineer I do not have the qualifications to have a professional one.

The situation

Corona has arrived. The world has dodged the bullet with SARS and MERS, but the third time seems to be the charm, and a pandemic is rolling around the globe as I type this. Corona isn’t like the zombie virus from the movies, it’s closer to a standard influenza flue, except that the human world population has never encountered it before and thus no one has any immunity. The infection rate is higher than that of influenza.

Let’s examine some rough numbers, they don’t need to be exact for the point I want to make. Experts seem to agree that 60-70% of all people will get the corona virus. Given a country like the Netherlands with just over 17 million people, that will mean around 11 million people. About 80% of those will only get mild or moderate symptoms, which can go away in 3 days, but can also last up to two weeks. In any case no hospital care is required. It’s the remaining 20% that is the cause for alarm, because those need medical care. And with 11 million infected people, that would mean over 2 million people will be in the hospital. But our country only has 37.000 hospital beds. Total.

Now, those two million people will not become sick all at the same time, but assuming the severe cases are sick for two weeks, than we have 4 million hospitalbed-weeks to handle. This means that given the current capacity, we need 108 weeks worth of these 37.000 beds. Or in other words: we need to spread out the sick people over more than two years. And that is at 100% hospital capacity; there is no room for anything else in the mean time; no accidents, no cancer, no nothing.

Okay… So that is not going to work out. At all.

Continue reading “Corona – devilish dilemmas”

Scheduling things on a Tesla using Azure pt. 5; parsing the action

We’re down to the last piece of the puzzel; calendars are examined in a regular interval, we can tell the cars what to do, but those two need to be connected.

It is very practical to quickly see in a calendar what will be happening, and the summary field of an appointment is rendered in any view, so that is the best field to use. Other fields like description are often only visible in a detail view. Below is how I’ve currently setup my Tesla this February (which is winter).

My car goes into a security cam mode every night between 2 and 6 am, by activating sentry mode at home. And I’m making sure the doors are locked and the sun roof is closed. I could also schedule charging at that time, but I want my car to be fully charged ASAP. At weekdays I’m preconditioning the car early in the morning, which means heating up the battery and the cabine. We have a lame winter this year, so that suffices to remove any ice on the windows, but if it were really cold I’d put in “defrost”. You can see that my current schedule takes me to a different project on Tuesdays, with less driving time, so I can leave later.

Continue reading “Scheduling things on a Tesla using Azure pt. 5; parsing the action”

Political correctness

Now I’m really going off the deep end with respect to what this blog is supposed to be about. But since it is a personal blog, I’m allowed to do that. And it is something I seem to run into more frequently: political correctness.

The trigger for this blogpost is the newspaper of this morning; school changes “carnaval” to “dress up party”, because carnaval is a faith related festivity (Roman Katholik to be exact) and they are a public school.

Really?

Carnaval may be faith related, but it’s not like they are not going to celebrate it. The whole southern half of our country does, Katholik or not, and it’s simply called carnaval. It has to have a name, you know, so people know what you are talking about. Dress up party is what children do, carnaval is something quite different.

By now we’ve changed the name of pastries; “moorkop” became “roomkop” because it referred to someone with a dark skinned head, and yes, it is made with dark chocolate. We’ve undarken black piet into someone with smears. And the list goes on and on. Everything needs to be politically correct nowadays, so that no one can be offended.

There’s a lot of whip-cream inside
Continue reading “Political correctness”

Scheduling things on a Tesla using Azure pt. 4; Google calendar

Having made good progress on the Tesla side of the implementation, it’s time to take a look at how to implement the calendar integration. But first, let’s examine why to use a calendar in the first place. After all, there are many solutions that implement similar functionality, for example using timers (like Tesla does in the car).

Personally, to be honest, I would be totally lost if it were not for a digital calendar. Google calendar to be precise. I forget things, so I register everything in it. Not everything needs to send out reminders, but just not forgetting that my son has his basketball training every Tuesday and Thursday evening, prevents me from making some kind of commitment that will cause conflicts.

In other words: my life is in that calendar. That means also the things I need to get into my car for. So my calendar seems like the perfect place to also administer when I need my car to prepare itself for driving, by defrosting or whatever. And if an appointment changes, I immediately see that that part also needs to change. Like generating documentation from code.

Continue reading “Scheduling things on a Tesla using Azure pt. 4; Google calendar”

Scheduling things on a Tesla using Azure pt. 3; the Tesla API

In the previous post we took a look at how the initial just-for-my-own-car implementation was refactored into a version that supported many cars using a database instead of hardcoded values. It also showed that the LogicApp based implementation lost its merrits, and everything was moved into Java code. In this part we’ll take a look at the Tesla API that is used to make the car do things.

Continue reading “Scheduling things on a Tesla using Azure pt. 3; the Tesla API”

Scheduling things on a Tesla using Azure pt. 2; from one to many

Some time has passed since my previous post about fixing the issue that a Tesla does not allow scheduling preconditioning (de-icing) the car prior to a drive in the winter. The original post used an Azure Logic app as its core.

AzureLogic

What you see above is a Logic app for my car only; the first step “When an event starts” is linked to a Tesla calendar in my personal Google Calendar. The “StartHVAC” and “EndHVAC” call out to serverless functions that hardcoded contain the data for my personal car. And the emails go to a hardcoded email address of mine. Totally not reusable, but working.

After publishing that post, people started to ask if they could use the same functionality as well. Ahm, I did just say it was not reusable, didn’t I? But being a good friend, I ventured out and rewrote the whole thing to support multiple calendars and cars.

Continue reading “Scheduling things on a Tesla using Azure pt. 2; from one to many”

Going electric; just over a year in

After the (some still present) rattles, the broken rear view camera, the broken LTE modem, and the decorative yellow band around my screen, my car had another surprise for me today; the lane changed stopped working because of limited vision. I suspect the moist in the left side facing camera to be the culprit.

It’s a good thing I have a appointment in two days for the yellow band, can they take a look at this as well. #neveradullmoment

Going electric; almost a year in

The ‘going electric’ will be different blogs from my usual beat. Not only because they will not be related (directly) to software development, but also because they are opinionated and personal reports; editorials about switching over to an electric car. They will list my personal joys and annoyances about the switch, but I’ll try to be fair and balanced.

After almost a year of driving electric, I’m about to do the one year look back. And it is a two side one. It really is.

Continue reading “Going electric; almost a year in”

Post Java 8 upgrade; ignoring the module

Java 9 introduced a major change in the way Java programs are written, because of the Java Platform Module System (JPMS). And that is not something you can ‘skip’ by moving to a higher Java version; upgrading your software to any version after Java 8 means you have to deal with JPMS.

That is the reason a lot of companies are still stuck at Java 8, but at some point in the future they and everyone else will need to upgrade. Java 11 is the first Long Term Support (LTS) version of Java, and that seems to be the version of choice for a lot of migrations.

Upgrading my open source project, JFXtras, to Java 9 a few years back was a breeze. I have had more problems with the build tool (Gradle) than with the modularization of the code. But that is because the code is fairly new and already modularized using Gradle (Maven) artifacts. But in the last weeks I’ve tried to upgrade a 15+ years old custom made ERP system to Java 11… That turned out not to be a breeze.

Continue reading “Post Java 8 upgrade; ignoring the module”

Going electric; Maxem

The ‘going electric’ will be different blogs from my usual beat. Not only because they will not be related (directly) to software development, but also because they are opinionated and personal reports; editorials about switching over to an electric car. They will list my personal joys and annoyances about the switch, but I’ll try to be fair and balanced.

Charging at home

The whole topic about charging at home is confusing when you do not own an electric car, and to be honest I still don’t get it 100%. You can charge from any 220 volt socket, but that does not charge very fast, because that power group may be shared with other appliances. So at least it would be wise to dedicate a single 16 amps power group to charging your car. A single dedicated group should put about 40 km of range per hour in your battery pack. Some simplified math then tells us that a 400 km pack will take about a full night’s to charge (I know it’s not linear, but let’s keep this simple). And even though that will suffice for 99% of the use cases, 10 hours for a full charge is quite some time…

Continue reading “Going electric; Maxem”