> Some cases where your imagination could be limited are:
> - Code that you didn't write.
This has become the norm with software written by a team; and to my stress, I find many coders have given up understanding code that other people wrote and reduce to the minimum that get by. My premise is the necessity of understand the code -- not only how the code work, but also how the code is conceived and where the code is evolving toward. After that premise, there is no difference between code that you didn't write or you did.
> - Code that you wrote long enough ago that you don't remember the details.
That says a lot that the code was not written in its optimum way. Treat that as a bug, and debug why the details cannot be easily retrieved.
> - Code that you know very well, but you're having a bad day and can't figure out the problem just by thinking about it.
You should always take a rest and tackle it the next hour or next day when you can work effectively. Continue to push through a bad day only has the opportunity to make the day worse.