Assumptions got us again

Assumptions

Last weekend we – Luda and I – spent full-time programming – from early morning to the late (very late!) evening. Each of us was caught by an incorrect assumption.

Luda, for example, assumed that CSS (Cascading Style Sheet) had certain values (while, in fact, it had been changed). She was struggling to fix the wrong behavior but never looked into CSS. Only after she had eliminated all other possible sources she discovered that CSS was a culprit – by Sunday evening – about the same time when I discovered the source of the problem in my code.

I have developed a small reactive system as an example for my current book about Java. Well, the reactive system is asynchronous by nature, but, although I knew it, I did not realize that that was the source of the problem: my very simple example did not work! Only by Sunday evening, it suddenly started working. Why?! Because it is all about asynchronous processing, stupid! One has to give different parts of the system time to get going before they can respond to the requests in an expected manner. Instead, I was trying to hit them immediately after the start. Only when I – accidentally! – added 200 milliseconds delay before the first request, everything started working.

On the upside, I am able to add this valuable advice to the readers based on my painful experience: do not let your intuition based on the traditional sequential (hardcoded) programming get the best of you. It is a new world of much looser software system behavior out there based on timing and available resources.

The lesson learned: if you are stuck on seemingly something simple, the problem is not where you are looking but in your assumptions. Take a break and walk away until the brains stop spinning the same logical chain. The moment they do, you are able to revisit your assumptions and check if they are true.

Does not something similar happen when we get agitated by some statement or behavior of others? We assume something, our emotions lock us in a certain circular logical chain and – boom! – we go after the offender (or so we think) all the way. My advice to myself in such cases: calm down first. But how often I follow it myself?

I knew all of it (and even advised to others) for many years already. My parents told me too (lo-o-o-ong time ago). Why has it gotten me again? Good question.

Cheshire Cat smiles

It is obvious, isn’t it?

— Do you know where one can spend decent vacations on a tight budget this year?

— Sure. On a sofa.

Send your comments using the link Contact or in response to my newsletter.
If you do not receive the newsletter, subscribe via link Subscribe under Contact.

Powered by WordPress. Designed by Woo Themes