Justin du Coeur (jducoeur) wrote,
Justin du Coeur

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

  • First day of the next phase of my life

    Friday was formally my last day at Memento, but I count it as yesterday. Way back in March, I gave a sort-of four months' notice, saying that I would…

  • You know you're a true tea addict when...

    ... you finish your job and are packing your desk, and the tea selection on the back of your desk takes an entire moving box all by itself. (Yes,…

  • Resume rules

    Conducted an interview this morning; suffice it to say I wasn't blown away in general, but the worst of it was the resume, which was almost…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded