Cordial Coder

soft skills for software developers

Keeping Digital Distractions at Bay with Goal-Oriented Coding

As discussed previously, there's so much more to a developer's job than just coding. Requirements gathering, capacity planning, demos to stakeholders, code reviews - it almost seems like there's an endless amounts of things a developer could be doing besides coding.

On top of this flurry of non-technical tasks lies the innumerable ways that our constant access to information can distract you.

When you're in the middle of writing code, especially when stuck on a hard problem, it's so easy to think of all the other things going on.

The thing is, it's 2017 now. If you've got a laptop, a phone, and an internet connection, you've got the entire vault of the world's information at your disposal at virtually anytime. Your entire life is basically an endless vortex of digital distractions. And then there's the trouble of managing each distraction subgenre.

Never before have humans had this level of access to information. And as a developer, you're at the forefront of this information revolution. Hell, you're literally building it.

As such, the temptation to distract yourself is very real. You're behind a computer for most of the workday, and probably always have your phone within arm's reach (I do right now, flipped upside down on my desk to give myself the idea that maybe I won't check it every few minutes - you can guess how that turns out). Just think about it this way - with your phone in your pocket, you generally have access to the internet all hours of the day.

Setting goals to organize your development work will help keep these digital distractions at bay. In a sense, you'll be writing a contract for yourself to follow. Even if you don't meet it, it'll serve as a reminder throughout the day about what your priorities are.

Quick example - on some level I know that browsing Reddit, even if I'm reading something programming-related, is not 100% relevant to my coding tasks. But organizing around a set of specific goals gives me something concrete to consciously compare those activities against.

Browsing Reddit wasn't in your goals for the day you slacker (or was it?)

These goals should be as small and manageable as possible. While this principle has been around for a while in human motivation (like
SMART goals), it's more important than ever now. Because of the number of interconnected devices we have available to us, we can always reach for a quick fix. An article here, a swipe down a feed there, a quick mobile game fix every once in a while...

Explicitly mapping your top priorities to these small, actionable goals is a great way to offset this constant stimulation. This way, you can stay motivated and laser-focused on your development tasks amidst lurking distractions.

Here's a vanilla example of workday coding goals for a front-end developer:

1) Investigate root cause of bug A (timeboxed, one hour)
2) Determine strategy behind implementation for a new view
3) Create skeleton file for the new view (comments outlining feature, function definitions)
4) Write function x that does y
5) Generate a JSON object with dummy data, feed to function x
5) Test on local development server

The more specific your goals, the better. Craft them to build upon each other if possible. I've also learned that certain activities should be timeboxed, like bugfixes. If something isn't a high priority but could potentially drain all of your time, it's best to keep that work in check.

*image here* Separating clearly defined work from activities that could become major timesinks - like spending time with adorable puppies - is an important skill (yes this was an enormous stretch, but worth the puppy pic)

I think that crafting iterative, impactful goals like this for each workday will make you an enormously productive coder. Completing this continuous stream of tasks will keep you motivated. It will also give you a foundation to prioritize other non-pressing tasks accordingly.

Knowing how to prioritize your work is particularly effective during chaotic times. When late requirements changes, miscommunications, or a deluge of requests strike - being able to define which tasks are most important will increase your effectiveness.

A major design change happens last minute? Write a set of actionable steps to adjust for it.

Loads of slack messages and emails rolling in? Doesn't matter, they'll have to wait until that pull request is made.

An "urgent" request or bug ticket comes in from someone? Prioritize first, but if it's not actually urgent it can go to the bottom of your todo list.

With this mindset, unexpected setbacks can be adjusted for on the fly. You just insert a new set of steps before (or after) your original workday goals. This also keeps you focused and more relaxed because it gives you a sense of control over unpleasant surprises.

A goal-oriented mindset enables you to pick your priorities and focus on them, even in charged situations

In summary, these are the three steps you should take to foster a goal-oriented mindset:

1) Prioritize your top tasks
2) Organize them into manageable chunks
3) Relentlessly pursue those tasks, even if that means excluding lower priority ones

The benefits of this approach are innumerable. You'll become better at prioritizing your work through comparing the value of the various tasks you have to complete. You'll also have a better understanding of your work cadence over time. Most importantly, the commitment you'll make to your set of tasks every day will give you a defined vision of what needs to be done - and the clarity needed to swat distractions aside.