time lapse photo of tunnel

Little Frictions

Today I bring you something a little different than usual. I wish to talk about a topic prompted by my experience as a manager rather than as a developer. I want to tell you about the little things that drain your mental energy, and that, in the long run, can affect your performance.

In my perch as a software manager, I get to see how many developers work, their quirks, their unconscious habits… and also their output. And I’ve noticed that often we are used to certain things that distract us or eat away at our mental disposition, without questioning or even noticing them.

Do your work in concentrated bursts of maximum focus

I have a mantra during my day: “I want to do my work as fast as possible so I don’t need to prolong my day and chip away at my family or personal time.”

As a manager, I bet that won’t sound strange. Managers are famous for driving their employees with hard demands and querying about deadlines, at least where I come from. But there is more to that statement. It is not just about having time to live outside work, it’s also that in my experience, the longer you work, the more tired you are and the lower the quality of your output is. Low quality work does not just upset your customers: you’ll have to come back to it and fix it some other day.

I also feel that the more you work on some task, even over several days, the less motivated you’ll be to work on it. You’ll soon become annoyed, and as your judgement becomes clouded, you make poor decisions in how you solve the problem at hand.

I believe it is better to implement a task by applying concentrated effort, for the minimum amount of time needed, at the top of your capacities, than multi-tasking over a period of time or just “taking it slow” to conserve your energy until the end of the day. I like to compare it to the Karate concept of Ikken Hissatsu: “to kill with one blow”.

You can’t do everything, so do the essential well

It may not be obvious how that can realistically apply in practice. Even more pointedly, how it can relate to coding, but this is not the right place to explore that. 

I’ll just say that this term encapsulates one of the main principles of Karate, as I understand it. Be as efficient as possible: choose the quickest technique that you can apply with enough strength to be decisive. 

A non-consensual fight is chaotic and unpredictable. Your opponent is constantly reacting and changing the situation before you. Typically, you don’t control your surroundings and don’t know if there are other assailants ready to ambush you. In this situation, the best strategy is to quickly diffuse the imminent threat and escape… or address the next threat. You won’t ever have the chance to apply the perfect technique, so make the first blow good enough to finish the fight and avoid a comeback. This efficiency requires hard training, but also mental presence and acute lucidity. If you let your mind go, you won’t be able to pull it off and will stay in danger.

Likewise in engineering. If we had the luxury of time when we implement a story, we would do a detailed analysis, refactor the existing code, add our contribution, test it and document it extensively. This is a perfect ideal, and we often are interrupted before we can get there. Team and commercial pressures require your work to be done so that someone else can start on theirs. Or business needs require some new functionality to be brought to production even before full testing. Some other product is now urgent and you are needed there. How can you finish your work at short notice, or before you’ve had time to do it perfectly?

The answer is to focus on the essential. Identify the most effective way to address the problem at hand. Not the quickest solution, but the quickest one that adequately solves the problem and provides a good exit.

Once you’ve done the essential, if there is still time, reduce the dangling loose ends as much as you can. Prepare for the day when you’ll have to come back: prioritize making your code, and the untackled problems, easy to understand.

You need your whole mind available so avoid wasting energy

This is a hard objective. As in Karate, if you want to perform quickly and efficiently, you need clarity of mind to make crucial judgements. An engineer’s day is full of taxing problems draining energy, but other demands also sap mental power. There is only so much time that your peak focus will last. 

Things like a loud and distracting environment, frequent context-switching, or a disorganized workplace all demand some intellectual expenditure that, even small, are nothing more than waste and diminish one’s mental budget for the current task. There are several strategies to optimize your output. One common suggestion is to take regular breaks to rest and recover your capacity. You can also act on the other end, and reduce your energy outgoings. It should be obvious, but

Reduce your rate of wasted energy, and you’ll perform at higher capacity for longer

Think of an Olympic athlete swimmer. Every little friction reduces her speed just a tiny bit, but these add up to increase her time. So swimmers reduce them as much as they can: in their technique, in their suit, even in their bodies. The same happens in all kinds of racing, from running to F1. Every little friction adds up and reduces speed.

For us engineers, our mental energy dictates our efficiency, and we too have frictions. Here are some I’ve seen. See if you recognize them, and notice how each of these can reduce your capacity to maintain the focus on a single hard task or waste unnecessary time. In my experience, a little time spent fixing these can create a much more pleasant work experience.

