Even when you try to plan your life down to the tiniest detail, you cannot foresee everything. When I joined Onfido in January, I had just moved to London from another country — change like that requires a lot of planning ahead so I had my next few months nicely scheduled. Then, on the second week of work I fell down the stairs, broke my dominant arm, and had surgery which immobilised my arm for over a month. Not a perfect way to start a new life with a new job in a new city, is it?

In this new situation I realised a few things. First, that I always took my health for granted. I never appreciated it enough and suddenly I realised how hard it is to do basic chores with just one hand. Tying shoes and commuting to work became a challenge. But the real difficulty was getting back to work and code.

Fortunately, I found various hacks to help me both to stay productive and also cope with this new reality. Whether you struggle with a similar situation or just want to improve your performance, I think you might find the following hacks helpful as I found many of them useful long after I recovered.

Typing with one hand is obviously much slower and error-prone. I didn’t realize how much it can impact my flow, but I constantly found myself waiting for my hand to finish writing, as my mind was already moving ahead to further lines of code. There are different techniques to increase the speed of typing itself but I found that the good old CTRL+V can really improve your work. I am not talking about violating the Don’t Repeat Yourself (DRY) principle and polluting the code with almost identical pieces of code. But in every technology there is a lot of the boilerplate code you have to write. I use React everyday and writing React class component is one example — usually it’s not a big problem to write it and after some time you just do it automatically without even thinking. However with one hand it is much easier to create a snippet and then reuse it whenever you want. Many IDEs have support for custom snippets and macros. Just spend an hour of your day configuring it and your productivity will skyrocket.

Example of simple code snippets configuration in Atom IDE.

The second thing I discovered was voice typing. Some people love it, some hate it. I am not a big fan of talking to the computer myself (my poor accent does not play well with Speech-To-Text solutions) but after the accident, using voice to write emails and Slack messages turned out to be a really efficient solution. I didn’t go further and code using voice commands but many have tried that. There’s an amazing talk by Tavis Rudd from PyCon where he explains how he used Python to code by voice after he suffered from a climbing accident:

Using Python to Code by Voice — Tavis Rudd

Finding solutions to improve coding speed isn’t all that matters. Sometimes taking an additional day or two to rest might be all you need. I tend to underestimate my physical health, but after the accident I’ve started to realise that you shouldn’t push yourself to the limit and try to get back to work the day after the surgery. In the hospital I witnessed another patient who was taking calls from his boss immediately before and after his surgery, apologising that he couldn’t make it to the office that day. If your company respects you, they will give you time to undergo the surgery, as well as time to fully recover.

It is also important to get support from your environment — it can be your family, your partner, or your coworkers. It is crucial to stay conscious about your mental health, especially in the situations of trauma. Some companies offer mental health support — at Onfido we teamed up with Sanctus who provide us with 1:1 mental health sessions.

And remember to stay positive. Right after the accident I started to imagine the worst possible scenario. But in fact reality turned out to be much brighter than I envisioned. The quicker you start to keep a smile on your face rather than allowing the situation to drag you down, the faster you’ll recover.