Click here to Skip to main content
15,902,032 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: Oh Microsoft Edge, you so funny PinPopular
lopatir6-Nov-18 4:03
lopatir6-Nov-18 4:03 
GeneralRe: Oh Microsoft Edge, you so funny Pin
charlieg6-Nov-18 4:21
charlieg6-Nov-18 4:21 
GeneralRe: Oh Microsoft Edge, you so funny Pin
Gary Wheeler6-Nov-18 6:43
Gary Wheeler6-Nov-18 6:43 
GeneralRe: Oh Microsoft Edge, you so funny Pin
DRHuff6-Nov-18 7:56
DRHuff6-Nov-18 7:56 
GeneralRe: Oh Microsoft Edge, you so funny Pin
Richard Deeming6-Nov-18 4:33
mveRichard Deeming6-Nov-18 4:33 
GeneralRe: Oh Microsoft Edge, you so funny Pin
W Balboos, GHB6-Nov-18 8:48
W Balboos, GHB6-Nov-18 8:48 
GeneralRe: Oh Microsoft Edge, you so funny Pin
charlieg6-Nov-18 9:11
charlieg6-Nov-18 9:11 
GeneralFrom the Museum of Ugly Code Pin
raddevus6-Nov-18 2:57
mvaraddevus6-Nov-18 2:57 
When you see this, it only takes a few extra seconds to think about what the dev intends.
But... Dead | X|
JavaScript
for (;!objSourceSubFolders.atEnd(); objSourceSubFolders.moveNext()) {
    // do something with the files in the folder.
}

First of all, not sure why you need to use Hungarian notation to signal that this is an obj.

But, more importantly, does the dev not know of the existence of the while loop? Or did he think this was an innovative approach? Sigh | :sigh:

Look how much simpler this is to read.
JavaScript
while (!sourceSubFolders.atEnd()){
    // do something with files in the folder
    sourceSubFolders.moveNext();
}


EDIT
This one is for all you people. You know who you are! Roll eyes | :rolleyes:
JavaScript
do {
    // do something with files in the folder
    sourceSubFolders.moveNext();
}
while (!sourceSubFolders.atEnd());


modified 7-Nov-18 13:29pm.

GeneralRe: From the Museum of Ugly Code PinPopular
11917640 Member 6-Nov-18 3:14
11917640 Member 6-Nov-18 3:14 
GeneralRe: From the Museum of Ugly Code Pin
DerekT-P6-Nov-18 23:29
professionalDerekT-P6-Nov-18 23:29 
GeneralRe: From the Museum of Ugly Code Pin
den2k886-Nov-18 3:17
professionalden2k886-Nov-18 3:17 
GeneralRe: From the Museum of Ugly Code Pin
raddevus6-Nov-18 3:25
mvaraddevus6-Nov-18 3:25 
GeneralRe: From the Museum of Ugly Code Pin
charlieg6-Nov-18 3:56
charlieg6-Nov-18 3:56 
GeneralRe: From the Museum of Ugly Code Pin
raddevus6-Nov-18 4:18
mvaraddevus6-Nov-18 4:18 
GeneralRe: From the Museum of Ugly Code Pin
boarderstu6-Nov-18 22:38
boarderstu6-Nov-18 22:38 
GeneralRe: From the Museum of Ugly Code Pin
DerekT-P6-Nov-18 23:22
professionalDerekT-P6-Nov-18 23:22 
GeneralRe: From the Museum of Ugly Code Pin
boarderstu6-Nov-18 23:30
boarderstu6-Nov-18 23:30 
GeneralRe: From the Museum of Ugly Code Pin
raddevus7-Nov-18 1:57
mvaraddevus7-Nov-18 1:57 
GeneralRe: From the Museum of Ugly Code Pin
TheGreatAndPowerfulOz6-Nov-18 5:16
TheGreatAndPowerfulOz6-Nov-18 5:16 
GeneralRe: From the Museum of Ugly Code Pin
den2k886-Nov-18 5:25
professionalden2k886-Nov-18 5:25 
GeneralRe: From the Museum of Ugly Code Pin
TheGreatAndPowerfulOz6-Nov-18 6:25
TheGreatAndPowerfulOz6-Nov-18 6:25 
GeneralRe: From the Museum of Ugly Code Pin
den2k886-Nov-18 20:37
professionalden2k886-Nov-18 20:37 
GeneralRe: From the Museum of Ugly Code Pin
boarderstu6-Nov-18 22:40
boarderstu6-Nov-18 22:40 
GeneralRe: From the Museum of Ugly Code Pin
den2k887-Nov-18 0:24
professionalden2k887-Nov-18 0:24 
GeneralRe: From the Museum of Ugly Code Pin
boarderstu7-Nov-18 0:24
boarderstu7-Nov-18 0:24 

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.