Showing results for September 2006 - Page 3 of 4 - The Old New Thing

Sep 15, 2006
0
0

Allocating and freeing memory across module boundaries

Raymond Chen
Raymond Chen

I'm sure it's been drilled into your head by now that you have to free memory with the same allocator that allocated it. matches , matches , matches . But this rule goes deeper. If you have a function that allocates and returns some data, the caller must know how to free that memory. You have a variety of ways of accomplishing this. One is to s...

Code
Sep 13, 2006
0
0

Raymond's excursions into East Asian pop music, episode 3: Morning Musume (モーニング娘)

Raymond Chen
Raymond Chen

It really all started with Katamari Damacy (塊魂). The music for that game is so darned infectious, and it was my fascination with that music that prompted my colleague to loan me the CDs his wife bought while she traveled through Asia. I already mentioned China Dolls (中國娃娃). Another of the CDs in the colle...

Non-ComputerExcursions into East Asian pop music
Sep 13, 2006
0
0

Philosophical discussion on when to mark a method as virtual

Raymond Chen
Raymond Chen

When should you mark a method as virtual? This question has both a technical and a philosophical aspect. The technical aspect is well-understood: You mark a method as virtual if you want calls to the method to be invoked on the run-time type of the invoked object rather than on the compile-time type of the invoking reference. But there is a heavy...

Code
Sep 12, 2006
0
0

Grammar review: Verb+particle versus compound noun

Raymond Chen
Raymond Chen

Although the inflections and compound-mania are largely absent from the English language, there are still some vestiges of its Germanic roots. One detail of English grammar that I often see neglected is the distinction between the verb+particle and the compound noun. Consider the verb phrase "to shut down", which is the one I see misused most ofte...

Non-Computer
Sep 11, 2006
0
0

If you ask a Yes/No question, make sure the user also knows what happens when they say No

Raymond Chen
Raymond Chen

I was talking with someone last year who had a gripe about a music organizer program. Suppose you create some playlists and then decide, "Oh, nevermind, I don't like this playlist." You highlight the playlist and click "Delete". You then get a dialog box that asks, "Do you want to move the songs in this playlist to the Recycle Bin?" "Well, no, I d...

Other
Sep 8, 2006
0
0

Turns out you can't learn Mandarin Chinese by watching television

Raymond Chen
Raymond Chen

It is generally accepted that language exposure in the first year of a baby's life is important. To what certainly must be the dismay of couch potatoes everywhere, researchers at the University of Washington determined that it's particularly important that it come from a live human being. Watching DVDs doesn't have any effect. What was particula...

Non-Computer
Sep 8, 2006
0
0

Const pointers: Logical consequences

Raymond Chen
Raymond Chen

Consider this follow-up question to the question from last time: When I call the function, can I assume that the field of the structure will not be modified? If we take a look at the declaration of the function, we see that it reads like this: Go past all the function declaration specification goo and look at the parameter list. It's a ...

Code
Sep 7, 2006
0
0

What you don't apologize for is as important as what you do

Raymond Chen
Raymond Chen

In the aftermath of the Zidane head-butt incident, there was a lot of speculation over what Materazzi might have said to provoke Zidane's response. Zidane has said he attacked Materazzi because he insulted his mother and sister. Materazzi denied disparaging Zidane's mother. I immediately noticed the very precise denial from Materazzi. (I suspec...

Non-Computer