Click here to Skip to main content
15,888,330 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: old code Pin
Don Hughes11-Mar-22 2:06
Don Hughes11-Mar-22 2:06 
GeneralRe: old code Pin
MikeTheFid11-Mar-22 4:46
MikeTheFid11-Mar-22 4:46 
GeneralRe: old code Pin
Baxter P11-Mar-22 5:08
professionalBaxter P11-Mar-22 5:08 
GeneralRe: old code Pin
Alan Pengelly11-Mar-22 5:28
Alan Pengelly11-Mar-22 5:28 
GeneralRe: old code Pin
kmoorevs11-Mar-22 9:04
kmoorevs11-Mar-22 9:04 
GeneralRe: old code Pin
Gary R. Wheeler11-Mar-22 10:14
Gary R. Wheeler11-Mar-22 10:14 
GeneralRe: old code Pin
englebart11-Mar-22 10:59
professionalenglebart11-Mar-22 10:59 
GeneralRe: old code Pin
Kirk 1038982111-Mar-22 9:21
Kirk 1038982111-Mar-22 9:21 
Yep, that's why all code should be written 3 times:

1) Write it to prove the concept and LEARN
2) Rewrite it for others and clarity
3) Rewrite it again because we are professionals, and our brains will be shot when we come back.

The most complicated piece of Code I ever wrote was an insurance rating engine that constantly changed.
The "elegant" solution in the end was: (No Goto allowed)
LOOP
  // Shared setup code, variable hunting, etc.

  If Determination_Condition then 
     RateXXX;
     break;

// There were about 100 of those.

..
  DefaultRate;
  break;
END LOOP

I was criticized for using the LOOP in a code review, but the challenge to find a cleaner way found nothing.
And I brought the last 10 change requests, which effectively tell you WHERE to place the code to exit early.

Life is sometimes simple... (And for complexity, consider rules like, they have a home policy, a life policy, and are disabled... Uggh... Only insurance companies)
GeneralRe: old code Pin
honey the codewitch11-Mar-22 11:19
mvahoney the codewitch11-Mar-22 11:19 
GeneralJust installed VS2022 and ... Pin
OriginalGriff10-Mar-22 1:18
mveOriginalGriff10-Mar-22 1:18 
GeneralRe: Just installed VS2022 and ... Pin
Richard Deeming10-Mar-22 1:28
mveRichard Deeming10-Mar-22 1:28 
GeneralRe: Just installed VS2022 and ... Pin
Slacker00710-Mar-22 1:36
professionalSlacker00710-Mar-22 1:36 
GeneralRe: Just installed VS2022 and ... Pin
den2k8810-Mar-22 2:34
professionalden2k8810-Mar-22 2:34 
GeneralRe: Just installed VS2022 and ... Pin
lmoelleb10-Mar-22 2:38
lmoelleb10-Mar-22 2:38 
GeneralRe: Just installed VS2022 and ... Pin
Slacker00710-Mar-22 1:34
professionalSlacker00710-Mar-22 1:34 
GeneralRe: Just installed VS2022 and ... Pin
Marc Clifton10-Mar-22 2:42
mvaMarc Clifton10-Mar-22 2:42 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 3:19
Dan Neely10-Mar-22 3:19 
GeneralRe: Just installed VS2022 and ... Pin
lmoelleb10-Mar-22 3:54
lmoelleb10-Mar-22 3:54 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 8:19
Dan Neely10-Mar-22 8:19 
GeneralRe: Just installed VS2022 and ... Pin
megaadam10-Mar-22 3:40
professionalmegaadam10-Mar-22 3:40 
GeneralRe: Just installed VS2022 and ... Pin
PIEBALDconsult10-Mar-22 4:36
mvePIEBALDconsult10-Mar-22 4:36 
GeneralRe: Just installed VS2022 and ... Pin
Andreas Mertens10-Mar-22 4:59
professionalAndreas Mertens10-Mar-22 4:59 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 8:30
Dan Neely10-Mar-22 8:30 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 10:44
Dan Neely10-Mar-22 10:44 
GeneralRe: Just installed VS2022 and ... Pin
DaveAuld10-Mar-22 6:52
professionalDaveAuld10-Mar-22 6:52 

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.