Paper Prototyping Templates for Windows 8 Apps

Sketching out designs and creating paper prototypes can help to visualise your app and correct design mistakes earlier and before coding begins. To help with this I've produced the following paper prototype templates to help (right click & save):

Windows 8 Paper Prototype template - full screen mode



An Update on Keeping Software Soft

I’m writing my first ever book calling Keeping Software Soft.

I just published 3 new chapters:

  • Technical Debt
  • Software Craftsmanship, Professionalism, and Personal Development
  • What Programmers Want and What Your Manager Should Understand

The book is about 85% complete, there are a few more chapters to write and I might replace some of them with other topics.

Once the final few chapters are written the entire manuscript will be proofread and modified by myself before further final proofing by others.

Once the final version is complete it will be available via Leanpub, Amazon kindle, and iBooks. It is hoped than the final version will be complete by mid-year.

I’d like to say a personal thankyou to all the earlier supporters who have been buying the in-progress versions.



Mocking Framework for Windows Store apps (and Windows Phone)

With Windows Store apps there are challenges getting traditional mocking frameworks such as Rhino and Moq working due to limited reflection support in the platform (presumably for security reasons).

I wrote a mocking solution when Windows Phone 7 first came out, it can also be used for Windows Store apps. I’ve updated the NuGet descriptions etc. to reflect this.

How To Do TDD with Mocking in Windows Store Apps

