A large fraction of code I write at work is either network protocol reverse engineering or interfacing with physical devices. Peeling stuff open layer by layer is often the only way to approach a problem and if I had to document everything beforehand, I would end up writing the same program twenty times.