We all want to be productive, because it helps us reaching our goals more quickly. We also want to be efficient, because then we have more time left for other things in life. Being efficient when working on a computer also means putting less stress on your body, by using the right tools to reduce the amount of discomfort, joint movements and necessary keystrokes.
In this blog post we want to take a look at 4 productivity tips specifically directed at programmers. I won’t list any general productivity tips here, like how to plan your day or how to manage your time properly, because there are countless articles and different techniques out there that already talk about these topics in detail. This is not a “How to stop procrastinating” kind of post. Instead we want to take a look at programming/computer work related tips, that will help you specifically as a software developer.
Now, the first point on this list is focus, because it is essential to productivity. If you can’t control your attention, you can’t perform at peak efficiency. However, I have a separate blog post with tips on that particular topic, which you can find when you click here. Make sure to read it as well, because you need to have focus if you want to get anything done efficiently.
Ok, now let’s take a look at some more things you can do:
Get proper equipment
The right computer equipment will help you work much more efficiently. For one, by making your programming environment easier to use, but also by reducing pain and stress on your body. While discomfort is good and important for growth when it comes to physical exercise, you want to avoid it at all costs while sitting on your desk. This is one of the few times when you should make yourself as comfortable as possible. Pain in your back and limps not only makes programming less fun, it’s also very distracting and forces you to take more frequent breaks. If you spend hours upon hours every day on your computer, you better make sure that it doesn’t destroy your body. And since these problems get worse with time, you should act quickly.
First of all, get a proper chair. It doesn’t have to be a super expensive one. In fact, mine is from IKEA and I am very happy with it. Just make sure that it supports your back and pelvis properly and that it has an adjustable height. You can’t do much wrong with the Amazon bestseller, because the ratings usually mirror the quality of the product pretty well.
Also, get a good computer. I don’t know much about PC and laptop specs and it’s also very dependent on your budget, so I won’t give a recommendation here. I just want to suggest that you don’t be stingy about it, because as a programmer your computer is your work tool. And the time and frustration you save by using a powerful and fast machine is worth much more than the money you have to pay on top.
Just as important as your computer specs is the available space you have on your screen. If you have a laptop, get an external monitor for when you work on your desk. If you have a PC, get a second monitor or one of those wide-screen monitors. The extra real estate is something I don’t want to miss anymore, because it makes working on the computer much more convenient. You can move windows around, keep different programs in sight at the same time or watch a tutorial in full screen while writing code simultaneously. For a while I even had 3 screens, but this was a bit too much. 2 screens is the sweet spot for me. Again I would just go with the highest ranking devices on Amazon, which would be this one for the 24″ range, and this one for the ultra-wide range.
I’ve already mentioned in other posts that I am a big fan of this trackball mouse. I developed really intense shoulder and wrist pain from moving my mouse around all day, to a point where I was almost unable to work with a computer anymore. But this trackball mouse helped me immensely with that problem. Instead of moving your shoulder, arm and wrist around to move the cursor, you just have to move your thumb while the rest of the arm stays still. You might need a couple hours to get used to it, but then it’s very comfortable. However, I recommend keeping a second, normal mouse on your desk as well and alternate between these two. This way you can switch between using your thumb and using your arm and shoulder, while the other parts can rest.
If you bought the Logitech mouse, it also makes sense to buy a wireless Logitech keyboard, because you can connect both devices with only 1 USB plug. I have this exact one here. I prefer wireless devices because you can put them on your lap when you lean back on your chair. You can also move them to different spots on your desk if a certain position starts to feel uncomfortable. And the batteries last very long, so you don’t have to worry that you have to replace them very often.
But this is not a infomercial, so let’s get to the software part:
Learn to harness your IDE
Even though programming is fun, it also means doing a lot of the same stuff over and over again. Fortunately, most IDEs (Integrated Development Environments) like IntelliJ/Android Studio provide a lot of handy features and shortcuts that make working with them easier and automate a lot of repetitive stuff, especially when it comes to writing boilerplate code. Not only can they save you from typing the same lines over and over again, they also help you navigate through and refactor your code much more efficiently.
However, it can be quite hard to figure out how to use and configure these shortcuts properly, because these IDEs have a ton of available settings and customization options. But hey, that’s what tutorials are for, right? I have a playlist on Android Studio productivity tips with videos about shortcuts, live templates, plugins and other useful stuff, which you should definitely watch if you are an Android programmer. You can find it when you click here. I will keep adding videos to this list, but I will make sure to put the more important ones at the top, so you don’t have to watch everything. You also don’t have to learn everything at once. Just applying the techniques from one of these videos will already improve your efficiency greatly.
Now I’ve been programming for Android almost exclusively since I started to teach myself how to code, so I pretty much only know how to use Android Studio/IntelliJ, but I guess most IDEs have similar useful shortcuts and plugins. A quick Google search will find you some instructions.
Knowing how to use your IDE efficiently will help you with the next point:
Write clean code and refactor early
When you start a new project or implement a new feature into a bigger project, at first you just want to get that thing to work. In this phase you don’t care so much about good programming practices like proper variable naming or extracting duplicate code, because it’s more important to first make this feature do what it’s supposed to do. That’s ok and might be inevitable in this phase, but make sure to refactor your code as early as possible after you’re done.
Since the code is still fresh and you still remember what exactly each part does, you might think that you (or your team members) won’t have any problems working with it later. But as time passes and the project gets bigger and more complex, not properly written code can become very hard to work with and impossible to untangle. Bad naming conventions, long methods and other code smells are easier to fix when the code is still fresh on your mind. And the more often you refactor, the smaller the necessary changes are, so don’t delay it.
Make sure to document and describe the functionality of each important part of your code with understandable comments. Again you might think that you will still know what exactly it does later on, but 6 months down the road the reality will be different. When you are away from your own code for long enough, it’s very likely that you forget how exactly it works, even if it made total sense when you first wrote it. And when this happens, it’s much easier to read a description of what the code does in plain English, than going through each line one by one trying to follow the programming logic. An it’s especially important when you work in a team, because then you don’t have to explain the same stuff to your peers over and over again.
Writing clean code and documentation is great, but sometimes you just have to step away from the computer for a while, so let’s get to the last point:
Take breaks when you’re stuck
As much as I am a fan of the flow state and long, uninterrupted stretches of focused work; when you are stuck with a problem, there is no point in forcing it. If you feel like you’re not making any progress, go away from the computer for a while. A break can help wonders and even if you are not actively engaging with a problem, your subconscious mind will keep working on it in the background. If you can, try to do some form of physical exercise in that time. It not only helps you disengage from the coding problem, it’s also very healthy and will keep your body intact.
Ok, those were my 4 productivity tips for programmers. At this point I also want to recommend my “How to Use Google to Solve Your Programming Questions” blog post. Knowing how to quickly find what you are searching for will also help you quite a bit in terms of efficiency.
Do you have any productivity tips for programmers? Let me know in the comments below!