Tuesday, June 23, 2020

Character and failure

You can judge the character of people or establishments by looking at how they handle failure. Do they look for someone to blame or do they analyze the steps leading to failure and try to implement a system that has a good chance of preventing such mishaps in the future? That system should NOT become a huge bureaucracy, it should be invisible and make work life more pleasant than before by reducing ambiguity related stress.

Saturday, June 13, 2020

JavaScript blessings and curses

Can you spot the difference between the following two JavaScript lines:

ctx.fillstyle = "green";
ctx.fillStyle = "green";

The first line does not give you an error even tough ctx does not have a fillstyle field (note the small "s"), it just adds another field to ctx! Being not strongly typed is the blessing and curse of JS (more a curse when the code gets larger). When you use the first line you will get a black circle because black is the default color.