Category Archives: Efficiency

Mac Goodness on a PC

Being a Microsoft centric developer you can assume correctly that I am also a PC guy. That is not to say that I am anti-Apple – actually I have 2 iTouches, a shuffle, a Nano and an iPad but I have not dumped my PC for a Mac yet. But there are some nice features a Mac has that aren’t out of the box with a PC. Here are 3 of my favorite things to install on your PC to make it a bit more user friendly.

Google Quick Search Box

If you go to http://www.google.com/quicksearchbox/ to install the Quick Search Box you will see a nice disclaimer that says “Requires Mac OS X 10.5 Leopard+”. You see Google Quick Search Box used to be for Windows too but got discontinued in early 2010. Back then I was already hooked on the search box so I quickly found this blog post that walks through installing the discontinued software. Basically you can install an older version of the Google Toolbar, copy the Quick Search Box application to another location and then you can uninstall the old Google Toolbar and the QSB will stay.

Windows does have their own search within the Start Window but I find the search to be a bit slow and doesn’t take into my previous interaction. If I search “e” for Evernote I get the below screen. Of course if I type “ev” then Evernote comes up but the next time I search and type “e” I still get the below screen instead of it knowing that I wanted Evernote last time and displaying it first.

macgoodness1

Below is the same use case only with Google’s QSB. It knows I went to Evernote that last time I entered an “e” and it lists it first. So to quickly bring up Evernote, I just have to type [Alt]+[Space Bar], “e”, [Enter]. Windows has shortcut keys of [Windows] + [0 – 9] for quick launch which is nice but will only support your 10 apps you have pinned to your task bar.

macgoodness2

VirtualWin

I came across this program when I was pairing with a developer that was working on a Mac and with a couple key strokes he would jump back and forth between a number of different desktops depending on what we were working on. I loved it. I am not sure what it was called on his Mac, it might just be part of the OS but I did find a program that did the same thing for Windows. It is called VirtualWin. It allows you to setup up to 9 virtual windows and then quickly jump from one desktop to another, even if you have a dual monitor you might find this program useful.

ObjectDoc

When I used my mouse more and thought bubble animations were cool I used ObjectDoc for a while. I don’t use this now but it is a good program and to stick with today’s theme of making our PC more Mac like this program is right up that alley.

macgoodness3

I am sure there others out there as well, so let me know if you have a favorite tool you use on your PC to make it a bit more user friendly. If you want to go all out you can get a White Apple Sticker and stick it over your Dell logo.

Advertisements

Scripting out Monotony with AHK

I posted previously about reducing the use of your mouse to speed up your daily computer work (not just development). I wanted to elaborate a bit more on Auto Hot Key (AHK) that has been around since 2003 but I don’t run into a lot of people that use it.

Wikipedia
AutoHotkey is a free, open source macro-creation and automation software utility which allows users to automate repetitive tasks. Any application user interface can be modified by AutoHotkey (for example, with Emacs style).[2] It is driven by a custom scripting language that is aimed specifically at providing keyboard shortcuts or hotkeys.

Before Windows 7 came out I had an AHK script that would allow me to arrange a window to take up 1/2 the left or right side of my monitor with a quick keyboard command. Of course the ‘Snap Feature’ is now part of Windows 7 but AHK allowed me to easily build one of the main features Microsoft promoted during their Windows 7 campaign – I do have to point out in the commercial the guy is using the mouse to drag the 2 windows to the side instead of [Win Key]+[Left Arrow] then [Alt]+[Tab] then [Win Key]+[Right Arrow] which would be faster 🙂

Microsoft took care of the snap feature for verticle tile placement but sometimes I like to have a window snapped to the left but take up more than 50% of the screen area. This allows me to have more area for my document but still have the ability to see part of my desktop on the right in case I were using Sidebar Gadgets or in this case my Sticky Notes. If you look at the screenshot below, you can see that my Posterous editing window at 50% leaves very little room for my Rich Text Editor.

ahk1

So let’s create a script that will Snap my window to the Left and then make it a bit wider.

The first thing we will download and install AutoHotKey from here.

We then want an .ahk script in our Startup folder so our commands are available when Windows starts. It can be blank for now.

Next we want to download a AHK macro recorder here (written with AHK scripting) that will record keystrokes and mouse movements and generate AHK scripting for us so we don’t have to code as much from hand. As you get familiar with AHK you will need the Recorder less and less but it will be your friend when you are fist starting out.

I am a big fan of Continuous Improvement both in development and life. As time goes on we are going to want to add or maintain some of our short cuts. I am at the point now (after using it for 7 years) that my brain automatically says “Hey James, you have already done this combination of steps 3 times this week” and I open up my .ahk file and assign the steps to a shortcut key. There is no sense in making it difficult to edit, build or record our AHK scripts so the first thing you will see in my script are 3 shortcuts to do just that.

ahk2

Reviewing AHK documentation or using the Macro recorder you will notice that “<” is Left and “!” is the [Alt] key. So above you can see that when I do a [Left Alt]+Z, notepad will open up my AHK script. [Left Alt]+X will execute my .ahk script to take into account any changes I just made. [Left Alt]+C will open up the Macro Recorder. There are also text editor’s that have color coding and intellisense for AHK scripts that you could use instead of Notepad but I haven’t installed them since the last time I rebuilt my laptop.

So now that we have those 3 key hot keys assigned let us do a [Left Alt]+C so our Macro Recorder will open.

ahk3

To create our ‘Wider Left Window Snap’ functionality we will do something like the following narrative:

  1. Hit Start on the Recorder (this will minimize the recorder so it is not with focus)
  2. [Windows] + [Left] combo which snaps my current window to the Left.
  3. Click the right border of the window and drag it so the window is at the size you like.
  4. [Ctrl] + [Shift] + [End] to stop the recorder

Here is what our recorded script looks like.

ahk4

One thing to notice is that we aren’t quite done because our recorder doesn’t do a good job at recognizing drag and drop, so we are going to have to script that part by hand. What we can quickly do is record once more and click on the area of the screen that is where our right window border. This will give us the coordinates we need for our drag and drop action. I also updated the script to use the #{Left} instead of the LWin and LWin Up functionality because it is cleaner. So our finished script looks like below.

ahk5

For simpler scripts you can have everything all on 1 line, but here we have a 6 line block not including the comments. Here is the breakdown:

  • #.:: – # is the Windows key so if the user clicks {Windows}+{Period} then this script block will fire. I used the period key because it has a “>” key above it and I am adjusting the window to the right and the greater than sign is like a Right arrow. You could assign this script block to whatever hotkey combination you like.
  • Send, #{Left} – The script will send the {Windows}+{Left Arrow} to the system which will Snap the window to the Left
  • Click, 686, 305, Left, down – This is the first part of our drag and drop. We are telling the script to go to x686,y305 and hold down the Left mouse button
  • Click, 1078, 305, Left, 0 – Here we are dragging our mouse to the x1078,y305 position
  • Click up – release the Left mouse button
  • return – finish the script block

We can then {Ctrl}+S to save our .ahk script, then {Ctrl}+X to rebuild the script. Now when in any window and a {Win}+{Period} is struck the current window will quickly resize to a position like below.

ahk6

What else?

Start simple and then expand on your script. I would suggest putting in words or phrases that you type a lot throughout your week. Sure there are plug-ins for your browsers that can fill in your address information but they don’t work across other applications so I have quick hot keys for a lot of my contact information. Below you can see some of them.

ahk7

So now I can quickly type in phone numbers, passwords, usernames whatever else with 2 key strokes (Right Alt and then a letter or number). Yes storing passwords and credit card information in plain text isn’t the best idea but I figure if someone has access to my hard drive to read this file then I have a bigger concern.

There are also Hot Strings too which are cool. Instead of using a key combination to run a script, AHK will monitor your key combinations and when it finds a match it will replace the combination with what is specified. I use this for email addresses and words I often mistype.

ahk8

So any time I type “j@” it will be replaced with my work email and if I do “c@” it will be my gmail address. If I accidentally type “teh” it will correct to “the”. I also have the scripts below that will navigate up/down 5 lines at a time and left/right words at a time. This makes me quickly navigate with the keyboard.

ahk9

You know enough now to get creative. For example I have a script where with a quick key combination; I launch Google Chrome, go to sirius.com, open up their Listen Player and ensure the station is on Alt Nation. Now I just need a script that will post a new and insightful Blog Post with a quick key stroke.

Mouse?!… We Don’t Need No Stinkin’ Mouse!

Back when I was put on my first Agile (with a capital A) project at VW Credit we did paired programming. We had 3 pairing sessions a day except for the days we had our IPM, Showcase and Retrospective. I was one of the stronger developers on the team and thought our code quality would be up a bit and our knowledge sharing (or Bus Count) would be up as well but I really didn’t think I would learn a heck of a lot from pairing with some of the less experienced developers. I was proven wrong the first pairing session I had with Steve.

Although I knew more about the code and the API and development in general, I started to realize when Steve was driving that when I explained what we wanted to do with a piece of code how fast Steve was at coding. It wasn’t just the typing, for I could type as fast as him, it was beyond that. It was the way that he would open his tool windows and the way he jumped around the code. He would also make crazy use of shortcut keys and used temporary macros like they were going out of style.

It got to the point where I was actually the one feeling a little self-conscious when I was coding; when you would think it would be the other way around. I would start coding something and in my head I would think, “Steve must be thinking I am coding this so slow” and this would cause me to go even slower. I finally realized that Steve was very rarely using his mouse. I brought it up to him and he said that he used to use the mouse quite a bit but he had a co-worker that swore by using the keyboard as much as possible to speed up productivity. Steve said it was quite difficult at first and it was probably a good two weeks of forcing himself to be less dependent on the mouse and then it just became second nature.

