Do not make rules that you cannot control or enforce

I have been repeating this sentence more often than I’d like recently. But if the COID-19 time has taught me one thing very impressively, it is:

Rule 1: Forget rules which you cannot control or enforce
(Alternatively: “Do not hope for the sanity of your colleagues / fellows / …”)

Many of the COVID measures would certainly not have been necessary if “we all” had behaved reasonably. One could discuss the term “reasonable” right away. But “reasonable” unfortunately depends on personal goals. If the personal goals diverge, the opinion about “reasonable behavior” diverges as well. And suddenly “we all” do not have a common sense of what “reasonable behaviour” is. This discrepancy is then what is called a “conflict.”

So, if you are responsible for a system (the system does not even have to be technical – the “health care system” e.g.), you can hope for the sanity of the involved participants (users) and not impose any constraints / rules … This will most likely lead to a conflict. If the conflict has to be solved, you will generally be confronted with utmost gratitude and boundless cooperation (this was ironic, by the way).

No problem: just set up some rules … But rules only do make sense if you can control and enforce compliance with the rules. Because … honestly whenever we discover an inconvenient rule, we want to circumvent it. And we are creative 🙂

Rule 2: Only make rules whose compliance you can enforce and control.

If you find yourself in a position where you can detect a violation of a rule but cannot (anymore) react (or only with enormous effort). You are on lost ground and can do nothing but watch.

Rule 3: It should be clear to everyone how the enforcement will be done.
Rule 2.5: This is transparency.

The 3 rules sound trivial … but can also be very unpleasant if you have to write them down and communicate them. On the other side, you will have certain displeasure right away, but not later (or at least less because the rules were clear from the beginning). A user, on the other hand knows what (s)he is (not) allowed to do. And if there is the transparency about the consequences, the user can also decide for him-/herself whether to break a rule or not – but one cannot complain.

The real challenge of HomeOffice for companies

Many companies and executives thought COVID-19 and 100% HomeOffice would be a real challenge. Phew seems a lot of companies survived the Home-Office challenge! Companies have learnt that the business can continue. Employees have learnt that HomeOffice can work.

This was challenge 1: the technical challenge.

But now as companies slowly do not have to do HomeOffice anymore … now we will see what our bosses, executives and companies really think. How much they have really learned. How much trust there really is.

Now comes challenge 2: the people challenge.

The challenge might now be to keep people when a leader (or worse: a company culture) values presence (a.k.a counting sheep) over results – but employees don’t …

I’ll just stay at home and stay productive.

Don’t just ask for Feedback and Improvements

“Every employee should feel encouraged to give feedback and contribute ideas for improvement!” Who has heard this before? Probably everyone!

My (slightly provocative) opinion: “The effect was probably close to zero. So Forget it and don’t do such a shout out!”. Unless you want nothing or barely anything to change. Then do a big shout-out and send people back to work! Great show – with no effect! Of course, I made the mistake myself and didn’t notice for quite a while (years, actually). Every now and then an idea or suggestion came along (or I had one myself) and we were proud of the improvement. At some point between Retros and PostMortems I got the point: “It needs the right framework!”

Why are there retros for projects / sprints / teams / …? Why are there PostMortems? What’s the justification to do them? Not because of the “new fancy agile stuff” where you “just do it that way”, but because it pays off – it works. Because it provides a framework for discussion. Because time is explicitly reserved for the questions: “What can we do better?”, “Why did […] happen?”, “How can we prevent […] from happening again?”

And within this “frame” – that reserved time – people really find the time and opportunity to express ideas. Or just explain some tedious tasks that should be improved because they are … tedious. In this reserved time, there might come more ideas than in the days and weeks before. Than in the time where people are permanently confronted with the problems – where one actually could already come to the conclusion that there is potential for improvement. And maybe also more complex ideas, which people just can’t “simply do” besides regular work. Complex ideas which need a little time to be explained, discussed and understood.

If you want something to run better, the call for improvement is a step. But only one step. So the next step is: Okay, get all people together that are concerned and willing to contribute. Let’s have a look at the bugs/whatever… of the last weeks. Where are do issues pile up? Where do we ALWAYS do the same thing over and over again (“Toil” in SRE Speak)? What’s annoying? Do we have data with which to raise an assumption to a fact (that makes prioritization ways easier)?

And then the essential points: Derive actions, evaluate and implement! And do it on time! Otherwise, any motivation is not only gone, but it is immediately learned that nothing happens anyway.

All this is time-consuming, tedious, inconvenient and also annoying when you have to prioritize the actions against other tasks … But … it brings value. – So if you want to improv: Don’t just ask for feedback.

Samsung Soundbar does not connect to SmartTV

