As you are doing that very thing you are doing, do you think about why you are doing it? Why the work you are doing is important and if it really is? Is it busy work, something that just adds noise and keeps you distracted or it is really important? Is the work you are doing taking you a step closer to where you want to be?
There is a (un)productivity epidemic in many organizations, whose reason being, we don't differentiate between busy work and the work that should keep us busy.
As you write a line of code, or work on a design, or build parts of a system, do you think why you are doing what you are doing? Pausing a moment to reflect will allow you to regather and reorient towards the right objective.
See, the problem is that we don't have a lot of time. And, every bit of time we have, if we don't focus on advancing ourselves (as a race), we are wasting our talents and opportunities. A large part of organizational inefficiencies stem from creating busy work, or simply, work which does not matter. Busy work creates fake sense of accomplishment and a distraction. It does very little to move the bottom line for you as an individual, us as a race, or the organization you work for.
So ask yourself before every work you do. Why am I doing what I am doing?