Showing archive results for 2004

Sep 17, 2004
Post comments count0
Post likes count0

Why does my mouse/touchpad sometimes go berzerk?

Raymond Chen

Each time you move a PS/2-style mouse, the mouse send three bytes to the computer. For the sake of illustration, let's say the three bytes are x, y, and buttons. The operating system sees this byte stream and groups them into threes: x y b x y b x y b x y b Now suppose the cable is a bit jiggled loose and one of the "y"s gets lost. The byt...

Tips/Support
Sep 16, 2004
Post comments count0
Post likes count0

A visual history of spam (and virus) email

Raymond Chen

I have kept every single piece of spam and virus email since mid-1997. Occasionally, it comes in handy, for example, to add naïve Bayesian spam filter to my custom-written email filter. And occasionally I use it to build a chart of spam and virus email. The following chart plots every single piece of spam and virus email that arrived at my...

Other
Sep 16, 2004
Post comments count0
Post likes count0

What happens when you specify RegexOptions.ECMAScript?

Raymond Chen

The flag changes the behavior of .NET regular expressions. One of the changes I had discussed earlier was with respect to matching digits. For those who want to know more, a summary of the differences is documented in MSDN under the devious title "ECMAScript vs. Canonical Matching Behavior". Apparently some people had trouble finding that page...

Code
Sep 15, 2004
Post comments count0
Post likes count1

Interlocked operations don’t solve everything

Raymond Chen

Interlocked operations are a high-performance way of updating DWORD-sized or pointer-sized values in an atomic manner. Note, however, that this doesn't mean that you can avoid the critical section. For example, suppose you have a critical section that protects a variable, and in some other part of the code, you want to update the variable atomi...

Code
Sep 14, 2004
Post comments count0
Post likes count1

The x86 architecture is the weirdo

Raymond Chen

So unlike all the others, yet people think it's the normal one.

Other
Sep 10, 2004
Post comments count0
Post likes count0

Storsjöodjur hunting season will opening soon

Raymond Chen

Scotland doesn't have the corner on monsters in lakes. You'll also find them in Norway, in Sweden (read about a recent expedition), and in Canada, among many, many others. Anywhere there are lakes, there's bound to be a legend about a monster in one of them. It appears, however that Sweden's Storsjöodjur is about to lose its protected sp...

Non-Computer
Sep 10, 2004
Post comments count0
Post likes count1

Sometimes the bug isn’t apparent until late in the game

Raymond Chen

I didn't debug it personally, but I know the people who did. During Windows XP development, a bug arrived on a computer game that crashed only after you got to one of the higher levels. After many saved and restored games, the problem was finally identified. The program does its video work in an offscreen buffer and transfers it to the sc...

History
Sep 9, 2004
Post comments count0
Post likes count0

Why isn’t the original window order always preserved when you undo a Show Desktop?

Raymond Chen

A commenter asked why the original window order is not always preserved when you undo a Show Desktop. The answer is "Because the alternative is worse." Guaranteeing that the window order is restored can result in Explorer hanging. When the windows are restored when you undo a Show Desktop, Explorer goes through and asks each window that it...

Code