When you own both a Samsung Soundbar (HW-[something]) and a Samsung Smart-TV, you would assume that they work in nice harmony. Which they usually do! Just once in a (seldom) while, the both just don’t connect any more and it seems there is no way to connect them again.

Recently we ran into the same trouble. It required a lot of forum reading, searching, reading support pages. Especially as it requires sound-resetting both devices and does not require hard-resetting the TV (loosing channel list, favourites et. al). As it was a real pain to figure it out, I wrote down my process.

The following steps worked for me the last time I had to try it.

  1. Soundbar (maybe this is not required?)
    • turn off
    • press (and hold) the stop button until the soundbar displays “init, ok”
  2. TV:
    • Remove soundbar from the config:
      Menu > System > Device manager > Soundshare > remove Soundbar
    • turn off the TV
    • disconnect from power
    • wait ~3 min
    • reconnect & power on
  3. Soundbar:
    • Power on
    • switch to TV mode and wait for connection
    • MAYBE reset soundbar: press & hold “play” until it displays “reset”

Hope this helps! Leave a comment if it helped you or if there’s a faster way to reconnect both devices.

Where to install custom / portable programs in Windows10/8.x?

There are a couple of programs that cannot be installed / put into the regular locations (c:\Program Files and c:\Progam Files (x86)) as they cannot be run in non-administrator mode. So – where should you put / install those programs?

Fortunately Windows comes with a good place for those programs. Just put them into %LOCALAPPDATA%\Programs which expands to C:\Users\...\AppData\Local\Programs.
No need to tweak permissions (as it is in your user directory).

Downside: If you are part of a large domain (which you will not be with your private computer), your programs will not be synchronized to other computers where you log on. If you would like that you would have to place it in %appdata% (which expands to C:\Users\...\AppData\Roaming). But it would also mean that possibly large installations are synchronized. Don’t blame Windows if you are suffering from long login-times then!

In case you want to go deeper into the differences between Roaming, Local and LocalNow, have a look at the answers at superuser.com:

Roaming. (%appdata%) contains data that can move with your user profile from PC to PC – because data is synced with a server (e.g. web browser favorites or bookmarks.

Local. (%localappdata%) contains data that can’t move with your user profile. This data is typically specific to a PC or too large to sync with a server (e.g. temporary files).

LocalLow. (%appdata%/…/locallow) contains data that can’t move, but also has a lower level of access. E.g., a web browser in protected or safe mode, will only be able access data from the LocalLow Folder.

Mount vmWare shared folder in Ubuntu guest

If you want to share files between a Windows Host and a Ubuntu Linux guest, the “shared folder” feature is really handy. Just enable it in the VM-Settings, install guest additions and … then wonder where this shows up in the VM. “They appear under /mnt/hgfs” I read everywhere.

Well, they do – as soon as you do a

sudo mount.vmhgfs .host:/ /mnt/hgfs/

It took me a couple of minutes to figure this out as all tutorials endet with “the folder appears” …
If it doesn’t work, maybe just rerun

sudo vmware-config-tools.pl

How to fix: Windows 10 store fails to update or hangs during download / update

For a couple of days I saw some pending updates in my Windows 10 store that didn’t seem to install or download. The downloads were either in progress or done but none of them installed. Restarting the downloads didn’t help either.

Some quick research came up with all kinds of Powershell and registry hacks. Quite weird. Then I remembered about a recent issue that I had with Windows 8.1 which was solved by simply disconnecting the Microsoft account and reconnecting it after a restart. And it worked!

Dead easy

 

  • Go to account settings: Hit the Windows Key, type “Account” (german: Konto)
  • Disconnect from your Microsoft account
  • reboot (optional – I didn’t try without reboot)
  • Reconnect to the Microsoft account
  • Open the Store and do the update

 

Windows install error 0x80070002 unable to install App

Yesterday I tried to install a Windows App via its built in App Store. Usually this works like a charm. This time the download seemed to succees (judged by the progress bar) but the installation failed with error 0x80070002;

Googling (and Bing’ing) found various issues with kind of the same description, ranging from “download failed” to “broken registry” (including repair guides). Yet none of the proposed solutions worked for me.

Hoping it would just be a temporary failure on the store side, I hit “retry” again and again while I was searching for other solutions (interrupted by a reboot – well you never know, sometimes it just helps). And suddenly a message appeared saying that a Microsoft account was required to install the app. That was strange as I had just switched to a MS account this day – and this message appeared just once! When I wanted to reproduce it it just failed with 0x80070002 again.

So I disconnected my account from MS again, reconnected afterwards and suddenly: The installation succeeded!

To make a long story short

If you experience an error 0x80070002 when installing an App from the store in Windows 8.1: Try to disconnect and reconnect your account from and to a Microsoft account:

  • Win-C (open charms bar)
  • Go down to settings
  • Go down to PC settings
  • Go to Accounts >> your account
  • Disconnect your account
  • Repeat the above to reconnect to your MS account
  • Try to install the App

How to do automatic tagging of articles using Feedly

In this post I will describe a first proof of concept approach about how to implement a supervised learning system to automatically tag RSS posts in Feedly.

Motivation

Everyone using an RSS reader to read daily news surely knows the situation that certain topics keep (re)occuring in the news. Yet most people have topics that they are simply not interested in. Just think about certain sports, political topics or world events. But of course they keep showing up in the daily news stream.

Therefore a system is needed that automatically assigns predefined tags to the corresponding news entities and (maybe) also marks them as read.

A critical point is that the system must integrate into an RSS reader application. A system not being able to attach to an existing system would not be applicable as one still wants to use a mobile / desktop app to read the news and also to (un)tag articles. Implementing the complete value chain comprising fetching RSS, parsing, classifying, providing an aggregated stream AND an application for reading the news is definitely out of scope for a proof of concept.

I wanted to write such a classifier for quite some time but didn’t find a system that provided a convenient API to plug in  a tool for reading, classifying and pushing back the results. Unless I discovered the Feedly API. Unfortunately the Feedly API is not (yet) fully open, so that one has to obtain a time limited API token by hand. Yet, for a proof-of-concept, this is totally acceptable.

The Learning System

So much for the introduction. Let us go in medias res:

The first thought was to start with some clustering using Elasticsearch (for similarity search). But let’s recall the base facts and requirements:

  • Only a hand full of tags are needed
  • start with the simplest approach first
  • it should be able to run either on OpenShift or on my Raspberry Pi

So the choice was to start with a simple Naive Bayes Classifier. Instead of doing an in depth explanation of the Bayes classifier (I recommend Paul Graham’s A Plan for Spam and the page about combined probability), just recall: a Bayes Classifier is just a 0-1 classifier. So a single classifier is required for each tag. This makes it of course unusable for a very large amount of tags! But the big advantage is that the Bayes classifier is just dead easy. Just count how often a word occurs in the desired in class A (the Tag) and class B.

How to train / apply the classifier(s)

The classifier should be trained perdiodically and the user must have the opportunity to correct classification errors. Before dealing with synchronizing & updating entries, the classification workflow for each tag is:

  1. get all entities for the tag and use them as positive samples
  2. get all read and untagged entities and use them as negative samples
  3. get all unread and untagged entries and compute P(tag)
  4. if P(tag) > 0.95, mark the entity with the tag and probably also mark it as read

As input, the all kinds of properties are used that could distinguish between tags. Including the source URL, site keywords, categories etc. Then the content is tokenized / split by all non word characters. Graham writes about some optimizations for spam detection – yet results were pretty convincing without further optimization.

in order to have some positive samples, this of course requires the presence of some entities being tagged already. In this case I started tagging already quite some time ago as I already assumed that I needed some ground truth.

Raspberry PI: Boon and Bane

Raspberry PIs are great as little home servers. The drawback is that the RaspPi has just a single core, 700 MHz ARM CPU and 512 Mb ram which is shared between GPU and system. So, it is a bit slow and is a bit low on resources. Especially if the RasPi is also used for other purposes at the same time that also consume some RAM. In case of very large RSS streams, this could indeed raise a  problem: Running low on CPU is unconvenient (=slow), but running low on RAM is deadly (OOME). Therefore it might be required to replace the HashMap in the Bayes class with a DB layer like MapDB.

Status Quo

The quick test with the Bayes classifier showed already some really fine results! On the RasPi, each Tag is classified within 200 – 230s (14 – 18s on my notebook). The mission “Reduce the amount of information that I am not interested in” can thus be regarded as “successfully tested“!

Also there have hardly been any misclassifications. And the ones I experienced were quite understandable. In contrast to scientific publications I didn’t do extensive accuracy tests – the first attempts were so promising that I simply saved the time and thought about what to try out next that could make my life easier.

If this approach should be followed any further there are of course (as always) some open issues: Besides code cleaning, one could try to filter by TF-IDF, filter certain tokens, adjusting thresholds, etc. But I doupt that the results would get much better.

And of course, the complete code is available at GitHub. Feel free to fork it and play around with it! Beware: The code can change dramatically from one commit to another. For example if I just want to test a new idea.

How to rename a GIT tag

Once in a while (yet often enough) it happens that I have to change an already pushed git tag. Usually because I violated my own naming scheme.
Yet I also somehow can’t keep the necesserry commands in mind:

git tag newTag oldTag
git tag -d oldTag
git push origin :refs/tags/oldTag

Basically it is just: copy/link newTag to oldTag, remove oldTag, delete remote oldTag.
Also see the git man page for further parameters.