I've been thinking a lot lately about what makes me productive vs unproductive. A lot of the time Software Developers tend to focus on their tools and environments when they think about productivity. I'm certainly all into that, as you can see if you look back, through, my blog. But in my mind the most important factors in building productivity are non-software related.
By far the most important thing I've found for being productive was setting clear goals for what I want to get done. Without goal posts to aim for, it's hard to tell what you've really accomplished, and easy to get pulled off onto suboptimal tasks. Goals are best set with a wider context in mind. The act of setting and measuring goals tends to make us focus on those areas, so make sure your goals reflect your priorities. If you set all of your goals around work, it can be easier to justify neglecting your family. If you set a goal of writing every day, that might overwhelm time for exercising and keeping yourself healthy. Therefore its helpful to set goals in a holistic way that allows you to judge what you value in the big picture.
Mechanical / Creative Tasks
I saw a great comment on Hacker News the other day that differentiated between projects and chores. The idea is that when you're feeling productive you should work on projects, when you're not you should do chores. One of the biggest boosts to my productivity I've found was when I started categorizing work in my head as "mechanical" vs "creative" tasks. Mechanical tasks (ie chores) are things that require little mental energy. They're well defined and possibly onerous. Examples include filing email, documenting code, code reviews, and low-thinking code tasks like reproducing a client issue or adding a small well-defined feature. Creative tasks for me tend to look like more involved code changes designing new features, or debugging client issues that aren't obvious.
I'm not universally energetic or productive. Some days I can focus intently on a problem, other days I have the attention span of the dogs from UP!. When I'm able to focus, I intentionally put aside mechanical tasks, and leave them for times when I have less energy, continuous time or attention. Oftentimes I'll even put off higher priority mechanical tasks (or vice versa) to match my mental level to the task, because I end up getting more done sooner in the long run.
Productive Environments are a thing
It's easy to think of productivity as a purely internal thing. But the environment you're in matters too. For creative software work that means getting large blocks of non-distracting time. That requires some intentionality. I've been blessed with a workplace where I'm given plenty of flexibility. That means that at times of high distraction-level (big projects, lots of meetings) I tend to actually do most of my work outside of the office, sometimes at weird times. I use my time at the office for mechanical tasks and meetings, and do the creative work elsewhere. That's obviously suboptimal, and when I can I try to clear time during days to do creative work at the office and bunch the distractions. However it works out for you, the key is to (as much as possible) group your distractions and leave large un-interrupted periods for creative work.
Distractions can be self-inflicted as well as coming from others. When I want to get stuff done, I try to listen to familiar music (oftentimes looping a single album for a few days). I'll also close Slack/Twitter/Email and other distracting apps. Note that the distinction between mechanical and creative is important here. When doing mechanical work, I'm fine having distractions around. It's only when I'm trying to harness mental energy that I care.
Day to Day work adds up
I'm a magpie. I love shiny new tools, projects, and ideas. It's very easy for me to get bored with a problem once I feel like I understand it. I get excited by pouring effort into learning something new, not so much the hard work to finish the last 20% of what I've started. What I'm slowly learning though is that it is my day-to-day work that makes an impact, not my crazy productivity binges. Making things that last requires day to day dedication. That also means maintaining focus. The easiest way to waste day to day hard work is to spend it on a different thing each day. There's nothing wrong with trying new things. But real productivity requires setting some priorities and sticking with them for a while.
Team matters more than the project
Finally, individual productivity doesn't happen in a vacuum. Who we work with can undermine or boost our results. I don't believe that it's a small difference either. I'd rather have a great team with no individually brilliant members than a bad team with one or two great programmers any day. One of Windsor Circle's values is that teams survive longer than individuals. The same can be said of their results. Teams can magnify what is possible for a product. Any individual has limits on what he or she can create. Teams allow for those limits to be lifted by building on each others skills. At the same time, teams can limit each other by fighting, mis-communicating, distracting, or pursuing different goals. So all of the other productivities ideas here can be applied just as well to a team as they do to an individual. The best work comes from teams consistently working together towards a common goal over a long period of time in a constant and productive environment.