User Tools

Site Tools


presentations:cfunited2010

This is an old revision of the document!


INTRODUCTION

ABOUT ME

  • Name: Jim Priest
  • Blog: thecrumb.com
  • Wiki: thecrumb.com/wiki
  • Email: priest@thecrumb.com

I co-manage the Triangle Area ColdFusion User Group, help keep the CFEclipse project organized. In 2010 I helped organize NCDevCon, a free ColdFusion/RIA/Web focused conference in North Carolina.

WHY AUTOMATE

Not What But Who

Tools are important. But you are really trying to develop good working habits that maximize your time and reduce your effort. It’s not what we are trying to automate, but who.

Main Entry: au•to•mate 
Pronunciation: \ˈȯ-tə-ˌmāt\
Function: verb 
To convert to largely automatic operation 

Three R’s

Repetition

We’ve all gone through the struggle of learning a new tool whether it is a new operating system or IDE. Learning new tools and techniques takes time.

Resolution

It also takes patience. While you may want to give up you need to give yourself time to adjust to new techniques. You are re-training yourself to work smarter.

Re-evaluate

No tool is perfect. With the internet there is a vast flood of software available. Constantly be on the lookout for new tools. See my resources section at the end of the handout for places to look.

Time Savings

Your time is precious. Always consider how you can do repetitive tasks in less time. If you do it more than once consider automating the task.

TYPE MORE (mouse less)

While the mouse is a useful tool in some circumstances the majority of our time as coders is spent typing in code. The less we need to stop typing and move a mouse the more we can accomplish. Almost every application includes keyboard shortcuts. Take time to learn them.

AutoHotkey

AutoHotkey is a free, open-source utility for Windows. AutoHotkey unleashes the full potential of your keyboard (and mouse). With it you can:

  • Automate almost anything by sending keystrokes and mouse clicks.
  • Create hotkeys. Virtually any key, button, or combination can become a hotkey.
  • Expand abbreviations. For example, typing “btw” can automatically produce “by the way”.
  • AutoHotkey can automate the tedious things you type over and over every day.

»Q. But my IDE already has something similar… why not use snippets in ColdFusion Builder/CFEclipse?

A. Snippets are only available in your IDE. What happens when you are editing some code in Notepad? Sending an email with some code samples? Writing code documentation in Word? With AutoHotkey you can use the same ‘snippets’ everywhere – not just in your IDE.

Several AutoHotkey examples are available on my wiki (see links and resources at the end of this handout).

Zen Coding

Zen Coding is difficult to describe – from their website: “the core of this plugin is a powerful abbreviation engine which allows you to expand expressions…into HTML code”. Zen Coding is available as a plugin for many editors including Eclipse. Zen Coding has a steep learning curve but can save a tremendous amount of typing:

You Type
div#page>div.logo+ul#navigation>li*5>a
You Get
<div id="page">
<div class="logo"></div>
 <ul id="navigation">
   <li><a href=""></a></li>
   <li><a href=""></a></li>
   <li><a href=""></a></li>
   <li><a href=""></a></li>
   <li><a href=""></a></li>
 </ul>
</div>

While you could replicate some of this functionality with AutoHotKey, Zen Coding is dynamic, giving you control as you type. Imagine what would happen if you combined them!

Eclipse Shortcut Plugin

This one helps you learn some of the many Eclipse shortcuts. When you click on a menu item with the mouse a popup appears if there is an equivalent shortcut.

Browser URL Shortcuts

Enter a word in the address bar and hit CTRL+ENTER and automatically add the http:// and .com bits. Type ALT+ENTER and add .org.

Firefox Bookmark Keywords

When you create a bookmark in Firefox pay attention to the keyword field. This allows you to assign easily type keywords to your often used bookmarks.

Stop Filling in Forms

Stop filling in the same information into the same form fields day after day. How many times do you enter the same information into forms like blog comments and order forms? There are several popular browser plugins/extensions that enable you to easily fill out forms with a click or keystroke.

Clipboard Manager

How many times a day do you cut-and-paste text, snippets of code, email? Start using a clipboard manager and get more control. Copied something yesterday? Reuse it from the clipboard memory! Easily accessible via a keyboard shortcut the clipboard manager can remember what you copied so you don’t have to. Most allow searching, support images and have lots of options.

GET ORGANIZED

Launchers

Is your desktop littered with icons for programs and documents? Do you have to hunt to find programs to launch? Clear out that clutter and let the computer do the work. Launchers can scan your entire computer for programs, documents and more. And with a simple keystroke you can easily find what you are looking for in seconds.

Virtual Desktops

Hopefully you have two monitors but wouldn’t it be nice to have 4? Or 6? Virtual Desktops can do just that. Have a desktop dedicated to email. Another to your browser and yet another to you IDE tools. Easily switch between them with a keyboard shortcut.

Eclipse Full Screen Plugin

Make the most of your IDE screen real estate. This plugin will allow you to assign a shortcut key and will maximize the work area hiding all toolbars.

WORK SMARTER

Don’t forget the tools you use every day. I recently cleaned up a huge spam mess on a Trac install by mashing up some ColdFusion, Ant and Selenium. You know these tools – just think outside-the-box for other uses.

DOS / Shell

Do you restart ColdFusion by clicking through 5 menus to get to the Services panel? Write a simple batch file to do it, and launch it with a AutoHotkey shortcut or through your launcher. With one batch file I can restart ALL my web related services at once.

Ant

I love Ant and if you have not tried it yet you should. I maintain a wiki full of Ant links – see the resources section at the end of this article for a link.

ColdFusion (insert every other programming language here)

Facing an odd problem? Don’t forget your favorite programming language! Remember all the things that ColdFusion makes easy: file and image manipulation. Generating PDFs. Zipping files. Don’t forget your favorite language when facing a difficult challenge.

Cron

Do you fill out a timesheet every day? I do. But I don’t click though 5 menus to open it. I setup an automated cron job that starts the application every weekday at 4:00PM. I also use it to kick off batch scripts that restart my ColdFusion services and update my code from SVN every morning before I get to the office.

Selenium

Selenium is a great testing tool but you can also use it to easily record any time consuming repetitive task you do in your browser. Think outside-the-box!

All the bookmarks below can also be found online: http://delicious.com/thecrumb/cfunited2010

AutoHotkey & Alternatives

Launchers

Clipboard Utilities

Form Fill

Virtual Desktops

Misc

Further Reading: (use your control enter shortcut!)

  • lifehacker.com
  • freewaregenius.com
  • lifehack.org

“An apprentice carpenter may want only a hammer and saw, but a master craftsman employs many precision tools. Computer programming likewise requires sophisticated tools to cope with the complexity of real applications, and only practice with these tools will build skill in their use.”
– Robert L. Kruse, Data Structures and Program Design

/home/thecrumb/wiki.thecrumb.com/data/attic/presentations/cfunited2010.1278771173.txt.gz · Last modified: 2017/06/15 20:47 (external edit)