Thursday, May 17, 2007

Unit Testing and the Turing Slot Machine



A dear friend is a neuropsychologist. She has a zillion interesting brain factoids but one relevant one is the allure of the "inconsistent reward".

My paraphrased essence is that we are drawn to situations where there is the possibility of a reward. It has to be Goldilocks: never being rewarded is daunting; being rewarded too easily is boring. This phenomenon explains computer games, gambling, ...

And unit-testing, IMO. I have said before that unit-testing is fun: "like getting a row of limes on the Turing Slot Machine. It is an electrochemical buzz, broadcasting to our dopamine receptors." Personally, I find a palpable tension while the tests are running, just before the outcome.

A thought for a Friday: Maybe the Java IDE's should represent JUnit results as the spinners on a mini slot-machine? "Big money, no whammies...."

5 comments:

Mike Venneman said...

"This phenomenon explains computer games, gambling, ..."

... and GOLF!

In all my years as a programmer, I have never worked where unit tests were required. Maybe I should take it up for fun. You know, bring JUnit out of the basement once or twice a summer, swing a few at the driving range, then duff all over the course, get frustrated, and chuck JUnit back in the basement without cleaning off the grass stains.

But of course not without a few decent test runs to make me want to try again after the bad stuff has washed from my memory.

Just a little humor. I actually think unit testing should be a Comp. Sci. 100-level course in school. It would be a lot easier for everyone to just accept some form of unit testing no matter who they work for.

Nice Press Your Luck reference, by the way!

fred said...

But as someone once discovered, the "Press Your Luck" board was NOT random. I can't get to it from here, but i'm pretty sure there is a snopes on it - they guy figured out the pattern, and won like 30 free spins. he eventually just quit.

Bingo lady said...

I think this explains my thought process entirly. I feel realy relaxed
when im playing online slot games and feel alittle down when I am not. but whats the process when I get on a losing streak and I become stressed. does my brain not think that far ahead? because Im certainly not getting any dopamine through that period.

docsharp01 said...

Excellent post! I love to play slots online.
One of the largest online slots casino that accepts players from the USA is Free Online Slots Casinos which has 98% payouts and bonuses!

Steven Finn said...

I needed to thank you for this phenomenal read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post. gambling games