The Old New Thing

Since clean-up functions can't fail, you have to soldier on

Clean-up functions can't fail, so what do you do if you encounter a failure in your clean-up function? You have to keep cleaning up. Some people like to follow this pattern for error checking: And some like to put it inside a cute flow control macro like or even Whatever floats your boat. But you have to be careful if using ...

Why does Explorer say "File too large" for my custom file system, when the problem has nothing to do with the file being too large (heck it's not even a file)

When Explorer copies files around, it doesn't really know what the maximum file size supported by any file system happens to be. (That information is not reported by .) So it guesses. If the file system name is or , then Explorer assumes that the maximum file size is 4GB − 1. Also, if a file operation fails with the error , and ...

Microspeak: 1 – 1 is not zero

In his reddit AMA, Joe Belfiore wrote i have regular 1-1 meetings with my counterparts in Office, Skype, Xbox. The little bit of jargon there is 1-1 meeting. This is an abbreviation for one-on-one meeting, a common business practice wherein two people, typically a manager and a direct report, have a face-to-face meeting with no one else ...

Enumerating the ways of choosing teams in a group of players

Suppose you have a bunch of people, and you want to break them up into m teams of size n. (Therefore you have a total of nm people.) Today's Little Program will enumerate the ways this can be done. Formally, let's say that you have a collection of size nm, and you want to enumerate the ways of partitioning the collection into m subsets, ...

Before claiming that a function doesn't work, you should check what you're passing to it and what it returns

Before claiming that a function doesn't work, you should check what you're passing to it and what it returns, because it may be that the function is behaving just fine and the problem is elsewhere. The function does not appear to support directories with Unicode characters in their names. The correct directory name is obtained if it ...