It's better to stay in the present moment: What should you be doing now, to be/stay fulfilled?
Your best successes are likely to be random, very hard to foresee and not what you expected at first, anyway.
Long story short; Michael loses the company a bunch of money on a foolish marketing scheme, and gets Dwight to take the fall. David Wallace drives down to presumptively fire Dwight. Instead, when Wallace shows up, he gushes that Dwight is a genius because it appears that although the marketing campaign has cost an immense amount of money, somehow it worked out and Dunder Mifflin is, in the end, far in the black.
The moral of the story is judge decisions in the future by the information the person had at the time of making the decision. A stupid choice that happens to work out is still a stupid choice.
After a long day at (usually at least mildly frustrating) work, it's just hard to work up the energy to just keep coding.