Hasn’t the problem of updates being partially installed until the next reboot...
Last week, I discussed how A question about how to detect whether Windows Update needs the system to be restarted turns out to be the wrong question. One of the issues I noted was the risk of the...
View ArticleCalculating integer factorials in constant time, taking advantage of overflow...
For some reason, people on StackOverflow calculate factorials a lot. (Nevermind that it’s not necessarily the best way to evaluate a formula.) And you will see factorial functions like this: int...
View ArticleGreat moments in forgetfulness: Does anybody have a copy of this file?
A colleague of mine (let’s call him Bob) sent out a question to the rest of the team: Does anybody have a copy of xyz.exe? I replied, Hi, Bob. I found a copy on \\scratch\temp\bob\xyz.exe (A few years...
View ArticleYou’d think that with the name TEMP, people wouldn’t expect it to be around...
A customer had a problem with the Disk Cleanup wizard. The customer liaison explained: The customer would like to know what locations the Disk Cleanup wizard removes files from. The custom is running...
View ArticleOh, that's probably why I'm in the Quake credits
Back in 2012, I couldn't remember why I was in the Quake credits. But then the comment from Kristaps pinpointed the most likely reason: The Sys_PageIn function. void Sys_PageIn (void *ptr, int size)...
View ArticleWhy is January 1 being reported as the last week of the previous year?
A customer (via the customer liaison) reported a problem that occurred when their program was run in Germany. Ah, those pesky Germans. Always causing trouble. In Germany, we find that the week numbers...
View ArticleDiagnosing high CPU by studying profiling results, example
A customer asked for assistance determining why their program demonstrated sporadic high CPU. It occurred only at a client location, so they couldn't set up a full debugging environment. They were...
View ArticleExploring the Supercute World of Hello Kitty
There's still time to get to the Hello Kitty Supercute Opening Party at the Experience Music Project, kicking off a four-month exhibition of Everything Hello Kitty. (Here are pictures from the Los...
View ArticleHow can I get notified when the cursor changes?
Today's Little Program tracks changs to the cursor. You might want to do this as part of instrumentation, in order to see how often the user is staring at an hourglass, for example. (It's easier to...
View ArticleThe ritual of choosing your next office
The joke at Microsoft is "Don't like your office? Don't worry. You'll be moved to a different one soon." It's not actually that bad, at least not in my experience, but the joke still stands. When a...
View ArticleWhy is the StartRunNOHOMEPATH policy so very specific about what it does?
The StartRunNoHOMEPATH policy affects whether the user's HOME path is the current directory when you run a program from the Run dialog. But that's all it does. DWalker asks, "I wonder why the...
View ArticleIf You Are The One: The crazy Chinese dating show
My wife watches 非誠勿擾, a Chinese dating game show. The title literally translates as "If not sincere, then do not bother", but that doesn't really convey what the title means. It follows in the Chinese...
View ArticleStupid JavaScript debugging tricks: Abusing the conditional breakpoint
Your favorite JavaScript debugger may very well have a conditional breakpoint facility, and if it does, you can abuse it to do things unrelated to conditional breakpoints. Since conditional...
View ArticleInvestigating a problem constructing a security descriptor to deny...
A customer had a question about how to set up a security access mask. How can I deny thread-specific access rights to Everyone? Specifically, I want to deny the Everyone group the following rights...
View ArticlePlaying with synchroninzation barriers
A synchronization barrier is a synchronization object that works like this: A synchronization barrier knows how many threads it is managing. Each thread that calls EnterSynchronizationBarrier...
View ArticleWe got around three
In this story about Restoration Hardware's mail order extravagance, there is a little statistic: Industry surveys from groups like the Direct Marketing Association estimate that catalogues get average...
View ArticleClarifying the documentation on wildcards accepted by...
A customer asked for clarification in the documentation for FindFirstFile and related functions, such as FindFirstFileEx and FindFirstFileTransacted Does FindFirstFileEx support multiple...
View ArticleThe increasing urgency of a request to fill out a survey
Here are some email messages I received from an automated system. October 20: "This survey must be completed no later than November 14." October 31: "Reminder, this survey must be completed no later...
View ArticleHow can I append to a file and know where it got written, even if the file is...
A customer had a collection of processes, all of which are writing to a single file. Each process wants to append some data to a file and also know where the appended data was written, because the...
View ArticleIn order to serve you better: Charging your credit card in your home currency
Dynamic currency conversion is a service provided by merchants when processing credit cards payable in a foreign currency. Say, for example, you present a credit card issued by a United States bank to...
View Article