How can you be a more productive developer? That’s the million dollar question.
As a professional developer, one of the most difficult challenges you are faced with is being able to stay focused on tedious lines of code for hours at a time. Whether you’re programming professionally or just fun, you probably have goals you want to achieve, and staying focused is key to achieving them.
I always had trouble staying focused, so over the years I figured out a number of techniques or hacks that have since helped me become a lot more productive.
Although I haven’t found a way (yet) to meticulously measure this – my guess is that, when implemented, these hacks increase my productivity by 100-200%.
So lets get down to business. Here are my 10 productivity hacks:
1 – Use multiple external screens
How many times do you switch windows during a working day? If you are anything like me, I am guessing the answer is in the triple digits.
If you are fast, maybe you can find and switch to the desired window in 1-2 seconds… Imagine all of those seconds added up throughout the week, month and year.
You will be surprised how much having a second screen can increase the amount of work you can get done. It is so much more convenient to have everything you are working on visible at once.
For example, if you are doing web development, you might have the code on one side and your application running on the other, so you can quickly see your changes without having to keep minimising/maximising windows.
Duel screens can also be useful for following documentation or guides on one side while having the code you are working on on the other.
Having two external screens is ideal, however, if physical space is an issue (as it is in my case), then a single good sized external screen will suffice. This is what I use.
The main benefits of using one or more external screens are:
- It reduces the need to be continuously switching between applications.
- It will improve your posture. Studies suggest that improving your posture can help keep you energized (and thus focused) for longer.
2 – Use multiple virtual workspaces (Windows 10 feature, Linux)
If having multiple screens isn’t an option, then a close second is using multiple virtual workspaces.
This is one of my favourite features which was included with Windows 10 (it has been available on OS X and Linux machines for a while).
The key is to have dedicated workspaces for specific parts of your work. I typically have three workspaces running at any given time:
Screen 1: For non-code work apps (JIRA, notes, task list etc…)
Screen 2: Dedicated to technical stuff (code editor, terminal windows and debugging)
Screen 3: For non-work related apps like Spotify
The benefit of this is it allows your mind to focus on one thing at a time, as you can separate the distracting windows from the ones you need to focus on. Additionally you can switch between groups of windows, instead of having to switch between them individually.
Here is how to get started if you are using Windows 10 (or above) or OS X:
First, create some new workspaces by pressing Ctrl + Windows + D. Then use Ctrl + Windows + Left/Right arrow to navigate between them.
If you need to move applications between the different workspaces, press Windows Key + Tab and drop your windows into the necessary workspace.
Mac OS X
To create new workspaces on OS X, press F3 and click the + symbol on the right.
To switch between workspaces press Ctrl + Left/Right arrow.
3 – Close all unnecessary tabs and windows
This is a simple tip, but highly effective.
Close all windows and tabs which are not absolutely 100% necessary or related to what you are currently working on. Get into the habit of closing things you are not using, and re-opening them as and when you need them.
Clearing away all unnecessary windows will give you two main benefits: Firstly, it will free up resources on your computer making it run faster. Secondly, it eliminates distractions, allowing your mind to focus entirely on what you are trying to achieve.
4 – Keep a clean desk policy
Many companies I’ve worked for had a clean desk policy. I always thought it was a just a vanity thing. But over time I realised that there are a number of other benefits to this.
Keeping your desk clear of any visual distraction which is not related to what you are working on frees up resources in your brain to focus on things you need to do. Also, keeping things like your phone out of sight will help eliminate common distractions, like emails and recruiter phone calls… (Just kidding, I love recruiter phone calls).
5 – Keep a designated workspace directory
Decide on a specific folder where you put all project files you are working on. Mine is at C:\Users\mark\Workspace.
Inside this you can have as many directories or sub directories as you like, as long as this is the only folder on your computer where you will find your code.
This has three benefits… First, you don’t need to think of an appropriate location each time you want to create a new project or clone something from GitHub. Secondly, when you need to find some code, you know exactly where to look. The third reason is that if you need to move computers for whatever reason, you can easily copy all of your projects at once by copying your workspace.
6- Keep a code base
This is particularly helpful when you are starting to learn a new language or technology.
Decide on a dedicated area where you will store commands or code snippets which you use commonly but struggle to remember. I used to use a GitHub repository for this, but recently switched to using Evernote as they released a code snippet feature.
This helps because it means you don’t need to search the web to remind yourself how to perform a common task with the technology you are using.
7 – Use News Feed Eradicator for Facebook
I love Facebook, but it can be incredibly addictive and distracting when you are trying to get work done.
There is an extension you can use which will replace your Facebook news feed with an encouraging quote, while still allowing you to see your notifications, message people and post statuses:
The extension is called News Feed Eradicator for Facebook. Click here to install it.
8 – Block distracting websites in your hosts file
If you want to take the News Feed Eradicator for Facebook to the next level, you can modify your hosts to block all websites that are common distractions to you while you work.
Disclaimer – Modifying your hosts file incorrectly can create a whole range of network issues with your machine. Please follow the below steps at your own risk.
Here is how you do it:
Open your favourite text editor in Administrator mode (In this example, I am using Notepad++). Then open C:\Windows\System32\drivers\etc\hosts.
Use your favourite command line text editor to open /etc/hosts using sudo.
Once the file is open, the rest of the steps are the same for Windows, Mac or Linux…
For each site you wish to block, append a new line to the bottom of your hosts file, replacing [site domain] with the website you wish to block:
127.0.0.1 [site domain]
For example, this is my hosts file:
This basically redirects all requests to those domain names to your local machine, at the operating systems network level. So every time you try and browse to one of these domains, you will see the following:
To reverse this, simply remove the added lines from the hosts file.
9 – Disable notifications
Building software is a tedious task that requires a high level of attention to detail and usually your undivided and uninterrupted attention for hours at a time.
Turn off all notifications on both your phone and your computer while you are coding. Even better, switch your phone off completely.
Instead of immediately dropping what you are doing to respond to email/messages, set time periods in the day where you will check and respond to all messages and emails. I recommend doing it once in the afternoon and once before the end of the day.
The benefit of this is that it allows you to get really focused and in the zone without being distracted.
10 – Master screen shots
Part of being productive is being able to communicate effectively without having to arrange face to face meetings.
Often, when asking questions or trying to explain something concisely online, a picture really can paint a thousand words. I take and send screen-shots to people every day over IM and email.
However, I was frustrated by the tediousness of the steps for taking a screenshot (pressing Print Screen, opening MS Paint, pasting the captured screen, cropping the area, saving the file, then attaching it to an email etc…).
That was, until I discovered GreenShot, a powerful screenshot application for Windows.
Now, all I need to do is simply press Print Screen and select the area of the screen I want to capture. Once captured, the screenshot is both saved as a jpeg to my Google Drive and copied to my clipboard, so I can either paste it right into an email or get the shareable link on Google Drive.
Here is how you can set this up.
First, install screenshot by downloading it from http://getgreenshot.org/.
Once it’s installed, right click the icon in the system tray and choose Preferences…
Then, in the Output tab, choose a storage location within your Google Drive directory.
Then, in the Destination tab, select Save directly (using preferred file output settings) and Copy to clipboard. Finally, click OK.
Now each time you want to take a screenshot, just press Print Screen and select the area of the screen you wish to capture.
And that’s it! I hope you found these tips useful. I would love to hear your results and feedback in the comments below.