Re: Prestatyn
Posted by:
MistyCat (---.dsl.dyn.ihug.co.nz)
Date: February 01, 2012 02:45PM
You're really an existentialist of sorts? Brilliant! The extension of the existence of Sorting is one of my favourite pet projects, and has been ever since my first game of 52-pickup, when I invented the BogoSort routine, briefly summarized as:
while not inOrder(deck) do
shuffle(deck)
Repeat until (deck(sorted=true));
otherwise known as:
A. Throw deck of cards in air.
B. Gather cards.
C. Check if cards are in order.
D1. If false, resume from (1.)
D2. If true, stop (after uttering suitable incredulous expletive).
D3. Just check every once in a while to see if you're dead yet.
Ah, those halcyon days!
You can rave about Bubble sort, Selection sort, Insertion sort, Shell sort, Comb sort, Merge sort, Heapsort, Quicksort, Counting sort, Bucket sort, Radix sort, Distribution sort or Timsort, but when it comes to sheer simplicity of programming, BogoSort beats them all. OK, so it's slow. Very slow. Really, really slow. But, it's dead easy to program. I wish I'd invented it, but I'd rather have invented the Stooge sort, named for the way the Three Stooges hit, poked, prodded and bashed each other.
Did you know that the Shell sort wasn't named after any computer-shell enclosing object-type thingy (not too technical?) but after its inventor, ... my memory fails... David or Donald Shell? Did you want to know? Does it require a particular level of nerdified weirdosity to disparage the Library sort in favour of the Shell-Metzner?
If you're now feeling out of sorts, just Google "Sorting algorithm" for a jolly good relaxing read.
God, I'm glad I'm retired now.