Sunday, 16 November 2014

Coursera is Great

Last year I decided to consolidate some of the work that I had done with user experience. 

A colleague of mine had been raving about Coursera, and when I found a course by Scott Klemmer from Stanford University on Human Computer Interaction, I happily said good bye to evenings and weekends and hello to a 12 week online course.

The content in the course was fantastic, this included weekly assignments and written tests, which were designed to compliment and consolidate learning from the course videos.

The practical work was peer assessed. You marked 5 other peoples work as well as your own, after the marking period was over, you received the average grades from your peers and some feedback. This feedback loop gives you the opportunity to understand how your work is being perceived by others, and whether you are communicating as clearly as you think. 

Despite the long hours involved in taking this course, in addition to working full time, I found it to be thoroughly enjoyable and I would recommend this course to anyone with an interest in UX (or even just an interest in learning).

In case you were wondering; I got a Distinction with an overall grade of 92.4% but more than that, I came away with a host of validated strategies and practical techniques that I am confident in using.

Tuesday, 29 April 2014

Readable Tests

It is good practice to make tests readable, your QA will thank you for this.
With this in mind we try to give our tests meaningful names. "Thanks," declares your colleague, "I now know what it is supposed to do". Everyone's happy. But will the QA or person reviewing the test suite know whether it does what it is supposed to do? If they cannot read the code then the answer is probably no.
Some of the tests that I have written in the past have used regular expressions, but I have been made aware that not everyone is comfortable translating these. So wouldn't it be nice if we could make the regular expression more 'Verbally Expressive'?

Enter Verbal Expressions...

The 'Verbal Expression' library is very good at removing the obfuscation from regular expression matching. In case you’re interested it is still regex, it’s just wrapped to make it ‘Fluent’. (see Martin Fowler - FluentInterface)

Here is an simple example of how it could be used to aid the readability of a test:
public void Convert_GivenTwoValues_TheFirstValueIsAPrefixToTheSecondValue()
    object[] collection = new object[2];
    collection[0] = "£";
    collection[1] = "100";

    CurrencyMultiValueConverter multiValueConverter = new CurrencyMultiValueConverter();
    var convertedValue = multiValueConverter.Convert(collection, null, null, System.Globalization.CultureInfo.CurrentCulture);

    VerbalExpressions verbalExpressions = new VerbalExpressions();

    Assert.IsTrue(verbalExpressions.Test(convertedValue.ToString()), "The Returned format was not as expected.");
I've used this, and quite like it, although it is at odds with the Regex Builder that I use as my regex test development tool.Regex Builder
Have fun!!


Okay, so we all know about Martin Fowler's classic 'Refactoring', but what you may not realise though is that there is also a website to back this book up containing an online summary of the refactoring in the book.

I recommend viewing the catalogue page which provides a brief summary of each refactoring. It has recently had an overhaul, and includes links to the relevant pages of Safari Books Online.

If there is enough demand, ask if the IT department manager fancies investing in a group license for safaribooksonline.

Understanding Install Log Files

Sometimes installers fail. This means that you (or one of your colleagues) will need to work out why.

The Hard Way

One option is to manually parse the rather large log file. Searching the file for the word 'Error' or 'Return Value 3', and hoping that the first instance of this will eludes to the issues via an error code.

The Easier Way

Another option that you have, is to allow part of the Windows SDK to do the legwork for you.

This utility will allow you to directly step through any errors, providing possible solutions associated to them.

You can also launch a html log file parser from this utility, which will colour code the log file, based on log type, and allow you to step between errors whilst being able to see the context in which the error was raised. 

Inspecting log files isn't fun, but it needn't be hard work either :)

Free ebook: .NET Technology Guide for Business Applications

Most people love a freebie.
Some people like reading.
These links are for those that fall into the intersecting group.
Free ebook: .NET Technology Guide for Business Applications - Microsoft Press - Site Home - MSDN Blogs