Click here to Skip to main content
14,603,556 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: From the Museum of Ugly Code Pin
charlieg6-Nov-18 9:17
Membercharlieg6-Nov-18 9:17 
GeneralRe: From the Museum of Ugly Code Pin
raddevus6-Nov-18 10:47
mvaraddevus6-Nov-18 10:47 
GeneralRe: From the Museum of Ugly Code Pin
Member 91670576-Nov-18 21:09
MemberMember 91670576-Nov-18 21:09 
GeneralRe: From the Museum of Ugly Code Pin
Tomz_KV7-Nov-18 3:41
MemberTomz_KV7-Nov-18 3:41 
GeneralRe: From the Museum of Ugly Code Pin
raddevus7-Nov-18 3:58
mvaraddevus7-Nov-18 3:58 
JokeRe: From the Museum of Ugly Code Pin
Chris Maunder7-Nov-18 4:50
cofounderChris Maunder7-Nov-18 4:50 
GeneralRe: From the Museum of Ugly Code Pin
raddevus7-Nov-18 5:04
mvaraddevus7-Nov-18 5:04 
GeneralRe: From the Museum of Ugly Code Pin
Baraaaaaa7-Nov-18 5:27
MemberBaraaaaaa7-Nov-18 5:27 
I like the first one better. Laugh | :laugh: I was expecting to see some horrid error-prone mess.

raddevus wrote:
while (!sourceSubFolders.atEnd()){
sourceSubFolders.moveNext();
// do something with files in the folder
}

Classic! The proposed rewrite skips the first item. Well, I think we've all been there. Wink | ;)

Hey, remember this ugly beauty from System.Runtime.Remoting?
static StringBuilder vsb = new StringBuilder();
internal static string IsValidUrl(string value)
{
    if (value == null)
    {
        return "\"\"";
    }

    vsb.Length= 0;
    vsb.Append("@\"");

    for (int i=0; i<value.Length; i++) 
    {
        if (value[i] == '\"')
            vsb.Append("\"\"");
        else
            vsb.Append(value[i]);
    }

    vsb.Append("\"");
    return vsb.ToString();
}

GeneralRe: From the Museum of Ugly Code Pin
raddevus7-Nov-18 5:36
mvaraddevus7-Nov-18 5:36 
GeneralRe: From the Museum of Ugly Code Pin
Gerry Schmitz7-Nov-18 5:44
mveGerry Schmitz7-Nov-18 5:44 
GeneralRe: From the Museum of Ugly Code Pin
raddevus7-Nov-18 5:48
mvaraddevus7-Nov-18 5:48 
GeneralRe: From the Museum of Ugly Code Pin
Member 139155387-Nov-18 6:53
MemberMember 139155387-Nov-18 6:53 
JokeRe: From the Museum of Ugly Code Pin
raddevus7-Nov-18 7:25
mvaraddevus7-Nov-18 7:25 
GeneralRe: From the Museum of Ugly Code Pin
James Lonero9-Nov-18 6:38
MemberJames Lonero9-Nov-18 6:38 
NewsA weasel walks into a bar... Pin
Johnny J.5-Nov-18 23:57
professionalJohnny J.5-Nov-18 23:57 
GeneralRe: A weasel walks into a bar... Pin
  Forogar  6-Nov-18 2:20
professional  Forogar  6-Nov-18 2:20 
GeneralRe: A weasel walks into a bar... Pin
"mega"-in-a-fresh-shave!6-Nov-18 2:38
professional"mega"-in-a-fresh-shave!6-Nov-18 2:38 
GeneralRe: A weasel walks into a bar... Pin
Ron Anders6-Nov-18 2:53
MemberRon Anders6-Nov-18 2:53 
GeneralRe: A weasel walks into a bar... Pin
musefan6-Nov-18 3:22
Membermusefan6-Nov-18 3:22 
GeneralRe: A weasel walks into a bar... Pin
Johnny J.6-Nov-18 4:02
professionalJohnny J.6-Nov-18 4:02 
GeneralRe: A weasel walks into a bar... Pin
littleGreenDude6-Nov-18 3:12
MemberlittleGreenDude6-Nov-18 3:12 
GeneralRe: A weasel walks into a bar... Pin
Johnny J.6-Nov-18 3:21
professionalJohnny J.6-Nov-18 3:21 
GeneralRe: A weasel walks into a bar... Pin
kmoorevs6-Nov-18 5:20
Memberkmoorevs6-Nov-18 5:20 
GeneralCCC Pin
pkfox5-Nov-18 22:53
professionalpkfox5-Nov-18 22:53 
GeneralRe: CCC Pin
OriginalGriff5-Nov-18 23:01
mveOriginalGriff5-Nov-18 23:01 

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.