Showing archive results for 2005

Aug 15, 2005
Post comments count0
Post likes count0

On being attacked by a sidewalk

Raymond Chen

Yesterday, I was attacked by a sidewalk. I was cycling from work to a friend's house for dinner and was northbound in the shoulder on 172nd Ave NE in Redmond. As I reached the intersection with NE 138th St., I was momentarily distracted, perhaps by my water bottle, I forget. This lapse of attention resulted in my failing to notice that...

Non-Computer
Aug 15, 2005
Post comments count0
Post likes count1

The poor man’s way of identifying memory leaks

Raymond Chen

There is a variety of tools available for identifying resource leaks, but there's one method that requires no tools or special compiler switches or support libraries: Just let the leak continue until the source becomes blatantly obvious. Nightly automated stress testing is a regular part of any project. Some teams use screen savers as the trigger...

Code
Aug 12, 2005
Post comments count0
Post likes count0

Adding a lookup control to the dictionary: Searching Pinyin

Raymond Chen

Finally we start searching. For now, the search algorithm is going to be very simple: The string you type into the edit control will be treated as the start of a Pinyin word or phrase. We'll make it fancier later. Here is where a lot of the groundwork (some of which I called out explicitly and some of which I slipped in without calling attention...

Code
Aug 11, 2005
Post comments count0
Post likes count0

Adding a lookup control to the dictionary: Just getting it on the screen

Raymond Chen

When we last left the dictionary project, we were able to display the dictionary entries but hadn't yet gotten around to searching it. Today, we'll place the lookup control, though we won't hook it up until next time. First, we give the edit control an ID and create some member variables to keep track of it. class RootWindow : public Window { ...

Code
Aug 10, 2005
Post comments count0
Post likes count1

Why is Windows Error Reporting nicknamed “Dr. Watson”?

Raymond Chen

The nickname for the feature known as Windows Error Reporting is "Dr. Watson". Where did that name come from? As you have probably guessed, The name Dr. Watson was inspired by the character of Dr. Watson, the assistant to Sherlock Holmes in the stories by Arthur Conan Doyle. It is my understanding that the doctor was originally dev...

History
Aug 10, 2005
Post comments count0
Post likes count1

How can a company get access to Windows Error Reporting data?

Raymond Chen

What happens to all the crashes in programs not written by Microsoft that are submitted via Windows Error Reporting? Microsoft still collects and indexes them, and vendors can sign up to gain access to the error reporting database to see the crashes in their programs. The service is free, although it does require a Verisign ID so that the Winqua...

Other
Aug 9, 2005
Post comments count0
Post likes count0

That’s about the size of it

Raymond Chen

News reporters seem to have some difficulty reporting the size of things. In order to make things more accessible to their readers, they try to compare it to the size of an everyday object, but to me it seems they try a bit too hard. For example, this story about the recent rescue of the crew of a sunken submarine noted, [T]he layers of stretche...

Non-Computer
Aug 9, 2005
Post comments count0
Post likes count1

The dangers of messing with activation when handling a WM_ACTIVATE message

Raymond Chen

This is basically the same thing as The dangers of playing focus games when handling a WM_KILLFOCUS message, just with activation in place of focus. One developer discovered the hard way that if you mess with activation inside your WM_ACTIVATE handler, things get weird. The author noted that if he posted a message and did the work from the posted...

Code
Aug 8, 2005
Post comments count0
Post likes count0

Hey, who flattened the hills?

Raymond Chen

This weekend, I went to a friend's house on Mercer Island to see the US Navy Blue Angels flight demonstration team perform. They do this every summer as part of Seattle's Seafair festival, but this was the first time I got to see the show up close and personal. The I-90 bridge is closed for safety reasons, and people are allowed to walk onto th...

Non-Computer