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?

    S Offline
    S Offline
    S Houghtelin
    wrote on last edited by
    #5

    I had to redo a sort recently for a microcontroller that used a bubble to an insertion sort, I gained several miliseconds. Yep, you do need to know them to optimize the amount of time spent shuffling bytes around. I can't imagine someone using a non recursive sort to dig into a large databease...

    It was broke, so I fixed it.

    1 Reply Last reply
    0
    • N NormDroid

      Talking of Sort Algorithms I remember the ones included in the MSDN CDs around 90-94.

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

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

      Norm .net wrote:

      MSDN CDs around 90-94.

      I'm sure the CD's came later than that. In 90, you could get the whole of Windows on two or three stiffies.


      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

      L N 2 Replies Last reply
      0
      • D DaveAuld

        Rama Krishna Vavilala wrote:

        So, back to the question - Who needs to know sorting algorithms?

        People who are trying to sort things I guess.

        Dave Find Me On: Web|Facebook|Twitter|LinkedIn


        Folding Stats: Team CodeProject

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

        DaveAuld wrote:

        People who are trying to sort things

        And the occasional hat

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

        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?

          C Offline
          C Offline
          Chris Meech
          wrote on last edited by
          #8

          Developers of sorts will need to know and understand sorting algorithms. However there is also a bunch of developers of sorts that program in all mannner of different languages and environments where sorting is of no consequence. :) I've not coded a sort in years, probably last done one in COBOL. :-O Rather I've coded sort callbacks for list controls and developed appropriate ORDER BY clauses for SQL.

          Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

          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
            GuyThiebaut
            wrote on last edited by
            #9

            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 1 Reply Last reply
            0
            • N Nagy Vilmos

              Norm .net wrote:

              MSDN CDs around 90-94.

              I'm sure the CD's came later than that. In 90, you could get the whole of Windows on two or three stiffies.


              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

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

              Not according to this[^] blog Carry on, nothing to see here.

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

              N 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?

                U Offline
                U Offline
                Ugochukwu Chimbo Ejikeme
                wrote on last edited by
                #11

                Those interested in Optimization...

                Ugochimbo...

                1 Reply Last reply
                0
                • L Lost User

                  Not according to this[^] blog Carry on, nothing to see here.

                  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
                  #12

                  No reference prior to 97 unless I'm missing something.


                  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

                  L 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
                    Nish Nishant
                    wrote on last edited by
                    #13

                    >>Who needs to know sorting algorithms? Devs who write libraries (like STL/BCL etc.) Devs who consume such libraries should understand how sorting works but probably need not be absolute experts. It's more important for them to understand the costs in sorting, and what types of different ways they can sort, and when sorting should be used and shouldn't be used etc.

                    Regards, Nish


                    My technology blog: voidnish.wordpress.com

                    1 Reply Last reply
                    0
                    • N Nagy Vilmos

                      Norm .net wrote:

                      MSDN CDs around 90-94.

                      I'm sure the CD's came later than that. In 90, you could get the whole of Windows on two or three stiffies.


                      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
                      #14

                      http://en.wikipedia.org/wiki/Microsoft_Developer_Network[^] I'm sure I've got a few lying around. Remeber Dr GUI and the animated cartoon.

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

                      1 Reply Last reply
                      0
                      • N Nagy Vilmos

                        No reference prior to 97 unless I'm missing something.


                        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

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

                        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 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?

                          R Offline
                          R Offline
                          Reiss
                          wrote on last edited by
                          #16

                          I don't think most programmers need to know sorting algorithms to do their job well, BUT they should be able to think logically about how they go about designing one - indeed when I used to interview people I would use this as a question - knowledge of frameworks is all well and good, but I wanted people who could think, reason and explain.

                          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?

                            C Offline
                            C Offline
                            Chris Maunder
                            wrote on last edited by
                            #17

                            Some sort algorithms [^]still need to be explained.

                            cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                            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
                              #18

                              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
                              • 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
                                #19

                                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
                                • 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
                                          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