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
  • People still are using Netscape Messenger for Email!

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • I just can't take it no more!

    csharp code-review com graphics game-dev
    15
    0 Votes
    15 Posts
    0 Views
    V
    Then you´re a better man than I am ;-). V. (MQOTD rules and previous solutions)
  • How not to do transaction processing

    database help tutorial career
    7
    0 Votes
    7 Posts
    0 Views
    W
    Guild of Master Underground Programmers (GUMP) They're actually part of small group (paid for by a hidden tax in you pay) that goes out to deliberately code to make large amounts of guaranteed employment for other coders. [Applications for membership have been outsource] "The difference between genius and stupidity is that genius has its limits." - Albert Einstein "As far as we know, our computer has never had an undetected error." - Weisert "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
  • Unforeseen Complications

    ruby performance question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Tight disposing of objects in an old project

    database
    6
    0 Votes
    6 Posts
    0 Views
    D
    Maybe they came from Java and someone told them "you have to use using". So they put a using in there...
  • Another glittering career falls at the first hurdle

    career
    13
    0 Votes
    13 Posts
    0 Views
    T
    Just another way of saying, "WTF am I doing?" If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
  • This did not serve it's intended purpose

    5
    0 Votes
    5 Posts
    1 Views
    A
    Would have been better as an extension method. Don't comment your code - it was hard to write, it should be hard to read!
  • Leaky comment?

    question help
    5
    0 Votes
    5 Posts
    0 Views
    OriginalGriffO
    Or...they put even less effort into the security than they did the marketing...:~ Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
  • Offered with no comment

    9
    0 Votes
    9 Posts
    0 Views
    R
    I think the developer believed in "Self Documented Code". It would have been much better if was something like: public static int TenSeconds = 20;
  • My quotation to everybody who want to do something in their lives

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • My dotnet start up

    csharp question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Why? Just why?

    help question career
    27
    0 Votes
    27 Posts
    4 Views
    F
    Erm, isn't it the same as natural string handling in C#? Yes, I do know you should use a StringBuilder, but a new coder would not necessarily know that.
  • Dear VB6

    5
    0 Votes
    5 Posts
    0 Views
    Kornfeld Eliyahu PeterK
    I've had very bad experience with VB6 and don't mind to dance on it's grave - sooner is better... But I do not blame VB or VB6 or VB.NET per se - in my experience it always related to human error (bad choice in most case)... I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
  • Sutton's Zeroth Law

    41
    0 Votes
    41 Posts
    1 Views
    M
    Funny you should mention the Planck thing: I've thought of it myself: I have a feeling that all singularities detonate as soon as they form, having achieved critical mass. However, current theory holds that a singularity has zero size -- but if that were the case, then there would be zero time flow within it, and thus (to the outside observer) the detonation would take an infinite amount of time to occur -- which violates a number of principles, not least that of heat death. So in fact, I think the singularity is probably one Planck length in diameter - which allows the explosion to occur - and, as you say, solves any other number of inconveniences. Talking about singularities is vaguely problematic, in that they're mathematical derivatives rather than observed phenomena: we believe they're there, but theory states that they don't form until after the black hole itself comes into existence: mathematics says they must exist and thus they do... but that's as close as we're going to get - at least for now. I'm not a bona-fide physicist, no - but I am fascinated by the subject and I study it quite a bit. I will, however, admit to being a science-fiction freak -- it's a great genre for getting the mind working... Speaking of the science fiction, and of the Theory of Everything, Greg Egan suggests in his book "Distress" that as soon as anyone is able to explain exactly how the universe works and provide such a grand unifying theory, the universe will rearrange itself spontaneously so that it has always worked that way. Similar quantum theory suggests that a lot of reality exists because we observe it: that, for example, there was no such thing as a quark until someone discovered them, and then, at that point, the universe had always had quarks in it. Unfortunately, quantum theory supports this type of retroactive creation... I wonder what we've done with this conversation!
  • This code base is the gift that just keeps giving

    ruby database learning
    8
    0 Votes
    8 Posts
    0 Views
    H
    Agreed, porting someone else's c++ can be one step closer to the insanity abyss (compared to VB). When i did a port/rewrite, it felt like peeking into that other fellow's brain, wondering how he could function with that strange wiring of his brain. I remember he used to start for example an event loop with a delete xxx call (except if it's the first time) followed by a new xxx call...
  • Re-using variables can be dangerous

    csharp database linq sysadmin xml
    4
    0 Votes
    4 Posts
    0 Views
    K
    Good advice! I suppose I could stick the file names into a list with any parameters distinct to each query and return a loaded XDocument or Array. Maybe in the next version! Thanks! :) "Go forth into the source" - Neal Morse
  • A new low in in-line SQL

    database
    4
    0 Votes
    4 Posts
    0 Views
    D
    No, that's just evil. Fear the God or broken un-fixable build (whatever scares you).
  • if brainfart then loop

    question announcement
    8
    0 Votes
    8 Posts
    0 Views
    P
    Oh yes, we can :) [Flags] public enum Bool { True, False, ForSure, Maybe, ProbablyNot, Depends, NotDecidedYet, Undefined }
  • What is an Object

    json question learning
    40
    0 Votes
    40 Posts
    5 Views
    I
    0bx wrote: Object is a universal term Probably the most "correct" explanation I've come across. At least IMO ... which is probably the problem, there's no "opinion" shared by everyone. At best it's shared by most, though that particular "object" is hard to find. To turn this into a specific programming simile. To me the value inside the RAM position pointed to by an un-initialized pointer is still an "object" even though it might have no meaning in any form of any class inside the program. It certainly isn't an "instance" of any of them, except if by random chance it was.
  • GUIDs

    performance question sales lounge
    25
    0 Votes
    25 Posts
    1 Views
    D
    I bet he could have formatted his code block on CodeProject properly though...... :rolleyes: