Making the mac more usable with keyboard shortcuts

I’m a self confessed keyboard-junkie and avoid using the mouse to do most things. Being new to a mac environment, it’s not necessarily clear how to get some of the usual things done. Inspired by the tip that Thomas wrote here, I figured it’d be worth sharing how I’m navigating my way around. Please leave a comment sharing your favourites!

Enable tabbing to all fields in webforms
The mac apparently wants to make it difficult by default to enter in web forms using a keyboard. Turn on the Full keyboard access option to All Controls. Use the dialog following System Preferences => Keyboard & Mouse => Keyboard Shortcuts page.

EnableTabbingToAllControls

Equivalent of accelerator or access keys
MenuBarMost windows applications provide underlined characters so you can access them with the ALT+<letter> key. In this manner, you can access all items without having to click the mouse.
Mac equivalent: The most effective way I’ve found so far is to use the Help (CMD+SHIFT+?) and then type in the label of the menu item. Use the up and down arrows and enter to select. Note that this isn’t guaranteed to work in all applications (like Firefox opening a help page instead)

Closing windows
Fortunately the CTRL-W option that would close applications maps directly to CMD+W although unlike windows, closing the last windows doesn’t automatically shutdown the application. CMD+Q will do the trick instead.

Opening finder
On windows, I’d use the Windows+E button to open up a new version of windows explorer to look at files. There seems to be a few ways to do this. If you have quicksilver installed, open quicksilver and then start typing Finder. If you’re using spotlight, start typing a file you know exists and then hit CMD+R (reveal in finder).

Unlike windows explorer, finder won’t necessarily always start from the root directory. Use the keyboard shortcuts CMD+SHIFT+H to start from home context or CMD+SHIFT+C to start from the computer context (useful if navigating to network drives).

Scrolling through windows of the same application
Use the CMD+` (backquote) to do so. Use CMD+~ (tilde) to go the other way (or CMD+SHIFT+`)

Show Desktop
On windows, I would use the WIN+M to minimise all windows. On the mac, you can use F5 if you don’t map those keys to normal functions (such as volume control) or if you turn on Expose, you can use F11 to hide all.

Visual Studio 2008 – The Anti Region Shortcut

If you happen to be unfortunate enough to stumble across “region”-ised C# code, use the following short cut keys to expand all in a file:

CTRL-M + CTRL-L

Give it a go! Or better yet, disable all code folding by default:

Text Editor -> C# -> Advanced. Uncheck “Enter outlining mode when files

Go to Text Editor->C#->Advanced. Under the “Outlining” section, uncheck the option labelled “Enter outlining mode when files open”.

Failing to upgrade to iPhone 2.2 firmware

In trying to do the right thing and keep the iPhone up to date, I got the unfortunate “something went wrong” dialog. I’m sure all the fan boys will ask why I bother if I have a windows machine, but that’s not the point of this post.

In trying to fix this, I have now discovered the big difference between Apple’s “reset” (think reboot) and “restore” (reset to factory defaults or wipe and reboot) with “restore” only available through the iTunes interface. For some reason, when I used to own an iPod three years ago, I thought there was a hard reset that would effectively “restore”. Unfortunately no more.

A few searches revealed nothing that worked for. I made sure I had the latest drivers installed, uninstalled and reinstalled iTunes (restarting windows). When all other posts seemed to suggest I would find an Apple Mobile Device under Device Manager, all I could find under the USB devices was an Apple Recovery (iBoot) USB device. I followed the advice from a number of sources including Apple support, all suggesting I should unplug, restart iTunes, replug in the iPhone and it should all worked.

Eventually, a combination between restarting windows, starting iTunes, plugging in the iPhone, restarting iTunes (note that last step) seemed to finally pick up the fact that I had an iBrick. So I sit here now while I wait for it to sync to my last backup, fingers crossed for the next time I update. I’m hoping someone else benefits from this post in case they also have trouble upgrading to the 2.2 firmware update.

Death by a thousand differences

One of the most common smells I see on projects is the desire to do things slightly differently for no good reason. Triggered by many different reasons such as new people joining a project, or when new functionality is being added, or when bugs need to be fixed. Each individual difference isn’t a problem on its own, rather it’s their accumulative effect that has a significant negative impact on projects that force developers to continually context switch when trying to match their mental model against the code or to navigate their way around a new area in the system. I find the death by a thousand differences is especially a significant problem on iterative projects where change happens rapidly such as the project Frankie describes.

Code isn’t the only thing that suffers from this condition as well with many unwarranted differences built into configuration and build and deployment scripts (ant, nant and msbuild).

What to do about it?
In many ways Rails had a very strong opinion that I agree with, following convention over configuration, with a core principle that every difference should exist for a good reason. Projects need code standards to help maintain consistency, and needs to be updated to reflect the current state of the system. New team members need to understand what the standard is, why it exists and the whole team needs to be vigilant against the additional context-switch each new difference adds.

