Showing results for September 2008 - Page 2 of 4 - The Old New Thing

Sep 22, 2008
Post comments count0
Post likes count1

News flash: Doing something that requires your attention reduces your ability to do other things at the same time which also require your attention

Raymond Chen
Raymond Chen

The New York Times points out that if you engage in an activity that requires your attention, then it reduces your ability to do other things at the same time which also require your attention. For some reason, however this is news when one of those things is sending text messages. I wonder if, had contemporary news editors existed back in the d...

Non-ComputerNews flash
Sep 22, 2008
Post comments count0
Post likes count0

I’ve seen why people steal the foreground window for their dialog box

Raymond Chen
Raymond Chen

Now, it may very well be true that many people who use as the owner for a dialog box because they don't know any better, but I'm not convinced that everyone who does so did it out of ignorance; I'm sure there's some malice in there, too. Here's how it may have gone down: Bug: I start the product setup, and then I go and work on something el...

Code
Sep 19, 2008
Post comments count0
Post likes count0

Steamy coffee leaves grounds for concern

Raymond Chen
Raymond Chen

I'm embarrassed for the bad pun,¹ but the subject is serious. Two stories appeared in the two major local newspapers on the same day. Sure, it may have been a coincidence, but I considered it a cautionary tale. Follow-ups Baristas resign en masse when the coffee stand owner decides to adopt a provocative dress code. Over a year...

Non-Computer
Sep 19, 2008
Post comments count0
Post likes count0

How can I tell that a directory is weird and should be excluded from the user interface?

Raymond Chen
Raymond Chen

Last time, we looked at a customer who wanted to know how to tell whether a given folder was a Recycle Bin folder or not. We answered the question as stated, but made the mistake of not looking at the problem the customer was trying to solve. I need to know which folders are Recycle Bin folders so I can skip over them when searching the drive f...

Code
Sep 18, 2008
Post comments count0
Post likes count0

How can I tell that a directory is really a recycle bin?

Raymond Chen
Raymond Chen

Here's a question inspired by an actual customer question: I need a function that, given a path, tells me whether it is a Recycle Bin folder. I tried using functions like SHGetSpecialFolderPath with CSIDL_BITBUCKET, but that doesn't work because the Recycle Bin is a virtual folder that is the union of the Recycle Bins of all drives. The custom...

Code
Sep 17, 2008
Post comments count0
Post likes count0

Well at least that’s one fewer program that relies on window handles being even numbers

Raymond Chen
Raymond Chen

Earlier this year I received a piece of email from a programmer at a major software firm, reprinted below (suitably redacted) with permission. It was a sort of a mea culpa. (Remember: no guessing allowed.) Hi, Raymond. I'm a dev on Product X and recently we were sitting around having a beer after work, discussing the long and sordid hist...

History
Sep 16, 2008
Post comments count0
Post likes count0

The purpose of charts is normally to make information easier, not harder, to understand

Raymond Chen
Raymond Chen

In a presentation a few years ago, there was a pie chart, but not just any pie chart, but a pie chart that appeared to be specifically designed to convey no information whatsoever. (The presenter didn't realize this, of course, and probably thought it was awesomely cool.) The pie chart consisted of five wedges, each of which was a slightly differ...

Non-Computer
Sep 15, 2008
Post comments count0
Post likes count0

I no longer have to remind the payroll department to gear up for annual raises

Raymond Chen
Raymond Chen

September 15 is the date on which annual raises take effect. This means that on the 15th, the payroll servers are swamped with people eyeballing their new paycheck breakdown to see what has changed. And every year, on September 15th, the servers would become overloaded and people would be unable to connect. Instead they'd get a message ...

Other
Sep 12, 2008
Post comments count0
Post likes count0

The terms of service you have to accept before you can see them

Raymond Chen
Raymond Chen

I had a few hours to kill at the airport a few years ago before my flight was ready for boarding, so I turned on my laptop and connected to the airport's wireless network. Like most pay services, they way you sign up is to fire up a web browser and go to any web site. Regardless of what site you go to, you are redirected to the "Here's how to buy a...

Other
Sep 12, 2008
Post comments count0
Post likes count0

Who is responsible for destroying the font passed in the WM_SETFONT message?

Raymond Chen
Raymond Chen

The message tells a control which font you would like the control to use for its text. This message is a convention, not a rule. For example, our scratch program doesn't pay attention to the message. If somebody sends it a , nothing happens. The scratch program just ignores the caller and uses whatever font it wants. Although supporting the m...

Code