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
  • 0 Votes
    16 Posts
    0 Views
    R
    I have some sad news for you both ;-) "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
  • The new Trump Two Dollar Bill

    question
    11
    0 Votes
    11 Posts
    3 Views
    D
    A typo defines integrity for you, how sad.
  • Sigh

    python com code-review learning
    10
    0 Votes
    10 Posts
    0 Views
    J
    This is why we need faster and faster processors. Think of it as price support for Intel.
  • Lost in composition

    csharp linq
    3
    0 Votes
    3 Posts
    0 Views
    D
    ..and the mixing type safe and type unsafe field access ..and the fact that it's wrong but I can't see where ..and its a client side join between tables for which a server side view already exists and so on. :-)
  • Is it 'true'?

    csharp com tools question
    6
    0 Votes
    6 Posts
    0 Views
    M
    Because Javascript equality is so f*cked that you have to know when to use == vs. ===, and even then there's some weird BS with the null, empty, void, dunno, you're guess is as good as mine states that a Javascript variable can be in that it only makes sense to equate to a literal string? Marc Latest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
  • It's too complicated to understand

    python com performance learning
    12
    0 Votes
    12 Posts
    0 Views
    K
    I write often comment for my "future self" like "HACK", "TODO" :rolleyes: Press F1 for help or google it. Greetings from Germany
  • Enums are for wimps

    tutorial
    15
    0 Votes
    15 Posts
    0 Views
    M
    OK, makes sense. C++ allows for a lot of this kind of thing through operator overloading, though I tend to be a pure C programmer, and I like the level of clunky direct control you have of the code with C. :)
  • It's not just code, I read the user manual...

    asp-net mobile question
    8
    0 Votes
    8 Posts
    2 Views
    R
    I suggest scanning them and submitting the results to engrish.com[^] "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
  • MVVM

    wpf csharp design regex
    21
    0 Votes
    21 Posts
    3 Views
    Y
    Javascript + JSON?
  • http://junivivecream.fr/

    dotnet question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • TIL

    php com
    6
    0 Votes
    6 Posts
    0 Views
    L
    You are always on about something that has to do with it. :-) The language is JavaScript. that of Mordor, which I will not utter here This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart. "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.
  • new bool()

    python com learning
    26
    0 Votes
    26 Posts
    3 Views
    L
    Marc Clifton wrote: Why couldn't the programmer see that? Why didn't someone in the 2+ years that this code has been in production fix it? I have always predicted that this type would show up on the scene sooner or later and, by now, have seen them in action often enough. They actually do as they were told and avoided memory management at all cost. That is why they have no understanding what value types and reference types are all about, nor do they have any idea how value types are an illusion created by the compiler to spare us having to wrestle with references and check for null for every variable. To them these things make no sense and appear to be some random and arcane rules which have been inherited from languages of the past. The same goes for logical operators. I have given up on trying to help the kids when they can't get it done. They think that's more of this arcane ancient stuff that nobody needs to know anymore. Letting them figure it out themselves is the only way to convince them otherwise. So be it. The language is JavaScript. that of Mordor, which I will not utter here This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart. "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.
  • Tales from the Crypt

    python com learning
    13
    0 Votes
    13 Posts
    3 Views
    M
    cjb110 wrote: I can't imagine anyone the knows they should use StringBuilder but not that Padding strings is built into to .NET. Sadly, this was code written in the last couple years, outsourced to some Indian devs. Marc V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
  • The joys of outsourcing

    python com tutorial question learning
    12
    0 Votes
    12 Posts
    0 Views
    M
    Z.C.M. wrote: A friend and co-worker of mine refers to this type of thinking as, "passive mediocrity". I shall shamelessly steal that. I wanna be a eunuchs developer! Pass me a bread knife!
  • I'm a-feared

    python com learning
    17
    0 Votes
    17 Posts
    0 Views
    Sander RosselS
    That's true. Not really a bug, but I once worked on a form that took about 5 seconds to load. There was some multi-threading going on, but it wasn't implemented correctly. After I fixed it the data was shown almost instantly, but the menu items were disabled until the loading was actually done after about 5 seconds. I got a call, they rather watched at an empty and useless screen for five seconds than at data with a disabled menu bar :laugh: Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
  • A database view that affects the underlying data?!

    database question
    24
    0 Votes
    24 Posts
    0 Views
    J
    Quite right you are. :doh: I need to get rid of this cold. My brain is getting mushy. Wrong is evil and must be defeated. - Jeff Ello
  • Return the correct null

    question
    9
    0 Votes
    9 Posts
    0 Views
    L
    I should have wrote that further up the function, isValid is set to either true or false :) Ah, I see you have the machine that goes ping. This is my favorite. You see we lease it back from the company we sold it to and that way it comes under the monthly current budget and not the capital account.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Tales from J.S. Crypt, Day 3

    python com learning
    14
    0 Votes
    14 Posts
    1 Views
    J
    Maybe a bit masochistic, but I'm waiting for the next one. :-\ Wrong is evil and must be defeated. - Jeff Ello
  • Well, there goes 5 hours!

    sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    S
    This is one of the many, many reasons to use some form of source control. With modern editors and IDEs, the overhead is negligible and it saves you so many headachese - this scenario being just one of them.