Skip to content

The Weird and The Wonderful

It was the best of code, it was the worst of code. Coding Horrors, Worst Practices, and flashes of brilliance

This category can be followed from the open social web via the handle the-weird-and-the-wonderful@forum.codeproject.com

1.8k Topics 20.7k Posts
  • Yet another "Treasure"

    10
    0 Votes
    10 Posts
    0 Views
    Richard DeemingR
    Is it "elephant", or is that just what you shouted when you found this code? :rolleyes: "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • It won't take no for an answer

    11
    0 Votes
    11 Posts
    0 Views
    B
    :doh: <voice type="Ebeneezer Scrooge"> Bah. dumb bugs </voice>
  • Off topic

    lounge
    4
    0 Votes
    4 Posts
    0 Views
    L
    It stays here
  • Get all the Enumeratorz

    csharp career
    6
    0 Votes
    6 Posts
    1 Views
    B
    Looks like the code will work and is more justification for my signature line. :) Just because the code works, it doesn't mean that it is good code.
  • Re: Yet Another gem from the VB6 code I'm "porting"

    ruby help code-review lounge
    5
    0 Votes
    5 Posts
    0 Views
    D
    Rob Grainger wrote: "Looks like some VB4 code" - apparently not, the company was born in 2003! The brain guilty of creating that code must have been ossified for at least 6 years then. (VB5 came out in 97.) Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
  • Visual Studio 2013 License

    visual-studio csharp com testing collaboration
    12
    0 Votes
    12 Posts
    1 Views
    D
    ta.
  • Catastrophic Failure!

    game-dev docker debugging help tutorial
    12
    0 Votes
    12 Posts
    1 Views
    P
    Brisingr Aerowing wrote: I also include a 'Guru Meditation GUID' Let me guess. you used to program Amigas years ago, right? :) We can program with only 1's, but if all you've got are zeros, you've got nothing.
  • This really pushes my buttons

    5
    0 Votes
    5 Posts
    0 Views
    V
    Rich.Edwards wrote: This really pushes my buttons or not ;P V. (MQOTD rules and previous solutions) OriginalGriff wrote: V is absolutely right
  • Microsoft's Siri Killer.

    java question
    2
    0 Votes
    2 Posts
    0 Views
    L
    They should have called it Cortana. edit: *checks insider news* wait .. they did call it Cortana? OK then
  • Waiting for else part execution

    15
    0 Votes
    15 Posts
    2 Views
    R
    You cannot write a macro beginning with an digit. "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
  • Gender doesn't matter

    9
    0 Votes
    9 Posts
    0 Views
    M
    RyanDev wrote: Perhaps it's like mailman. which evolved to "letter carrier" (because "mailperson" still sounds like it is referring to "male") like "stewardess" became "flight attendant"
  • A backslash in C++

    c++ help
    41
    0 Votes
    41 Posts
    3 Views
    B
    Heh. I am not all that used to Vi(m), but this extension seems to be quite powerful. <voice type="Ebeneezer Scrooge"> Bah. dumb bugs </voice>
  • VMWare logic

    sysadmin devops help question
    3
    0 Votes
    3 Posts
    0 Views
    B
    AFAIK, VBox simply returns 0 (Success) if you try to power off a machine that is already powered off through the VBox Management API, which makes sense to me. <voice type="Ebeneezer Scrooge"> Bah. dumb bugs </voice>
  • But what to try?

    csharp question
    7
    0 Votes
    7 Posts
    1 Views
    P
    Then it's too bad the optimizer will remove it. :sigh: This space intentionally left blank.
  • Windows swallows exceptions

    csharp dotnet com design beta-testing
    14
    0 Votes
    14 Posts
    0 Views
    J
    Ah you are right - sorry for overseeing your first post - So Forget my post. :-O But at least I knew about this and that it's documented - thank you anyway for clarification
  • IT Support

    sysadmin help
    9
    0 Votes
    9 Posts
    1 Views
    A
    I will gladly deny. I am not that kind of person to lead others. I prefer solitary work. Microsoft ... the only place where VARIANT_TRUE != true
  • Perl gem

    perl ruby data-structures
    6
    0 Votes
    6 Posts
    0 Views
    M
    Not quite... the "$f," only interpolates the value of the f scalar... so the result is the single string: 'field1,field2,field3,field4,field5,field6,field7,field8,field9,field10,field11,field12,field13,field14,field15,field16,field17,field18' Seriously pointless!
  • Found this today

    9
    0 Votes
    9 Posts
    1 Views
    B
    I also found something similar today my $select = ""; my (@fields) = ("field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9", "field10", "field11", "field12", "field13", "field14", "field15", "field16", "field17", "field18"); foreach my $f (@fields) { $select .= "$f,"; } chop $select; For those unfamiliar, @name= array variable, $name = scalar variable. 'chop' is interpreted as a function call with the intentional side effect of removing the last character from the scalar you pass it. As a bonus, plaintext strings surrounded by double quotes must be parsed by the interpreter (this is Perl) and variable names within them are replaced with values.
  • Ah the joys of working in a team

    c++ csharp ruby collaboration
    7
    0 Votes
    7 Posts
    2 Views
    F
    Just supplying the correct name and an empty id string should do the trick. ;) The good thing about pessimism is, that you are always either right or pleasently surprised.
  • Be A Leader In Your Industry: Help Others

    com help question
    3
    0 Votes
    3 Posts
    0 Views
    S
    Sorry about that.Can you tell me how can I change it to Lounge? :( My Tech Blog : Sampath Lokuge Tech Blog Nothing is Impossible for Willing Heart.