Who needs to know sorting algorithms?
-
The subject says it all. There used to be a time when programmers had to write sorting code. Decide what algorithm to use, know the Big O notation etc. Now, most programmers can do their daily work without knowing radix sort, bubble sort, insertion sort, quick sort, heap sort, merge sort and the other 100 different algorithms. Most of the time they just need to use a Sort method on a collection. I have seen people do even interesting things such as - create a temporary database, create a table, put values in the database and sort using SQL queries. So, back to the question - Who needs to know sorting algorithms?
Let's ask this in an orderly manner: What sort of programmer asks that sort of question?
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
The subject says it all. There used to be a time when programmers had to write sorting code. Decide what algorithm to use, know the Big O notation etc. Now, most programmers can do their daily work without knowing radix sort, bubble sort, insertion sort, quick sort, heap sort, merge sort and the other 100 different algorithms. Most of the time they just need to use a Sort method on a collection. I have seen people do even interesting things such as - create a temporary database, create a table, put values in the database and sort using SQL queries. So, back to the question - Who needs to know sorting algorithms?
-
The subject says it all. There used to be a time when programmers had to write sorting code. Decide what algorithm to use, know the Big O notation etc. Now, most programmers can do their daily work without knowing radix sort, bubble sort, insertion sort, quick sort, heap sort, merge sort and the other 100 different algorithms. Most of the time they just need to use a Sort method on a collection. I have seen people do even interesting things such as - create a temporary database, create a table, put values in the database and sort using SQL queries. So, back to the question - Who needs to know sorting algorithms?
-
It's useful to know at least something of the algorithms as each algorithm performs better under certain circumstances. Depending on the entropy within the data, the volume of data etc. some algorithms will be faster than others. This is not an area I know much about myself - but I know enough to realise that it is sometimes better to use one method as opposed to another...
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
Absolutely - to my mind its important to know characteristics of algorithms, even when provided by a library - best case/worst case for all of performance, space requirements, etc. Similarly for data structures - when is it acceptable to use a hash table as opposed to a binary tree for example. Hash tables are generally faster, but have worse worst case performance guarantees - in some cases this can be critical, for example in control situations where something has to react in a certain time. Similarly, choosing a wrong sort algorithm for large data sets can make the difference between a program working as intended and being unusable. Luckily for sorts it usually comes down to a quicksort unless the data set is small, where the overheads may not be worth it. Attention also needs to be paid to how big the items being sorted are, otherwise performance is compromised by excessive copying. In many ways, unless you know this stuff, at least to a degree, you're a hacker rather than a programmer.
-
The subject says it all. There used to be a time when programmers had to write sorting code. Decide what algorithm to use, know the Big O notation etc. Now, most programmers can do their daily work without knowing radix sort, bubble sort, insertion sort, quick sort, heap sort, merge sort and the other 100 different algorithms. Most of the time they just need to use a Sort method on a collection. I have seen people do even interesting things such as - create a temporary database, create a table, put values in the database and sort using SQL queries. So, back to the question - Who needs to know sorting algorithms?
Software Developers (as oppsed to code monkeys). Sorting is a rather simple problem, and there's a handful of different solutions - virtually all of them rather simple. However, they have tradeoffs - in terms of memory and speed, average and worst case behavior, etc. It's an excellent example for different ways to solve one problem - and why (and when) the differences matter.
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
The subject says it all. There used to be a time when programmers had to write sorting code. Decide what algorithm to use, know the Big O notation etc. Now, most programmers can do their daily work without knowing radix sort, bubble sort, insertion sort, quick sort, heap sort, merge sort and the other 100 different algorithms. Most of the time they just need to use a Sort method on a collection. I have seen people do even interesting things such as - create a temporary database, create a table, put values in the database and sort using SQL queries. So, back to the question - Who needs to know sorting algorithms?
I believe you need to know sorting algorithms so that you can choose the proper sort method based on your data and the requirements for the sorted results. I don't think you need to have the actual algorithm memorized, so that you can code one up on the spot. You just need to know the characteristics and basic method.
Software Zen:
delete this;
-
The subject says it all. There used to be a time when programmers had to write sorting code. Decide what algorithm to use, know the Big O notation etc. Now, most programmers can do their daily work without knowing radix sort, bubble sort, insertion sort, quick sort, heap sort, merge sort and the other 100 different algorithms. Most of the time they just need to use a Sort method on a collection. I have seen people do even interesting things such as - create a temporary database, create a table, put values in the database and sort using SQL queries. So, back to the question - Who needs to know sorting algorithms?
Big O notation, I haven't heard that term since college. :-\