Reason 1: Overcome frustration
Programming is about constantly being told that our assumptions are incorrect. This can be a bit frustrating at times. One of the ways that frustration rears its ugly head is when we're unsure what are efforts are for.
Focusing on the long-term means being able to put those frustrations aside, as the short-term difficulties are in service of the long-term thinking.
Reason 2: Become indispensable
Taking your time to deeply learn tools and topics, as opposed to just having a surface-level understanding, means we become indispensable over time.
You might be more productive at the onset by blazing through resources to get the job done. The thing is any decent developer can figure out how to use a tool, but few are willing to invest the energy required to deeply learn the technology. This means there's a big payoff for deep learning.
The initial investment pays off in the form of speed and expertise for subsequent issues in the future.
Reason 3: Develop discipline
Being disciplined is not about increasing willpower.
The real trick is to focus on the long-term. Get clear on what it is you want to achieve later. This makes it easier to decide whether a particular act is worth doing or not in the present.
Is this in service of the long-term goal? Then do it.
If not, then don't.
This surprisingly simple framework will keep us focused and committed through challenging projects or complex overhauls when we're tempted to take shortcuts or cut corners that ultimately hurt us in the long run.