Raymond Chen

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

Post by this author

Why are kernel HANDLEs always a multiple of four?

Not very well known is that the bottom two bits of kernel HANDLEs are always zero; in other words, their numeric value is always a multiple of 4. Note that this applies only to kernel HANDLEs; it does not apply to pseudo-handles or to any other type of handle (USER handles, GDI handles, multimedia handles...) Kernel handles are things you ...

Hyperlinking to Hutchison Whampoa Limited forbidden

Maybe they don't want people to find them. The copyright notice for the web site of Hutchison Whampoa Limited states, Copyright Hutchison Whampoa Limited. 2003. All rights reserved. No person, whether an individual or a body corporate, shall create or establish a hyperlink to the HWL Corporate Website by hypertext reference or imaging ...

A 90-byte "whereis" program

Sometimes people try too hard. You can download a C# program to look for a file on your PATH, or you can use a 90-character batch file...

A 90-byte “whereis” program

Sometimes people try too hard. You can download a C# program to look for a file on your PATH, or you can use a 90-character batch file...

CreateProcess does not wait for the process to start

The function creates a new process, but it doesn't wait for the process to get off the ground before returning. It just creates the process object and lets it go to do its thing. The Win32 process model is that each process initializes itself in context. When a process object is created, it is practically empty, save for enough information...

The importance of error code backwards compatibility

I remember a bug report that came on in an old MS-DOS program (from a company that is still in business so don't ask me to identify them) that attempted to open the file "". That's the file with no name. This returned error 2 (file not found). But the program didn't check the error code and though that 2 was the file handle. It then began ...

How did MS-DOS report error codes?

The old MS-DOS function calls (ah, int 21h), typically indicated error by returning with carry set and putting the error code in the AX register. These error codes will look awfully familiar today: They are the same error codes that Windows uses. All the small-valued error codes like ERROR_FILE_NOT_FOUND go back to MS-DOS (and possibly even ...

Cleaner, more elegant, and harder to recognize

It appears that some people interpreted the title of one of my rants from many months ago, "Cleaner, more elegant, and wrong", to be a reference to exceptions in general. (See bibliography reference [35]; observe that the citer even changed the title of my article for me!) The title of the article was a reference to a specific code ...

User interface design for interior door locks

Why do door lock manufacturers mess up the lock handle design?

User interface design for vending machines – answer to puzzle

Last time, we ended a discussion of vending machine design with a short puzzle: What problems do you see with numbering the products from 1 to 99? I'm not saying that these are the only possible answers, but they are ones that came to mind when I thought about it. Ilya Birman was the first to point out the "bounce-effect" problem, ...