The Old New Thing

Welcome to Taiwan's premier English-only nightclub

One of my friends is fluent in both Mandarin and English. When she lived in Taiwan, she paid a visit to a nightclub whose gimmick was that you had to speak English. The target audience was not foreigners but rather native Taiwanese who learned English as a second language. My friend didn't have any problems with this rule, but many of the ...

If it's not yours, then don't mess with it without permission from the owner

It's surprising how many principles of real life also apply to computer programming. For example, one of the rules of thumb for real life is that is that if something doesn't belong to you, then you shouldn't mess with it unless you have permission from the owner. If you want to ride Jimmy's bike, then you need to have Jimmy's permission. Even...
Comments are closed.0 0
Code

A short puzzle about heap expansion

At the 2008 PDC, somebody stopped by the Ask the Experts table with a question about the heap manager. I don't understand why the heap manager is allocating a new segment. I allocated a bunch of small blocks, then freed nearly all of them. And then when my program makes a large allocation, it allocates a new segment instead of reusing ...
Comments are closed.0 0
Code

He bought the whole seat, but we only needed the edge

After the Windows 95 project was released to manufacturing, but before the launch event itself, the team finally had a chance to relax and unwind after many years of hard work. The project manager decided to have a morale event to get everyone together to do something fun. A typical morale event might be going to see a baseball game, ...

Why doesn't TryEnterCriticalSection try harder?

Bart wants to know why the Try­Enter­Critical­Section gives up if the critical section is busy instead of trying the number of times specified by the critical section spin count. Actually, there was another condition on the proposed new behavior: "but does not release its timeslice to the OS if it fails to get it while spinning...

Our legal department suggests you skip our salad dressing and just eat an avocado

I saw a bottle of salad dressing with very strange fine print. The picture on the bottle is of half an avocado. But the fine print on the bottle reads "Does not contain avocados." Okay, so the picture on the bottle isn't a picture of the product. This is strange but not entirely unheard of. After all, a box of Girl Scout cookies has ...

Why can't I get my regular expression pattern to match words that begin with %?

A customer asked for help writing a regular expression that, in the customer's words, matched the string %1 when it appeared as a standalone word. One of the things that people often forget to do when asking a question is to describe the things that they tried and what the results were. This is important information to include, because it ...
Comments are closed.0 0
Code

Email tip: When asking for help with a problem, also mention what you've already tried

When you ask a question, you should also mention what steps you've already taken when attempting to solve it on your own. First of all, it saves the people who decide to help you with your problem from exploring lines of investigation which you've already tried (and which you know don't work). "I tried setting the timeout to 60 seconds before...

Email tip: When you say that something didn't work, you have to say how it didn't work

I illustrate this point with an imaginary conversation, inspired by actual ones I've seen (and, occasionally, been a frustrated party to). From: X I want to do ABC, but I don't have a DEF. Anybody know of a workaround? Somebody has an idea: From: Y Try mounting this ISO file into a virtual machine and trying the ABC from there. ...

Feedback usabilla icon