Showing archive results for 2006

Feb 7, 2006
Post comments count0
Post likes count0

Apparently I can't take myself anywhere

Raymond Chen

Upon arriving at the office, I unpack my bicycle bag and remove a crisp new white shirt. I change into my work clothes, and then at 11am, I head to lunch as I usually do. (This is the lunch group that includes JeffDav and occasionally BenCon.) I get a sandwich, sit down, and immediately drip sauce on my brand new shirt. Can't even keep a shirt cle...

Non-Computer
Feb 7, 2006
Post comments count0
Post likes count0

Viewing function composition as transformation of the domain

Raymond Chen

A lot of formulas you encounter in computer science can be viewed as function composition. Let's start with the simple problem of rounding integers down to the nearest multiple of some positive constant. The formula for this should be relatively easy for you to produce: round_down(n, m) = floor_div(n, m) * m where returns the largest integer ...

Code
Feb 6, 2006
Post comments count0
Post likes count0

You know you're in trouble when your channel loses to dead air

Raymond Chen

When Australian Channel Seven aired a blank screen for 41 minutes [indirect report], you'd think its competition would pick up some viewers. But it didn't. But the glitch did not result in a ratings boost for public broadcaster SBS, with figures showing viewers preferred Seven's blank screen. To Seven's astonishment more than 900,000 viewers...

Non-Computer
Feb 6, 2006
Post comments count0
Post likes count0

Beware of redirected folders, too

Raymond Chen

Earlier, we learned about roaming user profiles, wherein the master copy of the user's profile is kept on a central server (which for the purpose of discussion I will call the "profile server") and is copied around to follow the user as she logs onto computers throughout an organization. In the comments, many people said that what they really want...

Code
Feb 3, 2006
Post comments count0
Post likes count0

Mysterious things Steve Yi has eaten

Raymond Chen

I read with some fascination Steven Yi's Mysterious Things I Have Eaten, since I have had four out of five of them myself. And I love the little story he tells about sea cucumber. Kimchee, like lutefisk and surströmming, most likely comes from the days before refrigeration. The acid produced by fermentation preserves (what's left of) the ...

Non-Computer
Feb 3, 2006
Post comments count0
Post likes count0

You can't even trust the identity of the calling executable

Raymond Chen

A while back, I demonstrated that you can't trust the return address. What's more, you can't even trust the identity of the calling executable. I've seen requests from people who say, "I want to check whether I'm being called from MYAPP.EXE. I'm going to make a security decision based on the result." Although you can do this, all it does is give ...

Code
Feb 2, 2006
Post comments count0
Post likes count0

Be careful when interpreting security descriptors across machine boundaries

Raymond Chen

While it's true the function can be used to check whether a particular security descriptor grants access to a token, you need to be aware of where that security descriptor came from. If the security descriptor came from another machine (for example, if you got it by calling and passing the path to a file on a network share), calling the function...

Code
Feb 2, 2006
Post comments count0
Post likes count0

The pornography of food

Raymond Chen

On the Media picks up on the Harper's Magazine article Debbie Does Salad and chats with Frederick Kaufman, the article's author, on the curious similarity between the way cooking shows and pornographic films present their subject matter. Cooking shows target the 18–35 male, even though these people are unlikely to be cooks themselves. The...

Non-Computer
Feb 1, 2006
Post comments count0
Post likes count0

The military marriage of convenience

Raymond Chen

The marriage of convenience is alive and well, not that is really a surprise to anybody. I found interesting this story on how some young members of the US military are getting married for purely economic reasons. By getting married, he would get a housing stipend and permission to move off-base. And as his legal wife, she would get health cove...

Non-Computer
Feb 1, 2006
Post comments count0
Post likes count0

The per-class window styles and things really are per-class

Raymond Chen

Earlier, I discussed which window style bits belong to whom. One detail of this that I neglected to emphasize is that since the lower 16 bits of the window style are defined by the class, you can't just take styles from one class and apply them to another. For example, you can't create a button control and pass the style expecting to have the te...

Code