Posts

Showing posts from 2015

Black and Blue or Gold and White Dress - The emperors new clothes

Image
I was in the office when I received a message saying, what colour is this dress?


Now I could see the glare in the top right so I though this photo was not taken under the best lighting conditions and so it would be difficult to be certain of the exact hue, but my best guess would be white and gold. I was happy to be slightly wrong, that the white was some sort of light hue, it had a purple tint, but lots of camera throw in blue or purple tints erroneously and the gold could have been anywhere from yellow to brown.

Apparently I am wrong, the dress is blue and black. Now this would not bother me, but apparently lots of people, perhaps the majority see it as black and blue, where as some see it as white and gold.

So I took different segments of the dress in isolation and performed and analysis of the colour composition of each portion. In HSV terms this comes up with an average colour of bright drab violet (RGB  B9,AD,C4)  and medium faded orange (RGB 7A,63,48). So the image of the dress…

Hypotheses are for testing, but assumption is the mother of disaster

If I were to ask what is the most important element to being a good programmer I would say the ability to avoid making assumptions and instead make hypotheses that can be tested. Knowing you are right because you have data to back it up will allow projects to remain on track. Ploughing on based on guess work and things a colleague told you once (without providing you with data & methodology to back up these statements) will likely lead to ruin.

I does not matter how long someone is programming it is always possible that someone heard something once, took it as gospel and never tested it to make sure it was true. I encountered this with a couple of colleagues and an SQL query. The SQL query was built from a ORM-like query generator and included the syntax WHERE 1=1. Both my manager and a senior developer stated, "well that is the problem WHERE 1=1 will always cause a full table scan rather than use indexes".
When I looked at the same query I thought that the table may be …