Blog - Title

  • Fabulous Adventures In Coding

    I'm not stringing you along, honest

    • 20 Comments
    JScript and VBScript are often used to build large strings full of formatted text, particularly in ASP. Unfortunately, naïve string concatenations are a major source of performance problems....
  • Fabulous Adventures In Coding

    The Malware of Ultimate Destruction

    • 6 Comments
    Peter's not the only one who's kept up at night worrying about this stuff. Last night I couldn't sleep because I was thinking about how his characterization of the ActiveX Control Of Ultimate Destruction really isn't bad enough. If this is going to be the ULTIMATE in destruction, let's think about just how evil we can get....
  • Fabulous Adventures In Coding

    How Bad Is Good Enough?

    • 9 Comments
    I keep talking about script performance without ever actually giving my rant about why most of the questions I get about performance are pointless at best, and usually downright harmful. ...
  • Fabulous Adventures In Coding

    Long jumps considered way more harmful than exceptions

    • 5 Comments
    In the dark days before exception handling you could always use setjmp/longjmp to do non-local gotos. In fact, the script engines are compiled in C++ with exception handling turned off and the mainline loop of the bytecode interpreter uses setjmp-longjmp exception handling to implement error handling....
  • Fabulous Adventures In Coding

    VBScript : VB :: ping-pong : volleyball

    • 12 Comments
    often it really doesn't matter what language you learn. For many programmers, the language is just the thing that stands between you and the object model....
  • Fabulous Adventures In Coding

    Dead Trees vs. Bits

    • 3 Comments
    Speaking of books, people keep telling me and Peter and Raymond that we should write books based on our blogs. Well, I probably am going to write another book this winter, but it will have pretty much nothing to do with the stuff in this blog. The natures of a blog and a book are very different ...
  • Fabulous Adventures In Coding

    I Take Exception To That

    • 6 Comments
    Joel and Ned are having a spirited debate over the merits of exception handling. Oddly enough, I agree with both of them....
  • Fabulous Adventures In Coding

    Designing JScript .NET

    • 5 Comments
    A while back a reader asked for a rundown on some of the design decisions we made when designing JScript .NET. That's a huge topic, but fortunately I started writing a book on the subject a few years ago that never found a publisher. Tell you what -- whenever I can't think of something more interesting to post, I'll put snippets of it up on my blog....
  • Fabulous Adventures In Coding

    Digging A Security Hole All The Way To China

    • 3 Comments
    I mentioned earlier that I wrote one of the last books published by the now-bankrupt Wrox Press....
  • Fabulous Adventures In Coding

    Wrox is dead, long live Wrox

    • 1 Comments
    A number of people have expressed surprise to me that Wrox is out of business. Here's the scoop....
  • Fabulous Adventures In Coding

    It Never Leaks But It Pours

    • 5 Comments
    The whole point of developing a garbage collected language is to decrease the burden on the developer. Because the underlying infrastructure manages memory for you, you don't have to worry about introducing leaks. Of course, that puts the burden squarely upon the developer of the underlying infrastructure, ie, me...
  • Fabulous Adventures In Coding

    What Everyone Should Know About Character Encoding

    • 4 Comments
    Thank goodness Joel wrote this article -- that means that I can cross it off of my list of potential future blog entries!   Thanks Joel!   http://www.joelonsoftware.com/articles/Unicode.html   Fortunately...
  • Fabulous Adventures In Coding

    How Do I Script A Non-Default Dispatch?

    • 7 Comments
    In JScript and VBScript, when you create an object the creation code always returns the default dispatch. Furthermore, in JScript, when you fetch a property on an object and it returns a dispatch object, we ask the object to give us the default dispatch. So in JScript, there is no way to script a non-default dispatch. What about in VBScript? There's an irksome story here, again featuring a really bad mistake made by yours truly. At least I meant well....
  • Fabulous Adventures In Coding

    Why Is There No #Include?

    • 7 Comments
    A common and entirely sensible programming practice is to put commonly used utility functions in one file, and then somehow link that file in to many different programs. In traditional compiled languages you can compile a bunch of utilities into a statically linked .LIB file or a dynamically linked .DLL file. But what do you do in script, where a program is just text? ...
  • Fabulous Adventures In Coding

    WSC vs WSH

    • 1 Comments
    Following up on this morning's entry, a reader asked me why Windows Script Components don't have access to the WScript object. "it IS running in an instance of WSH isnt it?" No, it isn't. That's a common misperception....
  • Fabulous Adventures In Coding

    Why Can't I Create The WScript Object?

    • 59 Comments
    Every now and then someone will ask me why the WSH shell object and the WSH network object are creatable from Visual Basic, but the actual root WScript object is not. I am always completely mystified by why people ask this! Why would you WANT to create the WScript object in a VB app?...
  • Fabulous Adventures In Coding

    Spot the Defect!

    • 17 Comments
    At Microsoft we have an internal email list called "Spot the Defect" -- people mail around buggy code they've discovered and we compete to see who can find the most problems with it. It's fun, and you learn a lot about what other people consider bugs -- everything from security holes to lying comments!...
  • Fabulous Adventures In Coding

    I can't make my script do nothing!

    • 5 Comments
    Yes, the title is grammatical. A few days ago I was discussing the semantics of data that isn't there. Today I want to talk a little about programs that do nothing. What do you do when you want a program to pause briefly, for whatever reason? ...
  • Fabulous Adventures In Coding

    Eric's Blog for January 279th, 2003

    • 11 Comments
    when I dissed the VBScript date format a few weeks ago, I never got around to dissing the similarly goofy JScript date code....
  • Fabulous Adventures In Coding

    Let's Get Explicit!

    • 2 Comments
    A reader asked me yesterday if there was a way to detect "at compile time" (ie, before the code runs) whether a JScript program contained misspelled variables. We catch bugs like missing braces and unterminated strings before the script even runs, so why can't we catch use of undeclared identifiers? Doesn't VBScript do that with Option Explicit? Actually, no, it doesn't. The reason is because of the way the browser name lookup rules work....
  • Fabulous Adventures In Coding

    For-in Revisited

    • 5 Comments
    A coworker asked me today whether there was any way to control the order in which the for-in loop enumerates the properties. He wanted to get the list in alphabetical order for some reason....
  • Fabulous Adventures In Coding

    A Little More on Nothing

    • 7 Comments
    VBScript has Null, Empty and Nothing. What about JScript? Unfortunately, JScript is a little screwed up here....
  • Fabulous Adventures In Coding

    A Whole Lot Of Nothing

    • 11 Comments
    Occasionally I get questions from people who are confused over the semantics of data that's not there. Why does VBScript have Null, Nothing and Empty, and what are the differences between them?...
  • Fabulous Adventures In Coding

    In, Out, In-Out, Make Up Your Mind Already

    • 9 Comments
    I was talking about reference types vs. by-reference variables a while back. Recall that both JScript and VBScript have reference types (ie, objects) but JScript does not have by-reference variables. COM supports passing variable references around, but unfortunately the intersection of early-bound COM and late-bound IDispatch is a little bit goofy. ...
  • Fabulous Adventures In Coding

    What could numeric rounding possibly have to do with MS-DOS?

    • 4 Comments
    A reader points out that FormatNumber uses yet a different rounding algorithm. FormatNumber rounds numbers ending in .5's away from zero, not towards evens. He also asks whether FormatNumber, FormatCurrency, etc, actually call into the VBA Format$ code. ...
Page 30 of 32 (783 items) «2829303132