Friday, September 26, 2014

Don't be human – Cognitive Bias

One of the most interesting topics I came across at the executive masters in project management was related to human (psychological) factors, more specifically Cognitive Bias. A Cognitive Bias is "a pattern of deviation in judgment, whereby inferences about other people and situations may be drawn in an illogical fashion". There are lots and lots of Cognitive Bias, but here goes one of my favorites:

Negativity Bias is a kind of Cognitive Bias where one tends to notice and remember negative events and information rather than positive. For instance, It's a beautiful sunny day, you have your perfect clothes for that important meeting. On your way to the office, just before entering the building, a pigeon comes along and "does it" on you. "Damn! Bad luck! How is this possible? Argh". If the meeting doesn't go just perfect, you will remember "that damn pigeon". And you'll focus on that. You'll talk about it with your friends. But, how about all the other 3472840 days that no pigeon ruined anything? Why focus on the one time it hit you?

Here's a small article on Negativity Bias: How Negativity Creates Fear

Thursday, September 25, 2014

Empty string is different from NULL

I've been working with SyBase for 6 years now and it can still surprise me with strange behaviors. Take a look at the following SELECT statement:


In SQLServer (2005 onwards), executing the above script will yield equal results for all the 3 fields:


Copy and Paste the above script in Sybase, run it and you'll get a different result:




The first field is obvious. The second likewise: single quote marks, although empty, do not represent NULL value. Empty is different from NULL. However, the LTRIM and RTRIM return NULL when working on an empty string, as opposite to the SQLServer that returns an empty string. To me it was useful to have the SyBase behaviour in a recent project but, logically speaking, I think SQLServer's method is the best. Empty string is different from null.