I really agree with this thought that when software engineers are procrastinating, they are actually thinking. Yes, all that web surfing and IMing is actually doing work.
Recently, I had some stuff to write that was complex; the algorithm was not entirely straightforward. So as I was about to get down to work, in my mind I was thinking: I should get this done, but it seems kind of complicated. So I played some Warcraft. Then the next day, I thought: Gee, I should get cracking on this so it doesn’t become blocking, and so I played some more Warcraft. Finally in various random moments where I was waiting for the microwave, walking to school, taking a shower, etc I cleaned out the nooks and cranies of what I needed to write. Then I played some more Warcraft.
But when I actually got around to doing everything, I just needed to type it out and it was done. No need to think about how to do it, no need to refactor. Of course, now I need to do some testing to see if the algorithm actually makes sense.