Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Who needs to know sorting algorithms?

Who needs to know sorting algorithms?

Scheduled Pinned Locked Moved The Lounge
algorithmsdatabasequestion
27 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Rama Krishna Vavilala

    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?

    M Offline
    M Offline
    Maximilien
    wrote on last edited by
    #18

    Not many people need to know about the internals, but maybe just the generics. in 20+ years in programming, I don't think I ever really coded a sorting function. I always used what was available in the framework I was using.

    Watched code never compiles.

    1 Reply Last reply
    0
    • L Lost User

      What you are missing is my inability to tell the difference between the 1990s and the 2000s. I'm off to punish myself.

      Every man can tell how many goats or sheep he possesses, but not how many friends.

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #19

      ChrisElston wrote:

      I'm off to punish myself.

      Haven't heard it called that for a long time!


      Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

      N 1 Reply Last reply
      0
      • N Nagy Vilmos

        ChrisElston wrote:

        I'm off to punish myself.

        Haven't heard it called that for a long time!


        Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

        N Offline
        N Offline
        NormDroid
        wrote on last edited by
        #20

        Fnarr! Fnarr![^]

        Software Kinetics Wear a hard hat it's under construction
        Metro RSS

        1 Reply Last reply
        0
        • R Rama Krishna Vavilala

          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?

          W Offline
          W Offline
          W Balboos GHB
          wrote on last edited by
          #21

          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

          1 Reply Last reply
          0
          • R Rama Krishna Vavilala

            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?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #22

            I just wrote a bubble sort, and a binary search, in a driver. :) Good stuff the kernel, none of these highlevel packages for you that takes all the real work out of your daily life! :)

            ============================== Nothing to say.

            1 Reply Last reply
            0
            • R Rama Krishna Vavilala

              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?

              N Offline
              N Offline
              Nemanja Trifunovic
              wrote on last edited by
              #23

              Rama Krishna Vavilala wrote:

              Who needs to know sorting algorithms?

              Programmers.

              utf8-cpp

              1 Reply Last reply
              0
              • G GuyThiebaut

                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)
                R Offline
                R Offline
                Rob Grainger
                wrote on last edited by
                #24

                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.

                1 Reply Last reply
                0
                • R Rama Krishna Vavilala

                  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?

                  P Offline
                  P Offline
                  peterchen
                  wrote on last edited by
                  #25

                  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

                  1 Reply Last reply
                  0
                  • R Rama Krishna Vavilala

                    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?

                    G Offline
                    G Offline
                    Gary R Wheeler
                    wrote on last edited by
                    #26

                    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;

                    1 Reply Last reply
                    0
                    • R Rama Krishna Vavilala

                      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?

                      B Offline
                      B Offline
                      Battlehammer
                      wrote on last edited by
                      #27

                      Big O notation, I haven't heard that term since college. :-\

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups