Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

Choose a paradigm and stick to it, dammit!

Another sin to lay at Microsoft's feet: I'm currently working on doing some seriously down-and-dirty programming inside of IE. (Yes, I know, but there's a lot of magic we want to do that simply can't be done at the Javascript level.) In many ways, it's a delightfully complete system -- when working in C++, you can make IE sit up and do almost any sorts of tricks.

But: rarely in my life have I seen anything so inconsistent. If I have to pass a string into a method, it's sometimes a BSTR, and sometimes a VARIANT. If I need to pass a number, it's sometimes long, sometimes a VARIANT, and sometimes a VARIANT that wraps a BSTR that represents the number. Someone clearly wrote a standard for these APIs at some point, because they're consistent in *some* ways, but there is no obvious rhyme or reason to the parameters at all.

(And we won't even get into the fact that every object implements something like eight different interfaces, so I'm QI'ing all over the place...)
Tags: programming
Subscribe

  • Ideas for fighting Fake News

    [I'm mostly just posting links over in Facebook, but my more technical friends tend to be over here.] Here is a really excellent collection of…

  • Damn

    *Sigh*. I was sure this was possible, and was thinking for the past two weeks that it was starting to feel likely, but was really hoping otherwise. I…

  • Time to change the name of the meme?

    From cnn.com today: 'Trump went on to again attack women who have accused him of sexual assault or misconduct, saying, "every woman lied when they…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments