I was working on my MUD program yesterday, trying to finish up a layered I/O system (to read/write from files, databases, or somewhere else), and started testing it. I promptly ran in to the problem of not being able to overwrite a save file for my login. I figured the defaults on the C++ ofstream open would truncate the file, but it didn’t seem to work. So I added std::ios::out | std::ios::trunc to the open call and it still didn’t work!
I later (as in earlier today) realized that I had first run the binary as root, and later as my normal user. Obviously I didn’t have permissions to clobber root-owned files. Turns out I had no problem (other than my brain wasn’t working).
Apparently my Google Analytics to Google Earth KML converter was popular over the weekend, my traffic spiked up about four times normal, and still hasn’t fallen back down to the typical level yet.
I’m glad people find it useful. I just wish Google would build it in to Analytics already.