2015-04-09

Better Package Than Copy



Today I realized that for me it easier to create a small package than to copy a single file.

The example is glabels-schlomo, a Debian package I created just now to store extra gLabels templates for the label sheets that I use at home. The motivation was that I spend half an hour looking through old backups to find a template definition that I had not copied over when I reinstalled my Desktop.

Creating the package took another half an hour and now I can be sure that I won't forget to copy that file again. And I will also have the template definition at work in case I need to print a sheet of labels there.

If you also feel that packaging is better than copying then feel free to use this package as a template for you own stuff. It contains a Makefile and uses git-dch to automatically build a DEB release from the git commits.

2015-04-03

WARNING is a waste of my time

How many log levels do you know? How many log levels are actually useful? At Relax and Recover we had an interesting discussion about the use of the WARNING log level.

I suddenly realized that in a world of automation, I need only two log levels:

ERROR and everthing else.

ERROR means that I as a human should take action. Everything else is irrelevant for me.

So far for the user side. As a programmer the choice of log level is sometimes much more difficult. As a programmer I might not want to decide for the user if some problem is an ERROR or not. The obvious solution is to issue a WARNING in an attempt to shed the responsibility of making a decision.

But in an automated world that does not help me as an admin to run the software better. WARNINGS for most cases only create extra manual work because somebody needs to go and check some log file and decide if there actually is a problem. I would rather have the software make that decision and I would be happy to fix or readjust the software if that decision was wrong. So, please no WARNINGs.

Apparently others see that different and prefer to get a large amount of WARNINGs. The only way out is that software should be written so that the user can configure the behaviour of WARNINGs. If neccessary, it should be even possible to configure the behaviour for different events.

So why are there so many logging levels? I think that the main reason is that it is simpler and less work for software developers to use many log levels than to implement a sophisticated configuration scheme for which events should be considered an ERROR and which not.

Together with a Zero-Bug-Policy, eliminating WARNINGs goes a long way towards beeing more productive.

DevOpsDays 2015 Presentation: