Not a trick of the programming trade, but: life will not be clean, smooth and according to plan. Learn how to deal with things getting messy and derailed, and to accept that you "lost your streak" or whatever. Tomorrow is a new day, it is always ok to start over.
Do optimize for the long term, but also realize you could be dead by next morning.
Do optimize for the long term, but also realize you could be dead by next morning.