This is something I’ve needed to get off my chest; I really and truly don’t understand the logic behind the scheme of Docker container image names. The first time I tried to grasp it, I got mentally stuck, because it feels to me it blatant ignores any convention. At the moment it is a matter of accepting that this it how it works, but my neurotic side keeps protesting every time I tag an image. Let me explain the beef I have, and then maybe someone can enlighten me.
(N.B. I’m using “docker” in this post, but I actually am using “podman”. But their APIs are identical, so because docker is better known, I’m typing “docker” in this post.)
When you create a new image using the “docker build” command, the newly created image is uniquely identified by a hash, something in the line of 21df6af2a82e0135661ce18a621112450992914e1fcfc0edb285c332318e3e23. This id is totally impossible to convey to other people, so Docker has the possibility to add tags to images. A typical build command looks like
$ docker build --tag my-tag .
This is will use the Dockerfile (Containerfile for podman) to generate an image and add it to the local registry. You can see this by executing a list command:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/my-tag latest 99bd5445f871 22 minutes ago 280 MB
Wait! What? What is the localhost doing there? And latest?
Naming things in coding is always something of great debate, and important to give appropriate consideration, because it greatly influences readability. And readability -as we all know- is the second most important aspect of source code, the most important one being that it should work of course 🙂
There are competing naming styles; camelcase starting with or without a capital, underscores, all caps, etc. But I do not want to get into that, to each his own. Or her own. Personally I prefer the Java style, with the difference in naming between classes (CamelCase) and methods (camelCase), so I’m going to use that for the examples here.
What I would like to talk about is the concept of a “default verb”. As a rule of thumb class names are nouns; they’re a Factory, or a Singleton, or Person. And methods perform actions on classes, so their name should start with a verb; getName, createInstance, build, walk, …, they do something.
I’m not using YAML a lot. If I need an easy-to-read configuration file, I’m using TECL, but usually XML serves me fine. It is a one-stop-shop for a lot of stuff; anything not code usually can be done nicely with XML. And its verbosity is not really a problem with the current bandwidths, unless you need to send a lot of data. And it is easy enough to read for a human.
That title sounds like one from a boy’s book, a Tintin (Kuifje) or Spike and Suzy (Suske en Wiske) comic, but this blog is about Tesla, cloud computing, and hexagons.
In the middle of September 2020 Tesla suddenly blocked all network traffic originating from any of the major cloud providers, like Amazon, Google and Microsoft. A number of of third party Tesla apps were suddenly in big problems because of this, including my TeslaTasks. A lot of developers had to scram to work around that unexpected situation.
People have complaints about configuration languages all the time; properties are too simple, XML is too verbose, JSON doesn’t allow comments, YAML is only suited for small configuration files, TOML’s tables are a bit weird (IMHO). So how about we throw all the good aspects onto a heap and see what comes out of it? And with only one task in mind: configuration. (Just like JSON is intended for datatransfer, hence it does not support comments.) Therefor I’m introducing TECL, the Totally Encompassing Configuration Language. But the name is open for suggestions. 😀
The goals are:
Simple, like properties, but supporting a hierarchy
Compact, like JSON, but allowing comments
Formal hierarchy, unlike YAML’s indentation based one
There is a lot of fuss about the Netherlands blocking aid to Italy. To prevent any misunderstanding (especially by my non Dutch readers), I’ve written this small explanation. And I’ll be using the words “sneaky bastard”. 😀
After the banking crisis in 2008 the Dutch national debt grew to 68% of our GDP, well past the maximum of 60% required by the EU. As a result we started to reduce expenses, and in 2019 our debt was below 50%.
In the same period Italy’s debt grew as well, but they never reduced their expenses. So it kept on growing to 138% in 2019. They were addressed on this by the member states of the EU, but the populist government gave the EU the big finger.
This blog is just based on my own opinion, as a software engineer I do not have the qualifications to have a professional one.
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.
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.
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.
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.