Programing on the Shoulders of Giants

Posted on 25th April 2008 by Ryan Somma in Geeking Out

Recently I needed a way to quickly sort a large dataset on the fly, but the classic bubblesort algorithm was too innefficient. Luckily, a quick google search revealed a Quick Sort v2 Algorithm by Anthony Baratta, who took and modified the Quick Sort Algorithm from 4 Guys from Rolla, who adapted it from an algorithm given in the book Data Abstractions & Structures using C++ by Mark Headington and David Riley, (pg. 586).

Because Baratta’s article was followed with user comments, everyone on the Web was free to contribute criticisms, questions, and, most of all, improvements. Two people posted fantastic advances to the code as well, with one person posting a modification to sort on dates, and another posting a modification to deal with extremely large arrays.

Without these two updates, the original script posted would have left me struggling to overcome these oversights, but thanks to the collaboration and copyleft principles of people online, I can use this code without having to spend days banging my head against my monitor to understand and adapt it.

Like any science, Information Science builds on the knowledge of those before us.

2 Comments

  1. The benefit of open-source! This reminds me of my algorithms class. We had to write an O(n log n) sorting algorithm for alphabetizing text files per word. Since I slept through class on the how to for quick sort, I ended up coding a merge sort. The merge proved far easier to implement then the quick. It also ended up offering comparable if not slightly better performance.

    Comment by sour Swinger — April 25, 2008 @ 9:49 pm

  2. […] was Deanna’s and my first run at this kind of task. I’m “open sourcing” our approach. For better or for worse, here’s what we […]

    Pingback by Open Source Wedding Photography « TGAW — April 30, 2008 @ 1:02 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.