Comments

  1. Crip Dyke, Right Reverend Feminist FuckToy of Death & Her Handmaiden says

    the algorithm that starts around 1:28/29 – does anyone recognize the mathematical strategy employed in sorting here? The others through 3:00, i felt like i could code by watching them, but that one’s method wasn’t obvious to me.

    I stopped watching b/c i had to ask about it, but i might go back and watch the 2nd half.

  2. gillyc says

    That last one’s a joke, right?
    I finished my comp sci degree over 15 years ago; I only recognised a few of those algorithms. Might have to check out a few of the more interesting looking ones.

  3. jstackpo says

    Some of the Sorts sounded a bit like my recent echo cardiogram…

    Sorting out the sands (or platelets) of time …

  4. grumpyoldfart says

    I recognise most of those algorithms. I first started programming on the Commodore 64 in the early 1980s. In those days sorting your record collection into alphabetical order was an overnight job – start the sort at bedtime and if you were lucky it would be finished when you got up in the morning. I spent many long hours trying to invent a brand new super-fast sorting algorithm that would make me famous around the world – but I never even got close.

  5. sugarfrosted says

    @3 Yes, it is a joke. Bogosort is a sorting algorithm which has horrible performance. Basically it’s a sorting algorithm that’s like shuffling a deck of cards until they’re in order.

  6. boskerbonzer says

    I’m with Daz on this. But then I listen to a lot of PsyTrance. Add a bass beat to most of these and it would pass as music for me.

  7. Beatrice, an amateur cynic looking for a happy thought says

    cool, but I watched it with sound turned off (after the first couple of seconds in which I decided it was too irritating to try and bear it).

  8. Crip Dyke, Right Reverend Feminist FuckToy of Death & Her Handmaiden says

    thank you both, graham jones and johnradke, for the tip. I’ve just spent a bunch of time reading something other than law. You’ve made my life richer, but when my wages go down b/c of missing time to do homework, I’ll send you a schedule of my billable hours. Remittance is expected within 30 days.

  9. firstapproximation says

    What I got from this: bogosort is not only comically inefficient, but it sounds like bad techno music made on an atari.

  10. Al Dente says

    Now these points of data make a beautiful line…

    And we’re out of beta, we’re releasing on time!

  11. Trebuchet says

    I tried dancing to this but somehow I kept falling off the roof.

    As someone who was serious injured less than a year ago falling off a roof, may I ask that you not do that again?

    @7, grumpyoldfart:

    I first started programming on the Commodore 64 in the early 1980s. In those days sorting your record collection into alphabetical order was an overnight job – start the sort at bedtime and if you were lucky it would be finished when you got up in the morning. I spent many long hours trying to invent a brand new super-fast sorting algorithm that would make me famous around the world – but I never even got close.

    Sounds like me, except I was sorting my home-made genealogy database. When it took 30 hours (or so) to run, I figured I needed to do something else. Got it down to 30 minutes eventually.

  12. Rich Woods says

    Ah, that takes me back! But nowadays, unless you’re doing low-level work or face time or resource constraints, it’s usually best just to stick with the sort which comes with the datatype. It’s most likely to have been optimised for the purpose. Probably. Maybe.

  13. Zeppelin says

    Now someone has to write a program that can analyse the sounds and generate the sorting algorithms that created them.

  14. Félix Desrochers-Guérin says

    And we’re out of beta, we’re releasing on time!

    So I’m GLaD I got burned, think of all the things we learned

  15. Crip Dyke, Right Reverend Feminist FuckToy of Death & Her Handmaiden says

    okay, those sort dances were awesome.

  16. says

    @#24, WhiteHatLurker:

    The quicksort video not only has better music (to my tastes, anyway) than the bubble sort video, but does a better job of illustrating what quicksort does than any other tutorial I’ve ever seen, WITHOUT the use of subtitles! (My only quibble: they should have given the numbers to the dancers in order of height.)

  17. chrislawson says

    BTW, bogosort isn’t a specific algorithm, its compsci slang for any slow, inefficient, or stupid sorting algorithm. The example in the video was especially stupid even by bogosort standards since it didn’t appear to be sorting at all…

  18. chrislawson says

    Vicar, you’re right. I was wrong. I looked it up and the specific algorithm for bogosort is:

    while not isInOrder(deck):
    shuffle(deck)

    Just as sugar frosted said @#8.

  19. ck says

    I like one of the comments on the video The Vicar linked to:

    Quantum Bogosort, which has O(1). It makes use of the theory that for every decision point there is a parallel universe for each option. Therefore, if you shuffle the items once, there is one universe in which they became in order. If you observe that they are not, destroy the universe until you are left with the one universe in which they’re sorted. Destruction of the universe is left as an exercise to the reader.

  20. says

    @ck, #30:

    Quantum Bogosort, which has O(1). It makes use of the theory that for every decision point there is a parallel universe for each option. Therefore, if you shuffle the items once, there is one universe in which they became in order. If you observe that they are not, destroy the universe until you are left with the one universe in which they’re sorted. Destruction of the universe is left as an exercise to the reader.

    This only works if the shuffling is truly random on a quantum level. Since computers generally use pseudo-random numbers which are generated by an algorithm, chances are that there would be no parallel worlds which would work. I can see the bug report now: “No return value; debugger indicates all universes destroyed.” Which would necessarily be flagged “cannot reproduce” and closed.

  21. left0ver1under says

    For those who don’t know or understand sorting algorithms, bubble, cocktail shaker and gnome sort contain many fewer items than the others because the video would be between 20 minutes and an hour if they did. Unfortunately, that gives the false impression that they are efficient methods of sorting.

    I was always partial to shell short myself because it moves data long distances very quickly, though any O=n*log2(n) sort is good.

    And cocktail shaker? I’d never heard of that one before.

  22. Hairy Chris, blah blah blah etc says

    Takes me back to my early 90s CompSci degree. I have strategically forgotten most of the low level stuff as haven’t been involved at that level since graduating!

    As for the musical side: significantly more so than, for example, Merzbow.

  23. maddmatt says

    What is the secret demonic message that you can hear if you play them backwards?

    “Go to school… Do your homework…”

  24. says

    Far preferable to bogosort is the quantum bogosort*. Instead of repeatedly shuffling the list and checking if it’s now in order, you use quantum randomness to shuffle the list, check if the list is now in order, and then destroy the universe† if it’s not ordered correctly. According to the many-worlds interpretation of quantum mechanics, shuffling the deck spawned a large number of alternative universes, and in at least one of them the list will now be sorted correctly. Once the algorithm is completed, the list will be shuffled in all surviving universes. Huzzah!

    * Yes, this sorting algorithm is also a joke. Probably.
    † How to destroy the universe is left open as an implementation detail.

  25. gruzum says

    So I’m GLaD I got burned, think of all the things we learned
    for the people who are still alive.
    Go ahead and leave me.
    I think I prefer to stay inside.

    If sorting algorithms were movies then Quick Sort would be Alien.