The brain is not strongly typed

You're a programmer. I don't care how smart you are:

you continually cast a custom object into a boolean.

Life calls for rapid decisions on all kinds of objects.

Is this pizza is the one i want?

We make such evaluations so often, and on so many different objects, that instead of implementing a 'ToBoolean' function on every single custom type that our mind encounters, we create a static function (ToBoolean) which uses some very dodgy reflection to cast absolutely any object in the world into a boolean result.

It's a bad design. It speeds up processing, but at the loss of precision (and thus correctness) in the return variable.

And it's too convenient. The static ToBoolean function is so damn fast, and readily available, that we use it all the time. A slight bug in your work is distorted into 'absolute failure'. Infact, almost everything becomes a false. And when you should be throwing 'invalid cast exceptions' all over the place, you are instead buisly comparing apples with oranges.

This is a 'cognitive distortion'. This is the kind of stuff David Burns tells you how to get around. I wrote bout it a while back.

Watch out for it. I use this saying as an antidote: nothing is black and white, everything is shades of grey. Say it with me, geeky people: nothing is black and white, everything is shades of grey. everything is shades of grey.

 

My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

adb on August 29, 2005 09:17 sez:

damn it, yes everything IS black and white. One and zero. On or off.

I work it, therefore I must be it. I can reduce all of my (work) problems to bits, life must be similiarly reducible.

Actually, I've long theorized that one of our problems as humans is that we're analogue life-forms trying to be digital...


pds on August 29, 2005 17:29 sez:

The statement "nothing is black and white" IS A BLACK AND WHITE STATEMENT.



DID I JUST BLOW YOUR MIND?


secretGeek on August 29, 2005 18:15 sez:

depends how you look at it, pds.

i choose not to look at it in a black and white way. So when i hear "nothing is black and white" -- i think, "well, almost nothing. some stuff probably is." and i just accept this.

but sure, on the surface it looks like a pretty black and white statement. or let's say, blue and green, to avoid any racist undertones.

you got yourself a blog yet, pds? you leave comments now and then, but you never leave a url.




pds on August 30, 2005 07:27 sez:

Negative, I spread my detritus around on everyone else's blog, like a rat. :)


Pete


(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.