Poor grammar, short or badly phrased comments, names chosen with little thought

Most of the frictions in this list apply to the environment surrounding us as we work. This one is different and applies to the object of our work: our code and documentation.

We all have to debug. Despite our best efforts, we will always create bugs or have to solve someone else’s. The first step of solving one is to understand the problem, what it is we’re trying to do and what is going wrong. The second one is understanding why it is going wrong.

For this, it is essential to read code. Most of the energy spent in problem-solving is explaining the error, and understanding the code behind it. Properly named variables and functions make the code more transparent and reduce the brainpower needed to do so. Occasionally, that may be supported by judicious comments. Conversely, though, these will be detrimental if they are poorly written or, even worse, left out of date.

Unsorted lists and inconsistent standards

As part of our work, we often create tools to help, for example, little applications or scripts. These tools may grow haphazardly as we feel their need. They may end up having very inconsistent names or even nearly-random commands or scrambled option lists.

If names are unpredictable, it will take longer to remember or find what you need, and even if you manage to memorize the right way to express commands, having exceptions requires you to make a bigger effort when storing and recalling that information. Equally, if you have options that are not organized in any logical way (for example, alphabetically), you’ll have to actively sort through them to find the one you need at any one time. 

Although it is easy to ignore these, because “it’s only tools and not production code”, these inconsistencies create a permanent drain that is there every time you need to use them. Although tools are written to make our load easier, these defects create a feeling of wasted effort that may even put us off from using the tool in the first place. 

Too many windows and tabs open at the same time

Often you need something else you already have open. The longer you take to find it, the more likely it is that your train of thought will be derailed. Browsers with many tabs are great when you want to store things to read later, but the more you have, the smaller they will be. Their title will eventually disappear and it will be impossible to find anything without clicking through them all. Pure waste of time.

Collect the links in a document and close them. You can always open them later.

Disorganized documentation

Similar to the previous one. Even if your documentation is good, if it is not organized predictably, you won’t be able to find it efficiently. This leads to ignoring it, and redoing unnecessary work, or interrupting someone else to help you find it.

Poor choice of colours, font size, or window size

These all have similar effects of making information hard to read. You have to squint to absorb the information or scroll multiple times to make sense of the text. You may not even notice how this reduces your capacity, because it can be continuous throughout the day and you may get used to it. But if you have to try harder to read, you read slower and get more tired. 

For your sake, and that of your eyes, choose contrasting background and foreground colours, and a big enough font size. And organize your desktop to minimise the number of mouse clicks you need.

Confusing contexts

Some people prefer to have multiple windows open to monitor different sources of information at the same time. Some even have transparent backgrounds. This can become confusing when transparent windows go on top of each other and different contexts get jumbled together. For me, it is similar to watching two TV channels at the same time or listening to two conversations in different languages. Simply put, it’s a mental drain. 

Separate contexts cleanly. Put them side by side, not on top of each other. And if there is not enough room, it may be time to invest in another monitor, or a larger one.

Distracting environments

Some people like to work in loud and lively environments, like a cafe. Others prefer to listen to the radio or have a TV in the background. 

If you need to focus, I don’t think this helps. Even if white noise helps you concentrate, conversations in a language you understand tend to be distracting. Your brain will be applying energy solely to the task of diffusing and ignoring the background noise.

You may enjoy it and think it does not affect you, but again, it’s a constant stream of wasted energy you could be applying to your problem instead.

Too many things to do at the same time

This is probably more than a little friction. If this is recurrent, either you have to work on your prioritization skills or find out how to delegate more of your work. But whatever the cause or the solution, while this situation lasts, it creates friction. 

While you work, your brain worries in the background about all the other things you still have to do. It anticipates the need to interrupt what you’re doing before you can return to it later, with the effect that you are not applying maximum focus to your current task and are implicitly briefly context-switching.

Questions

Thank you for reading. If you enjoyed it, please let me know if there is anything to this topic, or if it’s me just obsessing about small details. Maybe what I call bad habits or distractions are good for our mental health? Maybe they do cause inefficiencies, but those preserve our interest throughout the day? 

Or if you agree with me, what else have you found can be a little friction? Let me know in the comments below.

Thank you.

Leave a Reply