Click here to Skip to main content
15,888,461 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: Would this pass code review where you are? Pin
Pete O'Hanlon8-Oct-20 2:36
mvePete O'Hanlon8-Oct-20 2:36 
GeneralRe: Would this pass code review where you are? Pin
theoldfool8-Oct-20 2:50
professionaltheoldfool8-Oct-20 2:50 
GeneralRe: Would this pass code review where you are? Pin
PIEBALDconsult8-Oct-20 3:45
mvePIEBALDconsult8-Oct-20 3:45 
GeneralRe: Would this pass code review where you are? Pin
Jin Vincent Necesario8-Oct-20 3:47
professionalJin Vincent Necesario8-Oct-20 3:47 
GeneralRe: Would this pass code review where you are? Pin
Mike Hankey8-Oct-20 3:52
mveMike Hankey8-Oct-20 3:52 
GeneralRe: Would this pass code review where you are? Pin
OriginalGriff8-Oct-20 4:03
mveOriginalGriff8-Oct-20 4:03 
GeneralRe: Would this pass code review where you are? Pin
MarkTJohnson8-Oct-20 4:23
professionalMarkTJohnson8-Oct-20 4:23 
GeneralRe: Would this pass code review where you are? Pin
Gary R. Wheeler8-Oct-20 4:48
Gary R. Wheeler8-Oct-20 4:48 
We don't do code reviews where I work. Go ahead, keep throwing up; I'll wait.

1. I don't like the goto. I know some folks like them for error exit handling when you're not using exceptions, but I'm not one of them.

2. If the ep symbol is intended to be a label, it's certainly poorly placed.

3. There's nothing inherently wrong in the numerous nested for loops. It depends upon their purpose.

3.1. If the nested loops are simple indices in multi-dimensional data performing a simple task, it might be the most concise way to accomplish that task. Adding layers of abstraction to remove the nesting might complicate the logic unnecessarily, especially if that's the only reason for adding the layer.

3.2. If 3.1 is not the case, the loops are certainly a code smell since they imply accessing multiple levels of detail from a single scope.

3.3. The iteration values i1, i2, etc. are poorly named.

4. I also don't like the return embedded in the loops. I don't have a problem using break or continue to exit a loop early, but that keeps the range of the 'goto' to the body of the loop, making control flow analysis simpler.
Software Zen: delete this;

GeneralRe: Would this pass code review where you are? Pin
Randor 8-Oct-20 5:01
professional Randor 8-Oct-20 5:01 
GeneralRe: Would this pass code review where you are? Pin
Rick York8-Oct-20 5:09
mveRick York8-Oct-20 5:09 
GeneralRe: Would this pass code review where you are? Pin
Gerry Schmitz8-Oct-20 6:20
mveGerry Schmitz8-Oct-20 6:20 
GeneralRe: Would this pass code review where you are? Pin
Davyd McColl8-Oct-20 21:18
Davyd McColl8-Oct-20 21:18 
GeneralRe: Would this pass code review where you are? Pin
Martin ISDN8-Oct-20 22:19
Martin ISDN8-Oct-20 22:19 
GeneralRe: Would this pass code review where you are? Pin
Myron Dombrowski9-Oct-20 4:59
Myron Dombrowski9-Oct-20 4:59 
GeneralRe: Would this pass code review where you are? Pin
Bruce Patin9-Oct-20 6:01
Bruce Patin9-Oct-20 6:01 
GeneralRe: Would this pass code review where you are? Pin
NightPen9-Oct-20 7:45
NightPen9-Oct-20 7:45 
GeneralRe: Would this pass code review where you are? Pin
Fabio Franco10-Oct-20 0:56
professionalFabio Franco10-Oct-20 0:56 
GeneralRe: Would this pass code review where you are? Pin
James Lonero10-Oct-20 14:46
James Lonero10-Oct-20 14:46 
GeneralWSO CCC OTD 08-Oct-2020 Pin
DerekT-P7-Oct-20 22:08
professionalDerekT-P7-Oct-20 22:08 
GeneralRe: WSO CCC OTD 08-Oct-2020 Pin
OriginalGriff7-Oct-20 22:31
mveOriginalGriff7-Oct-20 22:31 
GeneralRe: WSO CCC OTD 08-Oct-2020 Pin
DerekT-P7-Oct-20 22:41
professionalDerekT-P7-Oct-20 22:41 
GeneralRe: WSO CCC OTD 08-Oct-2020 Pin
musefan8-Oct-20 1:21
musefan8-Oct-20 1:21 
QuestionActive CP members traffic Pin
Sandeep Mewara7-Oct-20 21:00
mveSandeep Mewara7-Oct-20 21:00 
AnswerRe: Active CP members traffic Pin
musefan7-Oct-20 21:21
musefan7-Oct-20 21:21 
GeneralRe: Active CP members traffic Pin
Sandeep Mewara7-Oct-20 21:23
mveSandeep Mewara7-Oct-20 21:23 

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.