The Old New Thing

Playing the hippie poetry game for four cents per line

The party game goes by many names. Hippie poetry, Beat poetry, Dada poetry. To play, have a group of people sit in a circle and give each person a piece of paper and writing implement. To start, each person writes a single line of poetry and hands it to the person to his or her left or right. (The direction isn't important, as long as it's ...

What happens if you pass a source length greater than the actual string length?

Many functions accept a source string that consists of both a pointer and a length. And if you pass a length that is greater than the length of the string, the result depends on the function itself. Some of those functions, when given a string and a length, will stop either when the length is exhausted or a null terminator is reached ...
Comments are closed.0 0
Code

Japanese street fashion reaches Finland

På hemsidan av Martin Frid, en av programledarna av NHK:s japanska nyheter på svenska, hittade jag dem här fotona av japanskt gataklädemode... i Finland! (Don't worry, the web site is in English.) Nu behöver du inte resa till Japan. Om det är en positiv utveckling är jag inte helt säker på...

Why is my delay-rendered format being rendered too soon?

Here's a customer question: I've put data on the clipboard as delay-rendered, but I'm getting a WM_RENDERFORMAT request for my CF_HDROP for many operations even though nobody actually looks at the files. Operations such as right-clicking a blank space on the desktop or opening the Edit menu. I don't want to render the data until the user hits...
Comments are closed.0 0
Code

Nearly everybody has a $500 flashlight

When I described using a laptop computer as an impromptu flashlight, that triggered a lot of comments from people using their cell phone or PDA as a flashlight. One nickname I've heard for this phenomenon is "the $500 flashlight", $500 being the price of a PDA or SmartPhone at the time the term was coined. (I was amused to find that even ...

What do I do with per-user data when I uninstall?

If the user chooses to uninstall your program, what do you do with the data your program kept in HKEY_CURRENT_USER, and other parts of the user profile? Should you enumerate all the profiles on the machine and clean them up? No. Let the data go. First, messing with the profiles of users that aren't logged on can result in data corruption, ...

Another type of misplaced apology: Apologizing for not knowing the penalty

You may remember this story from a few years ago. A college student printed his own bar codes (for inexpensive items), placed them over the bar code for expensive items, then went through the register and ended up paying $4.99 for a $149.99 iPod, for example. Ironically, he would have gotten off lighter if he had merely shoplifted the items...

The code page on the server is not necessarily the code page on the client

It's not enough to choose a code page. You have to choose the right code page. We have a system that reformats and reinstalls a network client computer each time it boots up. The client connects to the server to obtain a loader program, and the loader program then connects to the server to download the actual operating system. If anything ...
Comments are closed.0 0
Code

Why isn't QuickEdit on by default in console windows?

In the properties of console windows, you can turn on QuickEdit mode, which allows the mouse to be used to select text without having to go explicitly into Mark mode. (In a sense, the console window is permanently in Mark mode.) Why isn't this on by default? It's so useful! Somebody thought the same thing and changed the default in one of the...