Click here to Skip to main content
15,891,136 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: What's wrong with Java? Pin
Greg Utas4-Mar-21 3:41
professionalGreg Utas4-Mar-21 3:41 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 3:38
mvePIEBALDconsult4-Mar-21 3:38 
GeneralRe: What's wrong with Java? Pin
#realJSOP4-Mar-21 3:40
mve#realJSOP4-Mar-21 3:40 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:05
trønderen4-Mar-21 6:05 
GeneralRe: What's wrong with Java? Pin
Greg Utas4-Mar-21 3:44
professionalGreg Utas4-Mar-21 3:44 
GeneralRe: What's wrong with Java? PinPopular
trønderen4-Mar-21 6:33
trønderen4-Mar-21 6:33 
GeneralRe: What's wrong with Java? Pin
Greg Utas4-Mar-21 6:56
professionalGreg Utas4-Mar-21 6:56 
GeneralRe: What's wrong with Java? Pin
Kirk 103898215-Mar-21 17:15
Kirk 103898215-Mar-21 17:15 
Your example is no different that code I saw implemented, where the sort order, leveraged the same code by the program MOVING the appropriate "Branch If >=" vs "Branch If <=" to X bytes forward on the execution pointer.

I remember reading that code over and over. Utterly confused. I had NEVER SEEN a move to a relative offset from the SP (Stack Pointer). It was already coded for the the ASCENDING sort, if they are overwriting that address, if it is ascending, it made no sense (ah, but the code broke when he was wrong on the pointer location, LOL)...

Anyways, I would EITHER shoot or beat a programmer for that kind of optimization. The C solution, of using a pointer to a function() that returned the appropriate sorting value induced HUGE functionality benefits, cleaner code and tons more flexibility. Almost pure elegance, IMO.

The code has 3 consumers. The Current Developer, The Compiler, and the Next Developer. The last one being the most important!

GeneralRe: What's wrong with Java? Pin
Greg Utas6-Mar-21 1:23
professionalGreg Utas6-Mar-21 1:23 
GeneralRe: What's wrong with Java? Pin
CodeWraith4-Mar-21 23:23
CodeWraith4-Mar-21 23:23 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 3:46
mveMike Hankey4-Mar-21 3:46 
GeneralRe: What's wrong with Java? Pin
Cp-Coder4-Mar-21 4:05
Cp-Coder4-Mar-21 4:05 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 4:12
mveMike Hankey4-Mar-21 4:12 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:34
trønderen4-Mar-21 6:34 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 4:19
mvePIEBALDconsult4-Mar-21 4:19 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 4:26
mveMike Hankey4-Mar-21 4:26 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 5:14
mvePIEBALDconsult4-Mar-21 5:14 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 5:18
mveMike Hankey4-Mar-21 5:18 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:03
trønderen4-Mar-21 6:03 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 6:25
mvePIEBALDconsult4-Mar-21 6:25 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:53
trønderen4-Mar-21 6:53 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 7:07
mvePIEBALDconsult4-Mar-21 7:07 
GeneralRe: What's wrong with Java? Pin
Leo564-Mar-21 21:00
Leo564-Mar-21 21:00 
JokeRe: What's wrong with Java? Pin
PIEBALDconsult5-Mar-21 2:35
mvePIEBALDconsult5-Mar-21 2:35 
JokeRe: What's wrong with Java? Pin
trønderen5-Mar-21 5:11
trønderen5-Mar-21 5:11 

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.