Why is the line terminator CR+LF?

This protocol dates back to the days of teletypewriters. CR stands for “carriage return” – the CR control character returned the print head (“carriage”) to column 0 without advancing the paper. LF stands for “linefeed” – the LF control character advanced the paper one line without moving the print head. So if you wanted to…


On a server, paging = death

Chris Brumme’s latest treatise contained the sentence “Servers must not page”. That’s because on a server, paging = death. I had occasion to meet somebody from another division who told me this little story: They had a server that went into thrashing death every 10 hours, like clockwork, and had to be rebooted. To mask…


More on the AMD64 calling convention

Josh Williams picks up the 64-bit ball with an even deeper discussion of the AMD64 (aka x64) calling convention and things that go wrong when you misdeclare your function prototypes.


Ännu skriver jag inte bra

I was exchanging e-mail with one of the people I will be visiting while I’m in Uppsala [link repaired 10:43pm]. and we wrote in double-translation, first in Swedish, with English translation beneath it. But eventually he gave up and wrote exclusively in English. I went back to my previous dual-language message and found a few pretty…


Still more creative uses for CAPTCHA

I want to say up front that I think CAPTCHA is a stupid name. CAPTCHA stands for “Computer-Aided Process for Testing…” something something. Why do people feel the urge the create some strained cutesy acronym for their little invention? Anyway, it has already been noted how spammers are getting around these tests by harvesting a…


Why do text files end in Ctrl+Z?

Actually, text files don’t need to end in Ctrl+Z, but the convention persists in certain circles. (Though, fortunately, those circles are awfully small nowadays.) This story requires us to go back to CP/M, the operating system that MS-DOS envisioned itself as a successor to. (Since the 8086 envisioned itself as the successor to the 8080,…


Senators are really good at stock-picking

A Georgia State University study shows that U.S. senators have an uncanny knack for picking stocks that outpace the overall market. Professor Alan Ziobrowski’s analysis of senators’ financial disclosure data found that over a period of six years, the lawmakers outperformed the market by 12 percent. Professor Ziobrowski seems convinced that this is evidence of…


How do I convert a SID between binary and string forms?

Of course, if you want to do this programmatically, you would use ConvertSidToStringSid and ConvertStringSidtoSid, but often you’re studying a memory dump or otherwise need to do the conversion manually. If you have a SID like S-a-b-c-d-e-f-g-… Then the bytes are a (revision) N (number of dashes minus two) bbbbbb (six bytes of “b” treated…


What is the default security descriptor?

All these functions have an optional LPSECURITY_ATTRIBUTES parameter, for which everybody just passes NULL, thereby obtaining the default security descriptor. But what is the default security descriptor? Of course, the place to start is MSDN, in the section titled Security Descriptors for New Objects. It says that the default DACL comes from inheritable ACEs (if…


What happens to those “To Any Soldier” care packages

Commentator and novelist Christian Bauman recalls the excitement of receiving mail from anonymous well-wishers back home during his deployment with the U.S. Army in Somalia in the early 1990s. This was a fascinating listen. The coup, of course, was getting a letter with a snapshot or two inside. I don’t know why, but the further…