Tips to Maximize Productivity - AutoHotKey and KeyText

There isn’t enough time in the day to get everything done.  There’s always more to do, and the general pace of things seems to be ever increasing.  Optimizing time usage is an ongoing challenge, as well as trying to avoid or minimize mundane and repetitive tasks.
Using tools to improve productivity and carry out repetitive and mundane tasks frees you up for more important tasks.  They reduce errors that people commonly make when performing tasks over and over.  Last, they can quite often perform tasks faster.

AutoHotKey is an open source Windows utility provided under the GNU General Public License.  KeyText is a Windows utility that is free to evaluate for 30 days. 
AutoHotKey and KeyText are extremely useful to automate repetitive and/or common day-to-day tasks such as typing class names, method names and property keys along with the appropriate syntax for ending and restarting literals within the source code.  They can also be used to search for content, copying it to the clipboard and replacing it, as well as pasting clipboard contents into properties files.  Using these tricks can significantly reduce the amount of typos and errors.  Furthermore, less typing is required, which reduces development time and effort.
AutoHotKey and KeyText can also be used to automate interacting with relatively complex user interfaces.  Although the development interface is limited, the utilities can produce mouse clicks (based on x-y coordinates relative to the selected window) and keystrokes.  When combined to form complex sequences, it is possible to automate compiling, releasing, creating backups, logging into applications and other repetitive time consuming tasks.  These sequences are mapped to keyboard shortcuts, allowing developers to program the utilities with multiple different sequences, each being used to simplify a specific task.
As all developers know, just because an application compiles doesn't mean that it works.  For example, a common problem when internationalizing applications is missing keys in the property file.  To combat this, try-catch statements can be added to the appropriate methods, returning content an easily noticeable error statement that includes the name of the missing key.  The message can also be written to a log file or the console, further easing development and finding bugs.
Here’s a list of some of the tasks that I have recently used these utilities for:
  • Login to application being developed
  • Automatically navigate to part of application being developed
  • Internationalization of applications 
    • Searching for content to move to properties file
    • Copying, replacing (with keys using a standardized format) and then pasting the content
  • Generating load on a web server by triggering numerous requests (50+)

No comments: