I've gone to work after staying up all night before, and produced code that looked unfamiliar to me the next day. Some of it had stupid mistakes, but on the other hand, some of it was "I wrote that?" in a good way.
Granted, I'm not writing CompSci research papers on what I do at work, so the difficulty level might have something to do with it.
Granted, I'm not writing CompSci research papers on what I do at work, so the difficulty level might have something to do with it.