Our entire development team ended up embracing Steve’s Anti-Mouse mantra. In fact we ended up installing an application on all our workstations that would keep track of how many yards our mouse moved for the day and would announce at our Daily Stand-up when someone broke the Shortest Distance Record.

So try it out for 2 weeks and see what you think. I would start with:

  • Getting to know the shortcut keys to the 2 or 3 applications you use most
    • Outlook
    • Word
    • Visual Studio – you can also create your own shortcut keys to be more efficient. If you are doing something over and over again, think about recording a macro and assigning it to a key combination. For example if you are in my environment and you hit CTRL-SHIFT-W the current word where the cursor is would get highlighted and copied to the clip board. The Watch window would then take focus and the word would get pasted into the Watch window.
  • Mouse Tracker – for those that want to make a game out of it or to visually see how well they are improving
  • AutoHotKey – If there isn’t a shortcut key, then make your own. AHK is a great scripting language that allows you to easily assign text and/or mouse activity to a hot key or key combination. Back before Windows 7 came out I actually used AHK to easily “snap” my windows to the right or left side of my monitor. I will do another post just on AutoHotKey with some of the ways I use this application.

Evernote Notebook and Tagging Strategy

Organization is always such a personal thing. There is not one approach or strategy that works for everyone but I figured I would share how I have Evernote setup to manage my notes and daily tasks. I am sure most people are aware of Evernote by now. If not, I recommend at least downloading it and checking it out to see if it is for you.

There are two main ways to categorize notes within Evernote, Notebooks and Tags. There are users that use Notebooks to organize their notes based on the Context of the note but this can make it somewhat difficult to easily see what you should be working on today across contexts. I actually use Notebooks to mimic the State in which a task is in. Being partial to Agile and SCRUM my folder structure is below:

Notebooks

  • 1.0 InBox: The InBox is the “To Be Categorized” notes, normally coming in from when emailing a note to your evernote email address
  • 2.0 InPlay: The InPlay notebook is what is on the front burner. I normally put notes of activities that will be getting worked on for the current day.
  • 3.0 Circling: The Circling notebook is for notes that are in a circling pattern
    • 3.1 Paused: Paused are notes that have been started (were InPlay) but for whatever reason we are going to pause and work on the task on a later day
    • 3.2 Backlog: Traditional SCRUM Backlog tasks which will be put InPlay at some point.
    • 3.3 Blocked: Tasks that would be put InPlay but can’t be right now because they are Blocked for whatever reason, usually because you are waiting on a Person, a Thing or a Decision
  • 4.0 Archive: This is where Tasks/Notes go when they are completed or deleted
    • 4.1 Done: self explanitory
    • 4.2 Discarded: you could delete the note, but I like to discard them instead in case I ever need to refer back or bring them back to life
  • 5.0 Reference: Not every note in Evernote could be Task related it could just merely be for reference. This is the notebook I use for those kind of notes, you can also create sub notebooks to when appropriate.

Tagging is where I manage the context of the notes. This makes it easier to have a Note belong to more than one context where as if you used Notebooks for this you would have a more difficult time in managing them. If I had InPlay as a Tag instead of a Notebook then in order to mark a task Done I would have to go into the note and remove the InPlay tag and add the Done tag instead of just moving the Note from the InPlay Notebook to the Done Notebook. Having your Projects, People, Priority and Locations as Tags allows for your Tasks/Notes to easily belong to multiple items. If I am working on a Task that is related to my Navigant client but it involves the Sitecore CMS I can simply tag it as both Navigant and Sitecore.

Tags

 

  • @Location: The @Location Tag allows me to tag a Task or Note with a location. All of the Location tags start with an @ symbol because it makes it easier to identify it as a location and makes sorting a lot easier because all Locations will be next to each other when sorted by Tag name.
    • @Home: By having an @Home tag allows me to tag a Note or a task during the day while I am at work and maybe the Task is InPlay but I can’t really do it until I am at my house. When I get home I can filter, search or sort to easily see which tasks I should be tackling.
  • _Priority: The _Priority Tag allows me to tag a Task with a Priority with _1 being High and _5 being Low which allows me to sort by priority when I am sorting by Tag.
  • @Role: This is a Tag I use going back from the Franklin Qwest days in the mid 90’s before they merged with Covey. It allows me to tag a task with the ‘Hat’ that I would be wearing while doing the task.
  • ‘People: I use the ‘People tag to associate a task or note with a person or multiple people. The tag always starts with an apostrophe to help with sorting
  • Projects: The Project tags are not prefixed with a symbol and is the main context of each task. A task could be tagged with more than one project and the projects could be organized in whichever makes sense for your work / life.