Showing results for January 2005 - Page 2 of 4 - The Old New Thing

Jan 20, 2005
0
0

A 90-byte "whereis" program

Raymond Chen
Raymond Chen

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:

Tips/Support
Jan 19, 2005
0
0

CreateProcess does not wait for the process to start

Raymond Chen
Raymond Chen

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 to g...

Code
Jan 18, 2005
0
1

The importance of error code backwards compatibility

Raymond Chen
Raymond Chen

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 writi...

History
Jan 17, 2005
0
1

How did MS-DOS report error codes?

Raymond Chen
Raymond Chen

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 furth...

History
Jan 14, 2005
0
1

Cleaner, more elegant, and harder to recognize

Raymond Chen
Raymond Chen

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 snippet tha...

Other
Jan 13, 2005
0
0

User interface design for vending machines – answer to puzzle

Raymond Chen
Raymond Chen

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, thereby rul...

Non-Computer
Jan 12, 2005
0
0

User interface design for vending machines

Raymond Chen
Raymond Chen

How hard can it be to design the user interface of a vending machine? You accept money, you have some buttons, the user pushes the button, they get their product and their change. At least in the United States, many vending machines arrange their product in rows and columns (close-up view). To select a product, you type the letter of the row and...

Non-Computer
Jan 11, 2005
0
0

Marriage as a cross-branding opportunity

Raymond Chen
Raymond Chen

Jennifer Aniston and Brad Pitt have decided to besmirch the institution of marriage by deciding that the "until death do us part" thing was neither legally nor morally binding. "Brad said that they spent the rest of the holiday working out how they would release the news of the split. They worked out together the reasons they would give and how t...

Non-Computer
Jan 11, 2005
0
0

Why doesn’t \ autocomplete to all the computers on the network?

Raymond Chen
Raymond Chen

Wes Haggard wishes that \ would autocomplete to all the computers on the network. [Link fixed 10am.] An early beta of Windows 95 actually did something similar to this, showing all the computers on the network when you opened the Network Neighborhood folder. And the feature was quickly killed. Why? Corporations with large networks wer...

History