It's been a long time since I've written logic so complex. It took a day to think about the code implementation, brainwave, to figure out how to compute the node energy while constructing the tree structure, without completing it, the sense of accomplishment has been bursting. The design is perfect, but the details of the implementation are very great, and the extensibility of the code is taken into account, and three functions take two days to write the code. After checking the last pass logic, satisfied left the laboratory, slept a comfortable sleep, sufficient energy to debug.
Although already psychologically prepared, the time to find the bug is much more than the time to write the code. But debug really is very suffering. Running DLL heap corruption is obviously caused by pointer out of bounds, array out of bounds. However, the kernel and debug runtime libraries provide no further information except for the segmentation fault. Already familiar with the logic had to repeat over and over again, this type of error must ensure that the mind is clearer than the code!
Is debug a kind of foresight or meeting? Can you foresee or only meet?
Debug can only meet unforeseen