I think something that showed up after some years of coding is to think about what could go wrong before it goes wrong, like, stupid example, if I'm ordering a pizza for a friend I always ask him "and if there is no piece left?."
It could sound stupid and obvious, but the reason about why I say this is because now I don't think anymore like "well, if it goes wrong we will see what to do," now I like to have a flow chart that describes every possibility :D