SPONSORED BY LOGITECH
It may be tempting to think that a developer’s productivity directly correlates with their speed on the keyboard. After all, your programming speed is limited by the speed you can enter in the characters needed to create the lines of code that compose software.
This is, in fact, a terrible measure of productivity. Your speed on a keyboard doesn’t indicate how productive you are, just as the number of lines of code or commits you make doesn’t indicate how good an application is. This is the mistake that bossware applications make, gauging whether employees are doing their jobs well by watching their keystrokes and mouse movements. That’s measuring heat, not outcomes.
However, it’s true that a lot of a developer’s time is spent gliding atop a keyboard, translating their thoughts into code—doubly so if they use Vim, Emacs, or another console-based text editor. For those of us chasing the productive rush of a flow state, it’ll often start with the interface between your fingers and the computer: the humble keyboard. Keyboards (and mice) won’t necessarily help you get into a flow state, but the good ones like MX Master Series can help keep you there.
In this article, we’ll talk about the research around developers and flow states, defeating distractions that pull you out of focus, and how the best tools are the ones that you forget about.
Flow states and the software developer
A flow state—or focused state—is when you become so involved in your task that you lose track of time and the world around you to concentrate deeply and wholly on the work at hand. It’s a pleasurable state that many of us seek out, but only recognize that we’ve been in it when we emerge from it and realize we forgot to eat lunch. Being in a state of flow feels really good because you were creating something that matches your skills doing what you like to do.
As software developers, flow states happen when you are solving problems that are equal to your skills. You need a challenging enough task. If the work isn’t challenging enough, then you might get bored. If it’s too challenging for your skillset, then you may get frustrated and distracted. You are able to rise to the challenge, but are required to invest your full self in it.
Naturally, work in front of a computer has a natural ebb and flow. Dr. Gloria Mark of the University of California, Irvine, found that a work week for information workers has a predictable pattern. Focus peaks in the late afternoon, while boredom is highest in the early afternoon. Monday is both the most boring, but also the most focused. In terms of the work, people are happiest doing rote work and most stressed during focused work.
Professor Thomas Fritz of the University of Zurich (who we spoke to for this article) found that developers spend about 50% of their workday in front of their computers. Half of that time was spent in their IDE working on code. While writing and reading code takes up only a quarter of a software engineer’s day, that is the time when they need to focus most. Any edge to reduce stress and improve flow helps.
How do these researchers know when a person is in a flow state? The simplest is to ask them at regular intervals—display a popup on screen or a smartwatch every 10 minutes or hour. While that’s an effective research tactic, somewhat ironically those requests can create disruptions and break focused states.
One of the surprising findings from Prof. Fritz’s research was that much of what we consider a productive state is individual perception. During some of the self-reporting studies, the hourly check-in that asked about their productivity encouraged developers to reflect on how they were spending their time. The very act of taking a break and considering their work made some feel better about the way they spent their time, and thus they perceived themselves as more productive than without self-reflection. For others, the self-reflection helped them reconsider their activities and change something if they were not efficient.
Additionally, developers perceived themselves as more productive the more time they spent on the keyboard and mouse.
Researchers also tried various biometric measures, as focused states often correlate with stress indicators: electrodermal skin activity, blink rate, and heart rate variability. All these biometric measures (collected from low-invasive sensors), however, were as good as or worse than just monitoring keyboard and mouse activity. Though the measurement techniques were the most invasive—Prof. Fritz’s team was essentially keylogging without logging the specific keypresses—they were able to predict focus states quite well.
While keyboard and mouse use can be highly correlated with productivity, there is no exact path from a keyboard to a flow state; if such a magic process existed, we would all be utilizing it. That said, a mechanical keyboard can help with a developer’s perception of productivity. Something as simple as a key producing a click both when pressed down and when released can make you feel twice as productive, a Pavlovian response to auditory stimuli. When a keyboard feels good, it can be easier to be productive with it.
While productivity can be a difficult and subjective thing to measure, we can be fairly certain of what it is not: interruptions and distractions.
Minimizing distractions with good tools
Another way to think about focused states is frames of mind in which you are less interruptible. Where focused states channel your attention to a single task, some attentional states are more diffuse and make you more susceptible to notifications and other distractions. Depending on the tasks that an information worker does, they may spend a lot of time open to distractions from email and chat programs, context switching between small tasks, or attending meetings. Others may spend a lot of time in focused states, writing code or debugging.
You are not immune from distractions when you are in less-interruptible flow states. But distraction can be detrimental to your focus. Dr. Mark found that it takes an average of 23 minutes to recover focus following a distraction, a significant loss of productivity.
Professor Fritz and his team used the data from the biometric and keyboard and mouse studies above to identify interruptible states. They used subjective measurements plus machine learning classification to automatically determine whether a person could be interrupted without breaking a flow state. This determination was fed into an LED light (as well as the status for chat programs) to produce red, yellow, and green statuses. Modeled after traffic lights, red means they are focused, and green means they are open to interruptions. After testing this in the field with 450 participants, the research team found that this status indicator was accurate about 75% of the time. It’s not perfect, but good enough to maintain flow states. Think of it like the status indicator on a chat app telling people you’re available or away, but this one automatically updates to match your state of mind.
You can use your existing hardware and software to minimize distractions by both reducing them and making potential context switches more seamless. Think about the applications that you have open—there’s plenty that pop up notifications or otherwise demand your attention. You can help by cleaning up your desktop and minimizing those applications that are not currently in your current task’s context. Software, too, can help by graying out anything that is not currently in your workflow or making it easier to jump into the application that you need.
Sometimes context switches are part of a single workflow. Imagine a build process that takes five to ten minutes. You can jump over to email, answer some quick questions, and be back to test the build without interruption. That workstream is more productive than just staying in the build process context. Other times, it may be that you hit an information roadblock, switch over to Stack Overflow to find answers, and pop back to your IDE. But many of us have a horde of tabs open in our browsers, making it more likely that we’ll be distracted and wondering why we switched to the browser in the first place. If your workflow includes jumping between a browser window regularly, consider limiting the number of tabs that you have open in any given window.
Sometimes a context switch can be as simple as moving from keyboard and mouse. Look at how many developers thrive on command line tools or console text editors like Vim. There may be an initial learning curve, but once you have the shortcut memorized, it becomes so much more fluid to work with everything you need beneath your ten fingertips. If you have customizable keyboards where you can customize shortcuts, then you’ll be able to move even faster.
Your hardware itself can be a distraction sometimes. Many mice and keyboards are wireless these days. Poor wireless connectivity or limited battery life can halt a productive coding session instantly. If you have a mouse that goes too slow or too fast between points, that can trip you up as well. If your hardware is doing its job, you shouldn’t even know it’s there.
Designing for invisibility
If we’re creating keyboards and mice for maximal productivity, we want the user to think about them as little as possible. We want them to disappear. Whenever you have to look at your keyboard to orient yourself, whenever you think about where your hand is on your mouse, you slow down. Think about a tennis player: the racquet should be an extension of their hand. If it feels off, if they have to look at the racquet, something is wrong and they’ll play worse. The starting point for any tool is comfort.
What we hear from a lot of developers is that they want to type as fast as they think. When they are in a flow state, they want the keyboard to act as an extension of their hands, so code solutions go from their brain to the screen as fast as possible. We don’t often think about it, but being able to effortlessly move from one keypress to the next makes a huge difference to typing speed. In fact, it has mattered for a long time—the original QWERTY layout went through a long development process to best support telegraph operators, though alternative layouts like DVORAK may or may not be faster for more modern communicators.
A comfortable, ergonomic device can save you in the long run. We’ve all seen carpal tunnel cases increase over the years, especially as more of us moved to work daily on computers. An injury like this can affect your long-term productivity, but ergonomic keyboards can mitigate pain even after suffering an injury.
Mice, in particular, can be a challenge to design ergonomically. While the design of the human hand hasn’t changed for thousands of years, there is great variability in the size of individual hands, particularly between men and women. We at Logitech have iterated over the past five generations of the MX Master mouse, trying to find the ideal shape for all hand sizes. We made a conscious decision in the fifth generation to not change the touchpoints; people love the current design, so hopefully we’ve got it close to right. For people with smaller hands, we have MX Anywhere, our mobile mouse that is smaller for portability, but if you have smaller hands, it works as a primary mouse.
For our MX keyboards, we’ve worked to include small details that make it easier to maintain flow states. Many of us have worked hard to learn touch typing and perfect our keyboard shortcuts, so any glance at the keyboard itself can take us out of the flow. Our mechanical keyboards have a two-tone color scheme so you can get a sense of where your fingers are from your peripheral vision. For those times that you ride your flow through sunset, our mechanical keyboards automatically adjust their backlighting to the ambient light around you.
Laptop trackpads have done a lot to innovate new gestures to switch between apps, make the current app fullscreen, and more. We wanted to bring those gestures to mice as well, so we added a button to our MX Master mouse that lets you switch between workspaces or go full screen, similar to the three finger swipes on Mac trackpads. For those with a multitude of tabs in web browsers, we added a thumb wheel that scrolls between tabs. We even looked to upgrade the standard scroll wheel so that a slow scroll will step line by line through a screen, while spinning the wheel will disengage the ratchet and cover a thousand lines of code in a second.
Our power users switch between the ultimate contexts: separate computers. For some, they develop on a Mac and have to test on a PC or Linux. For others working from home, they want to seamlessly jump between work and home computers. Some of our hardware has a button that lets you instantly move the hardware between computers via Bluetooth. Our ultimate solution, though, is software we call Flow. It lets you treat multiple computers like an extended monitor. Move your mouse to the edge of your Mac’s screen and suddenly you are on your Windows desktop!
Working at the speed of thought
While not all of our jobs as software developers takes place in front of a keyboard, that realm ends up being some of our most focused work. When we’re solving problems that require us to bring our full skills to bear, that’s when we want to minimize distractions and get into the flow. So maintaining flow can depend a good bit on the interface you have between your brain and the computer: your keyboard and mouse.
Here at Logitech, we try to design hardware that contributes to flow states and eliminates distractions. Organizations chase a lot of metrics to try and optimize productivity and velocity, but the best metric may be comfort. The more that your keyboard and mouse become and extension of your hand, the closer you can come to coding at the speed of thought.
Logitech is pleased to extend a limited-time offer for all coders on the MX Master Series, with the code USLOGI4CODERS (US only) or LOGI4CODERS (non-US). Offer valid on logitech.com until 1st November. Participating markets are US, UK and Germany.Tags: Flow State, mechanical keyboards, partner content, partnercontent, productivity