Showing posts with label computer programming. Show all posts
Showing posts with label computer programming. Show all posts

Monday, 26 January 2009

Bubble sorting (Lessons learned from surprising places 1)

Sometimes we can apply lessons learned in one place in completely different circumstances - for me, "bubble sorting" is one example.

It was ages ago, when I was learning the programming language Turbo Pascal (which is no longer in use, that's how ancient I am!) "Bubble sorting" is a way to sort data in a certain order by comparing them in pairs until all data has been compared and arranged into a list. The method is very simple - only two items are compared at one time - but since computers are so fast, the program will repeat the algorithm and run through the data very quickly.

When I have several options to choose from and I can't make up my mind, I try this method! I pick two of the options - any two - and compare them: should I buy this or do that? One option will almost automatically "weigh" heavier than the other.

If I'm still not sure I pick up another "item" to compare the first "winner" with. I'm not as fast as a computer, but on the other hand, I usually don't have to compare very many options. So it speeds up my decisionmaking! I know it sounds silly, but try it - it can help in surprising circumstances!

/Kris C.