Am I using a subtle or sophisticated algorithm where a simple one will do the job? Am I implementing a more general algorithm than is needed? Am I doing something because it is elegant, or because I need to do this? Am I imposing some irrelevant rule on myself? Am I becoming emotional and creating artificial deadlines? Am I trying to write a very compact code or to avoid unnecessary repetitions? Am I trying to avoid typing in unnecessary comments? Am I getting carried away and putting in too many comments too early in the life of the code?
Is the code debuggable? Is it structured? Should the structure be simplified? Are there global connections (global variables, etc.) that should be eliminated? Am I running into combinatorial difficulties (too many possibilities)? Is my algorithm running into disastrous CPU time problems - have I overlooked a combinatorial explosion?
Am I importing a language from one part of the code to another part, where it is ill-suited? Am I forcing myself to keep in mind a larger part of the problem than necessary? Do I have too few (or too many) interfaces? Is the code sufficiently modular? Have I created so many small files (functions) that each one has no obvious purpose in life, and it is hard to understand what it is supposed to be doing?
Am I running into the 7 +/- 2 rule? Am I trying to function as a digital device? Are my comments sufficient? Are they informative or written formally to please the professor (or for some other reason unrelated to the debugging of the code)? Should (can?) I introduce more self-consistency tests?
Am I ignoring the possibility of boundary effects, such as allocating 20 elements of an array where 21 are needed? Have I created a nasty bug by trying to save 64 bits of memory? Am I paying enough attention to the type of error message (or lack of it) I get? Is the error where I think it is, or am I looking for it in a wrong function, because I was too lazy to put in an extra "printf" statement? Have I failed to initialize something?
Have I been asking the questions "How do I fix this code?" and "Why does not it work?" instead of "What should I do to find the problem efficiently?" ? Am I trying to find the problem in the code by looking at it (instead of running tests?) Have I screwed up the last change so badly that it is better to go to the latest backup?
Does my code do anything non-standard? Should I replace it with a more standard structure? Am I suspecting an "undocumented feature"? Should I remind myself that my error is more probable? Again, am I using "gears from the middle of the table"?
Am I biting off a bigger chunk than I can comfortably swallow? Should I separate the piece I am debugging into smaller components? Am I trying to reduce the amount of rewriting to be done by implementing a more or less final version at once (as opposed to debugging a minimal version of the algorithm and incrementally converting it into the final product)? Am I forgetting that it is much easier and faster to make incremental changes (each of which is trivial to test) than to make a large change and debug it all at once? Once I have created a bug, am I forgetting to use the "divide and conquer" approach? Am I forgetting that most errors are made at the interface of the algorithm and the code? Am I forgetting that the debugging code is more likely to have bugs than the code that is being debugged?
Is my debugging environment comfortable? Am I avoiding checking something because it is difficult to check in my debugging environment? Should I write some debugging code? Am I avoiding writing it because I am being lazy? Alternatively, should I use a part of the code I have already tested as a debugging platform for the code I am writing? Am I keeping enough backup copies? Am I forgetting to test self-contained parts of the code exhaustively before turning my attention to other parts of the program? Have I forgotten to perform the final testing of the finished code?
Am I trying to write an efficient code when efficiency is irrelevant? Am I trying to optimize parts of the code without first profiling it? If optimization is indeed an issue, am I trying to write an efficient code at once, instead of first debugging, then optimizing? Am I optimizing a wrong part of the code? Am I running into the 10/90 rule? Am I trying to save on the rewriting of the code later by debugging an efficient code at once?