Click here to Skip to main content
15,901,373 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: 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 
Bubble sort is useful in teaching because it gives you a baseline to compare other sorts with. It is also fairly easy to analyse for complexity which also makes it a good teaching case.

In the real world there are also good uses for bubble sort. In computer graphics transparent objects must be rendered back to front in order to get proper compostion of the surfaces, so you have to sort them. If you are doing real-time graphics then you have to sort each frame. Since the camera moves relatively little each frame, most of the time the sort order doesn't change. A bubble sort can detect this on it's first pass and early-out. This makes the perf O(n). Additionally when objects do end up out of order due to their movement or the camera's, the change in the ordering is very localized, ie things just tend to swap with their neighbors in the sorted list. Here again, a bubble sort can do a couple of passes and then detect that it's done and exit. Any time you have a sorted or nearly sorted list bubble sort can generally do a good job with it.
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 
GeneralWhat is the difference between azure ml and a crystal ball and a random result generator? Pin
User 1106097914-Aug-15 6:59
User 1106097914-Aug-15 6:59 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
Slacker00714-Aug-15 9:14
professionalSlacker00714-Aug-15 9:14 
JokeRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
User 1106097914-Aug-15 9:44
User 1106097914-Aug-15 9:44 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
Slacker00714-Aug-15 9:49
professionalSlacker00714-Aug-15 9:49 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
Cornelius Henning14-Aug-15 11:11
professionalCornelius Henning14-Aug-15 11:11 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
User 1106097914-Aug-15 11:13
User 1106097914-Aug-15 11:13 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
swampwiz14-Aug-15 12:12
swampwiz14-Aug-15 12:12 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
PIEBALDconsult14-Aug-15 9:59
mvePIEBALDconsult14-Aug-15 9:59 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
User 1106097914-Aug-15 10:19
User 1106097914-Aug-15 10:19 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
Duncan Edwards Jones14-Aug-15 11:26
professionalDuncan Edwards Jones14-Aug-15 11:26 
GeneralRe: What is the difference between azure ml and a crystal ball and a random result generator? Pin
User 1106097914-Aug-15 11:35
User 1106097914-Aug-15 11:35 
NewsHey Martin and Vilmos Pin
Slacker00714-Aug-15 6:56
professionalSlacker00714-Aug-15 6:56 
GeneralRe: Hey Martin and Vilmos Pin
Colin Mullikin14-Aug-15 7:46
professionalColin Mullikin14-Aug-15 7:46 
JokeRe: Hey Martin and Vilmos Pin
Cornelius Henning14-Aug-15 9:02
professionalCornelius Henning14-Aug-15 9:02 
GeneralRe: Hey Martin and Vilmos Pin
Slacker00714-Aug-15 9:03
professionalSlacker00714-Aug-15 9:03 
GeneralRe: Hey Martin and Vilmos Pin
Michael Martin14-Aug-15 23:58
professionalMichael Martin14-Aug-15 23:58 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   506 votes