Showing archive results for 2013

Jul 15, 2013
Post comments count0
Post likes count1

Watch out for those out-of-control Canadian tour buses

Raymond Chen

I don't remember the details, but I dreamed about a bunch of things, including careening through Canada on a tour bus trying to catch a ferry while people worried about their cell phone roaming charges, an episode of Friends shot in the style of ER, and one of my friends in an orange jumpsuit sneaking around.

Non-ComputerDream
Jul 15, 2013
Post comments count0
Post likes count1

A program for my nieces: The ABCs, part 2, choosing a font

Raymond Chen

I added a feature to my ABC program that it turns out I never actually used: Change the font. I added this in case my nieces were somehow unhappy with the font I chose, and this was a little escape hatch to let me select a different one. The real work happens in the function. All I have to do is call it. I tell the common font dialog to ini...

Code
Jul 12, 2013
Post comments count0
Post likes count1

If you want to track whether the current thread owns a critical section, you can use the critical section itself to protect it

Raymond Chen

You may find yourself in the situation where you want to keep track of the owner of a critical section. This is usually for debugging or diagnostic purposes. For example, a particular function may have as a prerequisite that a particular critical section is held, and you want to assert this so that you can catch the problem when running the debug ...

Code
Jul 11, 2013
Post comments count0
Post likes count1

Where is this CRC that is allegedly invalid on my hard drive?

Raymond Chen

If you're unlucky, your I/O operation will fail with , whose description is "Data error (cyclic redundancy check)." Where does NTFS keep this CRC, what is it checking, and how can you access the value to try to repair the data? Actually, NTFS does none of that stuff. The CRC error you're getting is coming from the hard drive itself. Hard drives no...

Other
Jul 10, 2013
Post comments count0
Post likes count1

Why is the syntax for touching a file from the command prompt so strange?

Raymond Chen

The magic incantation for updating the last-modified date on a file is What strange syntax! What's with the plus sign and the commas, anyway? The formal syntax is the much more straightforward This means to start with the file , then append the files , , and , treating them all as binary files. If you omit the part, then you get Thi...

History
Jul 8, 2013
Post comments count0
Post likes count1

It really wasn't that fancy a Swedish sentence

Raymond Chen

I dreamed that I was on vacation with my family at a cabin in the woods. I went downstairs with my elder child, and in the playroom I saw another family who are good friends of ours. I guess they chose to vacation at the same place. They had hired a Swedish-speaking nanny to help with the kids. The nanny asked me a simple question, and I gave a st...

Non-ComputerDream
Jul 8, 2013
Post comments count0
Post likes count1

A program for my nieces: The ABCs, part 1

Raymond Chen

I'm going to spend the next few weeks developing a Little Program in several parts. This is a program I wrote for my nieces, who always wanted to play with my laptop (instead of playing with me). Initially, I fired up Notepad and maximized it, and cranked the font size, but that became cumbersome, because I had to reset the font size and Word Wr...

Code
Jul 5, 2013
Post comments count0
Post likes count1

It rather involved being on the other side of this airtight hatchway: Disabling Safe DLL searching

Raymond Chen

The Microsoft Vulnerability Research team discovered a potential current directory attack in a third party program. The vendor, however, turned around and forwarded the report to the Microsoft Security Response Center: Our investigation suggests that this issue is due to a bug in Microsoft system DLLs rather than our program. When a process ...

Other
Jul 4, 2013
Post comments count0
Post likes count1

Why was the Windows source code trunk called the Blue Line?

Raymond Chen

The nickname doesn't get used much at all any more, but back in the day, the Windows source code trunk was called the Blue Line. Where did it get that name? From the color of the whiteboard pen. When the branching structure was worked out, the trunk was drawn with a blue pen. If you were in that meeting, and you wanted to raise a point about th...

History