By 1 year ago in B3labs

How to easily improve productivity

Our development team is always keen to hear about new ways to improve efficiency and reduce the time it takes to code without compromising on quality. For example, if there’s a way we can use fewer keystrokes when writing code or executing commands, we’re all for it!

Have a think about which tasks you find yourself repeating every day, and how you could streamline the process to knock off a few seconds or even a few minutes off. It could be simple tasks such as:

  • Opening your vital applications and helpful utilities
  • Accessing your projects directory
  • Adding entries to your hosts file
  • Opening your Shell Profile / PowerShell Profile
  • Accessing remote servers


When you sit down and actually total up the time spent on trivial tasks such as these over the course of a day, a week, a month, I think you’ll be surprised at how the time adds up.

If something which takes around 30 seconds can be reduced down to 10 seconds by way of a script or function, then believe me, it’s worth taking those several minutes implementing it.

Coming from a Linux background and diving into developing with the same tools (PHP, Python, MySQL, Git) on Windows, I found that many of my normal day-to-day tasks were taking longer than usual, adding hosts to the host file for instance, was taking much longer than it previously was.

Locating the directory the hosts file is stored in, making sure you have the permissions to edit it, then opening with text editor and finally saving; on unix-based systems this is simply a one-liner, and I wanted to replicate this in my current environment to speed up and simplify the process.

The solution for the above (which came from our talented Senior .NET Developer, Julian Kay) was to add a function to my PowerShell Profile which simply opens the file in my preferred text editor, VIM, and set the function to the alias “eh”.

Since the majority of the time I have at least one Shell open, I can add an entry to my hosts file in less than 10 seconds. Pretty neat eh?

It might seem simple and a bit obvious, but I’ll bet that plenty of developers can find at least two or three tasks that they repeat daily which could be streamlined down into less keystrokes.

Take a look at this example:

# I keep all my scripts and utilites together in folders.
# Also having my projects directory available too is extremely helpful.
#
$SCRIPTSPATH = "C:UsersJordan.ApplesonScripts"
$UTILPATH = "C:UsersJordan.ApplesonUtilities"
$PROJECTPATH = "C:Projects"

# VIM
$VIMPATH = $SCRIPTSPATH + "Vimvim.exe"

# Set Aliases
Set-Alias vi		$VIMPATH
Set-Alias vim           $VIMPATH
Set-Alias eh		edit-hosts

# Edit Hosts function
Function edit-hosts   { vim C:WindowsSystem32driversetchosts }

Get in touch if you’d like anymore handy tips from our development team!

By Jordan Appleson. at 11:32AM on Wednesday, 09 Jan 2013

Jordan is our Insights Developer and works primarily on our Analytics Software. His experience with open source technologies along with the .NET Platform allows him to bridge the gap between the two universes. When he’s not immersed in copious amounts of PHP, JavaScript and C# you’ll find him at a punk, rock or another varied genre of music gig. Follow Jordan Appleson on Twitter.

comments