Create a new (C#/XAML) Windows Store app project in Visual Studio called “MyAwesomeApp”.

Create your test project “MyAwesomeApp.Tests” and reference your main app.


In the main app project, install the MoqaLate NuGet package.  When the package is installed you will have a new folder in the main app solution called “MoqaLateCommandLine”:


(Inside this folder is a readmexxx.txt file with some additional info)



Introducing InAppPurchaseToggle for Windows Store In App Purchase

I just released version 2 of a new open source project called InAppPurchaseToggle.

It simplifies querying if the current user has paid for a particular in-app-purchase (IAP).

It’s convention based and allows creation of strongly-typed objects to represent each IAP offer that you’ve configured in the win8 dev dashboard for your app.

How To Use (updated for v2.0.0)

Create a new Windows Store app project (C#/XAML)in Visual Studio.

Install the NuGet package InAppPurchaseToggle.

Currently the package just installs the source in a folder called “InAppPurchaseToggleCode”, this is to simply multi platform (ARM, x86, x64) until NuGet is able to provide dll versions for different platforms.

Single In App Offer

Assuming you had set up an in app offer in the developer dashboard for your app called “AwesomeFeature1” you would create the following class:

internal class AwesomeFeature1 : InAppPurchaseToggle.SinglePurchaseToggleBase {}

There’s no need to implement anything else. Note: the name of the class exactly matches the name of the offer that was created in the developer dashboard.



App Idea Evaluator for Windows 8

Most of the time I have too many ideas for apps and which ones to build first, the App Idea Evaluator lets you create a list of ideas and rank them against a number of criteria. It also provides a few overview graphs to sum up the overall picture of your ideas.


Creating an “Add New” Item Template in a Windows 8 App ListView

A common UI pattern is to have a list of things on screen and at the end of the list have a plus icon (or something) that triggers your “add new item” code.

For example, in the Weather app:


For example, say we want to display a list of friends in a XAML ListView and at the bottom of the list have a “+” that adds a new friend.

public class Friend
    public string Name { get; set; }

The first step is to enable us to differentiate between what is an actual friend in the list and what is the “add new placeholder” item.



Maintaining Energy with the Pomodoro Technique

(The below is an extract from the “Time Management and Motivation” chapter of my book Keeping Software Soft)

The Pomodoro Technique is a simple time management system developed by Francesco Cirillo.

A "Pomodoro" is an indivisible, all-or-nothing unit of time that is exactly 25 minutes long. A Pomodoro is ether completed or not, for example there is no concept of a completing a half-Pomodoro.

The basics of the technique are:

  • Work for a 25 minutes (one Pomodoro)
  • Record the completion of a Pomodoro
  • Take a 5 minute rest break
  • Repeat
  • After every 4th Pomodoro, take a longer rest break of between 15-30 minutes

The splitting up of time into 25 minute chunks helps to focus the mind on what small tasks(s) can be accomplished next. If a Pomodoro is horribly interrupted to the point where it is considered void, then a short break can be taken and a new one started. The recording of every completed Pomodoro contributes to the feeling of a sense of progress and can further enhance motivation and energy. During the 5 minute rest break  the mind should be allowed to rest; the current task should not be thought about but rather: go for walk, get a drink, stretch, gaze out of the window, etc.

On top of this basic idea, the technique also suggests recording the number of interruptions that occur during a Pomodoro.

Interruptions are classified as either:

  • Internal: things that pop into a person's head that are unrelated to the current task, e.g. "what shall I have for lunch today"
  • External: things that occur from outside influences such as phone calls, instant message notifications, etc.

By recording the types and number of interruptions, the data can be used to reduce or eliminate them over time. This can involve turning off telephones, email, and instant messaging during a Pomodoro and having dedicated Pomodoro(s) to responding to emails, etc.

The technique, when applied correctly can result in less tiredness while programming and an overall increase in productivity. There are some programmers who do not like the forced "interruption" of a rest break every 25 minutes and feel that it interrupts their concentration. It is a technique that should be trialled by each individual for a reasonable period of time to see if it can be of benefit.

There are many electronic Pomodo timers available for a whole host of platforms to help time the 25 minutes.

For more detail about the technique, see the official website.


Diversity in Software Development

I had a nice comment from @mbartosovsky on Twitter about women in IT and thought I would create a few charts that represent my 12+ years experience in software development.

The results are from me thinking back so the numbers may be slightly inaccurate, however the overall picture is I feel (unfortunately) correct.




Asserting the Results of Tests in

The below is an excerpt from the latest chapter “An Introduction to Unit Testing With” from my book Keeping Software Soft. provides a number of ways for checking (asserting) results are as expected.

The following explanatory tests shown the different types of assertions that supports:

using System;
using System.Collections.Generic;
using Xunit;

namespace KeepingSoftwareSoftSamples.XUnitTestingDemo
    public class XUnitAssertExamples
        public void SimpleAssertsThatOneValueEqualsAnother()
            Assert.Equal(1, 2); // fail
            Assert.Equal("hello", "hello"); // pass

            Assert.NotEqual(1, 2); // pass
            Assert.NotEqual("hello", "hello"); // fail

        public void BooleanAsserts()
            Assert.True(true); // pass
            Assert.True(false); // fail

            Assert.False(false); // pass
            Assert.False(true); // fail

            // Don't do this
            Assert.True(1 == 1); // pass

        public void Ranges()
            const int value = 22;

            Assert.InRange(value, 21, 100); // pass
            Assert.InRange(value, 22, 100); // pass

            Assert.NotInRange(value, 999, 99999); // pass

            Assert.InRange(value, 23, 100); // fail

        public void Nulls()
            Assert.Null(null); // pass

            Assert.NotNull("hello"); // pass

            Assert.NotNull(null); // fail

        public void ReferenceEquality()
            var objectA = new Object();
            var objectB = new Object();

            Assert.Same(objectA, objectB); // fail

            Assert.NotSame(objectA, objectB); // pass

        public void AnIEnumberableContainsASpecificItem()
            var days = new List<string>

            Assert.Contains("Monday", days); // pass
            Assert.Contains("Friday", days); // fail

            Assert.DoesNotContain("Friday", days); // pass

        public void IEnumerableEmptiness()
            var aCollection = new List<string>();

            Assert.Empty(aCollection); // pass

            aCollection.Add("now no longer empty");

            Assert.NotEmpty(aCollection); // pass

            Assert.Empty(aCollection); // fail            

        public void IsASpecificType()
            Assert.IsType<string>("hello"); // pass

            Assert.IsNotType<int>("hello"); // pass

            Assert.IsType<int>("hello"); // fail

        public void IsAssignableFrom()
            const string stringVariable = "42";

            Assert.IsAssignableFrom<string>(stringVariable); // pass

            Assert.IsAssignableFrom<int>(stringVariable); // fail

To learn more about check out my Pluralsight course.

You can start watching with a Pluralsight free trial.