The Old New Thing

The best way to prove somebody incompetent is to make up stuff and then point out that it's idiotic

One way to show that somebody is incompetent is to tell them that something they're doing is stupid, even when it's not what they're doing. Take for example this comment saying that it's stupid for copy and paste to use data objects which can allow code to execute. Um, we were talking about drag and drop, not copy and paste. And in fact, the ...

Wow, a task bar, what a novel idea

Some of my colleagues were struck by a sentence in this old Newsweek article about Microsoft's advertising campaign from last year. The sentence wasn't about the ad campaign, though. It was about Windows 7: The user interface has a slick new feature, a "taskbar" at the bottom that shows what apps you have open. The new system is due ...

Bug Bash: It's funny because it's true

Hans Bjordahl's Bug Bash is one of those it's funny because it's true comics about life inside a software company. Specifically, Microsoft, where Hans worked for many years and whose internal newsletter featured Hans's strip. (Some might argue that Bug Bash was the only part of the company newsletter worth reading.) Today I'm going to ...

As random as I wanna be: Why cmd.exe's %RANDOM% isn't so random

Somebody on my team reported that a particular script in our project's build process would fail with bizarre output maybe once in fifty tries. This script was run from a , and the result was a failed build. Rerunning make fixed the problem, but that's not much consolation when the build lab encounters it approximately every other day. The ...

Why can't AppLocale just be added to the Compatibility property sheet page?

Commenter DoesNotMatter wants to know why AppLocale cannot just be added to the Compatibility property sheet as a dropdown option. One of the things about having a huge topic backlog is that if I just wait long enough, there's a good chance somebody else will answer it, and then I don't have to write anything. And more often than not, that ...

What does the PRE in PREfast stand for?

Commenter Jeff asks what the PRE in PREfast stands for. It's an inside joke. The Microsoft Programmer Productivity Research Center (MSPPRC) originally produced a tool called PREfix. Michael Howard put me in touch with the development team, and they explained that it was called PREfix because it helps you fix your bugs before (PRE) you ...

Annotating function parameters and using PREfast to check them

Via the suggestion box, Sys64738 asks, whether I think is a good C/C++ programming style to add IN and OUT to function prototypes. Remember, this is my opinion. Your opinion may validly differ. I would go beyond just IN and OUT and step up to SAL annotations, which describe the semantics of function parameters in more detail than simply IN...