Sometimes differences must exist, but always apply the 5 whys to question if the difference is really needed. Sometimes they exist as a means to an end (a transition to a better implementation pattern) yet projects must be wary that not too many differences exist at the same time without a good reason.

Office 2007 Woes: Insert New Worksheet

Excel 2007 is quite a horrible experience. Someone recently told me a story where apparently, Micro$oft said that it’s easier for new users to learn, yet would take three weeks of re-training for existing office users. Shame I fall into the latter crowd and not the former. Read on if you are wondering where your worksheets went and want to insert a new worksheet. (more…)

Unhelpful Error Messages in Maven

What’s wrong with this: “Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one.”

How about? What are you talking mojo to me for? What is going wrong and how do I fix it?

Perhaps something like this would be a better error message: “Maven is looking for the pom.xml file and cannot find it. Maven assumes this file is in the directory you are running it from. If you are running Maven in a different directory, perhaps you might want to use the –file switch.”

Why Training Fails

I’m a big believer in letting people try things out. Unfortunately, most training programs don’t let people do this enough. In fact, most of the time, training is seen as some way of “fixing problems” or a “all-in-one solution”. I can tell you a simple reason why training fails… people don’t have support to actually use the things they are trained on. They don’t get the essential feedback loop in their real environment and they quickly forget what they learned.

It’s all fantastic when you have an opportunity in class to try what you learned out. What really matters if whether or not you have long term lasting support in your environment to apply it to what you do. Unfortunately most training programs fail to address that, or the trainers don’t feel like it’s something they can influence.

Training lasts a day. True learning lasts a lifetime. If you send people on training, make sure they have a safe environment to apply it as well. Don’t view training as a silver bullet. Use it as a tactical solution as part of a larger strategic initiative.

Please Don’t Tell Me What I Like

Ticketmaster sent me an email this morning suggesting a concert for, apparently, “one of my favourite performers”.

Ticketmaster

They’re as far off as they could be. Much as I have a lot of respect for some of the music this artist produces, I doubt I’d ever place it on my favourite artist of all time list. Ever.

Respect for customers is really important in today’s world. Choosing what language and words you use demonstrates this. It’s even more important if you only send emails.

Amazon uses recommendations or suggestions when offering alternatives, as they know they get it wrong sometimes. At least they’re honest about it. In case you wonder, I prefer a more local site (GigsAndTours.com or Stargreen.com) for buying tickets.

UnFIT for use

It always amazes me at how many people misinterpret FIT (Framework for Integrated Testing) and I guess it’s based on the way that it’s been marketed. I’m not exactly a big fan of FIT and the biggest reason is that people don’t really understand what it’s best for, and use it all over the place where it’s not very appropriate more so than people who do know what they’re doing with it. In the last month, I’d heard statements such as “FIT is good for driving tests below the UI layer”, “FIT is great for acceptance tests”, or “We use FIT all the time”. Please stop this!

Let’s have a look at this table I put together that compares FIT and JUnit. Of course, this comparison also applies when comparing FIT to NUnit or one of its other close brethren (TestNG, etc):

JUnit Comparison Versus FIT (Framework for Integrated Testing)

Let’s get this straight: The only thing FIT is good for, is using it as a tool to help communicate with a customer. That’s it. It’s terrible for writing automated test suites, FIT encourages terrible programming habits, IDEs offer very minimal tool support and many developers don’t seem to really understand, nor want to understand how it works. I’ve seen a test suite where developers deployed FIT tests to a web container because “it was HTML” and they thought it had to be deployed for it to run. Grrrr.

The biggest barrier for FIT is that it requires a lot of education around how developers best use it, how they use it to help aid communication, and then understanding how to maintain it. Unfortunately I’ve never seen the payback you get from investing this time that’s better spent directly trying to improve the communication gap. I think it’s because the conventions used to bridge HTML to code aren’t natural and, without spending the effort to really help developers understand it, quickly leading to a whole mess of tightly coupled code and eventually, test coma.

The recommendation
I’d use FIT sporadically to help bridge gaps between the team (analysts, developers, testers) and the customer – especially for data driven examples. Acceptance level tests in JUnit should be refactored to a point where it’s understandable to customers (i.e. using as much of their language as possible). If you decide to go down the FIT route, refactor mercilessly to split out what the FIT fixture do and how they do that (some sort of driver, component, etc). In my experience, the latter should be immediately usable in another test framework, and in fact, should be what you’re striving to reuse in that other test framework.

Airline Customer Service

In trying to change my return flight to London from Bangalore, I’ve been trying to reach British Airways. Calling two of their numbers (the only ones given to me in fact) resulted in the following experience:

*Ring*, *Ring*

“This is British Airways. You have reached our India free number. This service is currently unavailable. Please redial using the advertised number.”

*Click*

That’s it. No greeting. No explanation. No alternatives. A simple message offerings many lessons to learn from.

Next Page »