Archive for the ‘Development’ Category

Behaviour driven development on user interfaces with Automation peer

Testing user interfaces is usually a pain in the butt. No matter how cool your UI is, it will often boil down to a brain-cell killing process clicking the same buttons over and over again. Thanks to the Geek Gods of .Net though, there are ways to automate this, and it’s not even that tough to do.

In this post, we’re going to use Automation peers to expose a button to a unit test, and have the test start the application, click the button, and confirm that the button does what it’s meant to do. We’re going to use MbUnit to write the test, and NBehave to make the tests nice and clear.

Continue reading

VS and SVN – Ignoring user specific files

Visual studio tends to create files that you don’t usually want to keep under source control, such as generated files, user option files, and so on. To avoid having to clean up every time you try to Add files, you can tell TortoiseSVN to ignore certain file name patterns. The following is what I usually use:

**/bin bin **/obj obj *.suo

You can set these patterns in the “Global ignore pattern” text box in the main screen of the TortoiseSVN settings dialog.

Writing a WordPress Widget

Summary: How to write a quick and dirty WordPress widget to add social network links to your template.

Continue reading

In the beginning were the words, and the words were "It sucks"

In his Tech-Ed session “Why software sucks”, David Platt was explaining why, in fact, software sucks. The reasons were not some mystical ramblings, or some pseudo-scientific best guesses. It was all solid common sense; problem being that, since designers and developers often know the conventions too well, we will often assume, without a second’s thought, that our users know the same conventions. I was sufficiently impressed by the session (Delivered in an hour long chunk of what can be called good stand-up comedy entertainment. Reminded me a little of George Carlin, really 🙂 ), to buy his book.

Do you really want to delete this file? Hmm, no, what I really wanted to do was give it a back massage…

To take one of the examples from “Why software sucks” and give it shape: consider a confirmation box. You know the kind… “Do you really want to …?”. Can’t stand the damn things myself. Platt makes a few well considered arguments against them; the main ones being:

1. If a user clicked the button, he or she REALLY wants to do that action.

2. Unless the button was clicked accidentally, in which case, your user interface design sucks.

I’ve been working on a WordPress contact management plugin recently, and decided to slip this idea in. The delete button for each contact starts off disabled, and it is only enabled while the user holds down the CTRL+D key combination:


And that’s that, once you’ve clicked, it’s deleted with no further confirmation. Once this gets tested for a while, I’ll post any further observations here.

I’ll probably change the delete icon to a more conventional x, since the little guy with a stop sign doesn’t strike me as being an obvious “delete” indicator. Then again, I guess I’ll wait to see what comes out of the test. I’m not my user, so I’ll see what they think first.

Entity framework learning guide

Christmas is here early this year! Zeeshan Hirani has released his 514 page pdf guidebook about the Entity Framework. Thanks!