I think there are methods and patterns to be learned. Engineering is mostly a succession of problems, with a somewhat illusory prize at the end. But a lot of people currently in software development are not trained well to withstand the journey. And for some, it’s just that they have been doing it since high school or something.

One of the thing that is important is to segment the work and have checkpoints and mini bosses. You don’t climb a mountain in one go. That’s one of the reason I dislike LLM in coding is because coding is my down time after a deep thinking session.

Another thing is to have an end goal in mind, and plan the journey according to those. You do this by having enough information about the business domain. I’ve seen people rush blindly into solving problem and get a burnout in the process. This also help with pacing yourself to a sustainable rate of effort.