Click here to Skip to main content
15,907,392 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: You know you need a break when... Pin
enhzflep14-Aug-15 17:55
enhzflep14-Aug-15 17:55 
GeneralRe: You know you need a break when... PinPopular
Fredrik Bornander14-Aug-15 21:50
professionalFredrik Bornander14-Aug-15 21:50 
GeneralRe: You know you need a break when... Pin
Slacker00715-Aug-15 1:29
professionalSlacker00715-Aug-15 1:29 
GeneralRe: You know you need a break when... Pin
Tarek Elqusi15-Aug-15 1:52
professionalTarek Elqusi15-Aug-15 1:52 
GeneralRe: You know you need a break when... Pin
Nish Nishant15-Aug-15 5:30
sitebuilderNish Nishant15-Aug-15 5:30 
GeneralRe: You know you need a break when... Pin
PIEBALDconsult15-Aug-15 6:16
mvePIEBALDconsult15-Aug-15 6:16 
GeneralRe: You know you need a break when... Pin
Sander Rossel15-Aug-15 13:37
professionalSander Rossel15-Aug-15 13:37 
GeneralIs bubble sort only used for pedagogy or for extremely constrained program memory? Pin
swampwiz14-Aug-15 12:07
swampwiz14-Aug-15 12:07 
My understanding is that obviously the divide & conquer sorting algorithms of O( n log n ) are far better than the ones of O( n^2 ), except for the case of a small size of data, in which insertion sort is used, as even it is is better than bubble sort.

But it was my experience learning BASIC and then later FORTRAN that bubble sort was introduced as a "read & type in" algorithm. (It was only later when I studied C that I learned about these far better sort algorithms.) So I wonder why is bubble sort even taught? The only explanation I can come up with is that is only a few lines long, with a double for loop (i.e., a very elementary CS concept), so it is easy to "plug & chug" into a program that requires it, without going into the theory of sorting algorithms - and as well would have been useful in the days of the small-byte program, when every line of code was valuable.

Is there some use of this that I am missing here? I suppose that back in the quaint days of "book distribution" (i.e., the only inexpensive way to transfer program code was to put it in a book and have the user type it in, LOL), using bubble sort saved on tedious typing as well.
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
PIEBALDconsult14-Aug-15 12:42
mvePIEBALDconsult14-Aug-15 12:42 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
gggustafson15-Aug-15 6:58
mvagggustafson15-Aug-15 6:58 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
PIEBALDconsult16-Aug-15 5:20
mvePIEBALDconsult16-Aug-15 5:20 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
SeattleC++17-Aug-15 4:38
SeattleC++17-Aug-15 4:38 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
gggustafson17-Aug-15 5:38
mvagggustafson17-Aug-15 5:38 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
OriginalGriff14-Aug-15 19:44
mveOriginalGriff14-Aug-15 19:44 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
CDP180214-Aug-15 20:08
CDP180214-Aug-15 20:08 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
thewazz17-Aug-15 7:43
professionalthewazz17-Aug-15 7:43 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
john morrison leon14-Aug-15 22:34
john morrison leon14-Aug-15 22:34 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
Amarnath S14-Aug-15 23:08
professionalAmarnath S14-Aug-15 23:08 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
newton.saber15-Aug-15 4:10
newton.saber15-Aug-15 4:10 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
harold aptroot15-Aug-15 7:38
harold aptroot15-Aug-15 7:38 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
irneb17-Aug-15 2:19
irneb17-Aug-15 2:19 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
patbob17-Aug-15 6:06
patbob17-Aug-15 6:06 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
MrChug17-Aug-15 10:21
MrChug17-Aug-15 10:21 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
scoy17-Aug-15 11:44
scoy17-Aug-15 11:44 
GeneralRe: Is bubble sort only used for pedagogy or for extremely constrained program memory? Pin
jibalt18-Aug-15 0:05
jibalt18-Aug-15 0:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.