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
  • I have no name, I don't exist

    c++ com algorithms debugging performance
    13
    0 Votes
    13 Posts
    0 Views
    J
    Chris Losinger wrote: i'm not sure why you refuse to acknowledge my point. I am. :) -- Kein Mitleid Für Die Mehrheit
  • More an Implimentation Horror

    help question career
    2
    0 Votes
    2 Posts
    0 Views
    M
    VB kind of forced all of us to a number of little implementation horrors, what with fake OOP and all. :-D I had my share of VB back in the day, and I'm happy it's over! When I have to maintain some of my old code from the 90's I still shiver at some horrors I see. It sure was partly my fault, but I'm convinced VB did its part. We will probably enter yet another phylosophical/religious debate if we start arguing about goods and bads in old VB, but I think (hope) everybody will agree that even if it did have a sense in its day, it was just EVIL. ;P 2+2=5 for very large amounts of 2 (always loved that one hehe!)
  • Who is teaching these people?

    csharp question com help
    19
    0 Votes
    19 Posts
    0 Views
    R
    Shite! :~ X| Sometimes while reading the programming forums, I just feel like jabbing a fork into my eyes. It is a crappy thing, but it's life -^ Carlo Pallini
  • The While If

    9
    0 Votes
    9 Posts
    0 Views
    B
    Just an optional requirement..... :laugh:
  • Useless for

    15
    0 Votes
    15 Posts
    1 Views
    I
    Jokin' i suppose... :laugh:
  • Visual Studio autogenerated code

    visual-studio csharp
    20
    0 Votes
    20 Posts
    4 Views
    S
    Maybe he doesn't understand the Spanish. :laugh: Vita est usquequaque virtus victus ut plenus. Ego non sum semper iustus tamen Ego sum nunquam nefas!
  • Conversion logic

    csharp com design
    4
    0 Votes
    4 Posts
    0 Views
    S
    :laugh: Sincerely Samer Abu Rabie Imagination is more important than knowledge !
  • Falls under worse practices..maybe? I don't know.

    database question
    3
    0 Votes
    3 Posts
    0 Views
    P
    I'm with Chris. Stored procedures are overused nowadays and are often used when a simpler technique will suffice.
  • Code reuse

    4
    0 Votes
    4 Posts
    1 Views
    P
    Ummm yeah.
  • High end SQL

    database
    3
    0 Votes
    3 Posts
    1 Views
    N
    Arnaud Lhopiteau wrote: ISNULL(Closed,0) belts... Arnaud Lhopiteau wrote: If @IsClosed Is Null and braces. What more do you want? Panic, Chaos, Destruction. My work here is done.
  • One of my own :)

    csharp wcf sysadmin announcement learning
    2
    0 Votes
    2 Posts
    0 Views
    L
    There are more #if #endif-related ReSharper bugs. Here is one of them which I spotted some time ago: I you'd enable generating XML documentation in your project settings, you will get warnings in every place where you didn't make documentation. So far so good. However, once upon a time I wanted to have a different description for debugging and realase builds. #if DEBUG /// <summary> /// Useless and unreliable sh*t, do not use this. /// </summary> #else /// <summary> /// This is a very subtle class which performs many difficult and expensive algorithms. /// </summary> #endif public class Damage : Occurance C# compiler wasn't complaing, but ReSharper wanted me to add another summary. Greetings - Jacek Gajek
  • Switch Statement from Hell

    11
    0 Votes
    11 Posts
    0 Views
    B
    I have to say that is the worst switch statement that I have ever seen and I have seen some pretty bad ones :sigh: Bill W Just because the code works, it doesn't mean that it is good code.
  • [Message Deleted]

    2
    0 Votes
    2 Posts
    0 Views
    T
    Hardly a Coding Horror. An inefficient process to be sure, but not a horror. * Sensible Function names * Sensible Method Sizes * Sensible Variable Declarations * Clear Intent ------------------------------- Carrier Bags - 21st Century Tumbleweed.
  • Which language is this Urgent help required

    help question
    6
    0 Votes
    6 Posts
    0 Views
    K
    So he found the right forum. :-O To be honest: tons of old code are running: in banks :(( , factories, (nuclear) plants or goverments agencies. They have often a problems finding the code and a maintainer, like COBOL. Press F1 for help or google it. Greetings from Germany
  • 5 in a 1 to 10 range

    16
    0 Votes
    16 Posts
    0 Views
    V
    Looks like VB is scoring better,... Dim codes() As String = New String(){"bad", "good"} Dim rating As Integer = (Array.IndexOf(codes, "bad") + 1) * 5 It feels good to learn and achieve
  • I just saw this beauty today...

    13
    0 Votes
    13 Posts
    0 Views
    N
    TheScientistIsDead wrote: would this be another example? I don't think so. Your code produces error " error: cannot call member function ‘char NullCall::PublicMethod(int)’ without object". You can compile this by making the method as static but you can't use this inside a static method. :) Navaneeth How to use google | Ask smart questions
  • StackOverFlowException

    csharp dotnet com question announcement
    14
    0 Votes
    14 Posts
    0 Views
    N
    My answer below: I reduced the occurrence of the problem by splitting some methods and using a dictionary instead of large switches that cause stack bloats. Now a simple recursive factorial method works with 400 instead of 46, that is almost 900% better Natza Mitzi
  • CharToInt

    20
    0 Votes
    20 Posts
    0 Views
    R
    Brilliant! Aren't we glad English has only 26 letters? I'd like to see the Chinese version of the code (thousands of letters). It is a crappy thing, but it's life -^ Carlo Pallini
  • A VS induced horror by me, kinda

    question visual-studio data-structures help
    7
    0 Votes
    7 Posts
    3 Views
    M
    As I said, a horropr made by me. I just realized that it has to be this way. I guess that's what ages opf windows forms programming with only void methods can do to you, you forget the basics of functions. :doh:
  • Setters and Getters evil future [modified]

    11
    0 Votes
    11 Posts
    1 Views
    J
    Thnx dude, didn't know that :) GSoC 2009 student for SMW! --- My little forums: http://code.bn2vs.com --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!