Listen to your users

Why would I want to?

Why are we writing software ? Because we need, or we like, to solve problems.

I you write software for people to use (as opposed to embedded software, for instance), these problems will only be solved if these people actually succeed in using this software. This is, both surprisingly and annoyingly, incredibly difficult.

Your users are not dumb. They are not as well-trained as you are in using computers. They often will be far superior to you in their field of choice. Don’t underestimate them.

And even if you do underestimate them, or even if your users were actually not-that-smart, so what? Aren’t you writing software for them anyway? You are not your user.

How do I do that?

I urge you to do user testing. It will blow your mind, and might make you rethink your whole software. It doesn’t have to be huge, you just need to put people in front of your software, and watch them use it.

You can begin by asking co-workers that are not as familiar as you are with the product : a secretary, an accountant, a salesperson… If you’re in a building with other companies, you might ask people there. Better yet, if you can, ask real users (or prospective users) to come to your office.

Get in a room with them, get them on a laptop with a mic (most do, these days), install a capture software like BB Flashback Express, run it, then run your software or open your website.

Then, just ask the users to do common tasks. Insert this, edit that. Don’t help them. You might find plenty of help everywhere on how to conduct user testing.

How will it help me?

Listen to their remarks. Probe them for more informations. Don’t necessarily do what they suggest, but think about what problem they encounter, what problem they want to solve with their suggestions, and how you would solve it optimally.

Some examples of recent user comments that have had a tremendous impact on our recent designs :

I think I understand how to resize this block, but why does it display a “hand” cursor instead of an arrow ?

This allowed us to realize that our block resizing was even more awful than we thought, and we redesigned them completely. The blocks had arrows on the corners that allowed the users to resize, and on mouse-over the cursor changed to the “link click” cursor. The common pattern is that the cursor must change to a “double arrow” to resize. We were so used to this anti-pattern that we didn’t even notice it anymore. Now users finally understand how to move and resize blocks !

I think the previous version was more simple to use. I liked the toolbar.

This comment made us realize that our “clever” new design was in fact very confusing. The new design uses contextual panels and buttons in various places to do various actions, it’s kind of pretty, and has a lot of attention to details. The old one was using a single toolbar for all actions, was awfully ugly, with widely inconsistent icons that changed places depending on what you clicked. But users always knew that the actions were there. Now they’re lost, because the action to do X is on the left, Y is on the bottom, and Z is displayed in a contextual panel. It’s only this comment that made me realize why I was uncomfortable when watching users search for some actions: they are actually lost. We might have to rethink our whole design to switch to toolbar-based.

That’s it?

Of course not. It’s very easy to do enhancements with just that, but it won’t allow you to build the best software out there. But there is some help available everywhere.

I personnally started with Steve Krug’s “Don’t make me think” and “Rocket Surgery Made Easy” : they are very concise and to the point. I’d consider them mandatory readings.

There are many great usability blogs out there: try out (in no particular order) Smashing Magazine, UX Magazine, UXMatters, Boxes And Arrows, The UX Booth, UX Movement, Usability Counts, Wireframes Magazine… the list goes on.

I am sure this small start will help you a great deal.

Abstract away constructor logic

I need to create an administration interface in MVC, over an old and seriously crappy DB. The fields and tables have no consistency whatsoever, but that’s easily solved through renaming things with Entity Framework. But now, I need to do 5 administration interfaces for 5 trios of tables : “master”, “images” and “categories”. They are pretty much the same, except the table and field names. To do that, let’s play with abstraction.

I’m using crude ViewModels to display my search pages. They get the elements to display in the search dropdown lists, and paginate the results. All of the logic is in the constructor (the viewmodel is only used to display a search screen). When the constructor needs to get specific elements, it calls abstract methods. They are the ones that are actually different in the various pages.

The abstract base looks like this :

And now the implementation is very simple ; here for the themes :

Theme_Combination is the joining of two entities, Master and Images. All your element_combination must inherit from IElementCombination. If they do not implement anything specific themselves, you can even use a single ElementCombination class.

Bug in WPF 4 text rendering

Microsoft has completely changed the text rendering engine from WPF 3.5 to 4.0. In the meantime, it also has introduced a bug, which you can read about here : http://stackoverflow.com/questions/23246254/ and here : https://connect.microsoft.com/VisualStudio/feedback/details/860053/wpf-4-font-rendering-bug-with-some-fonts-generated-xps-is-invalid. I have built a test project that demonstrates the problem here : https://github.com/tbroust-trepia/wpf-4-font-rendering

What looks like a small problem (the apostrophe character ” ‘ ” actually reduces the space between two characters with some fonts, resulting in overlapping characters) is problematic when you generate an XPS file from the XAML, because the resulting XPS is “corrupted”, with negative letter-spacing, which seems illegal in XPS.

I don’t really know which is to blame more : the font rendering bug, or the XPS converter (integrated in .Net !) which renders the text faithfully, but shouldn’t. Anyway, while waiting for MS to fix anything, I have found the way to fix it myself. Warning: dirty hack ahead.

Update: Microsoft has closed the ticket, and, obviously, they have decided to not resolve the issue, since it impacts such a small number of people (maybe just us ?). I always thinks it’s sad when a company this big does not close such a small and quickly-fixed bug.

WPF and MVVM discovery

In our setup, we have operations that cannot realistically be run by the installer itself, so we have a separate application that updates various components at the end of the setup. I am rewriting this app so it’s cleaner (which isn’t very difficult considering the current state), and taking this opportunity to familiarize myself with WPF and the MVVM pattern.

I am using MVVM Light, and it’s a bit of a pain. There is exactly zero official documentation. It’s a real shame, considering that it’s one of the most used MVVM frameworks. I would love to use Caliburn.Micro because it’s well documented and supported, but using it in conjunction with MahApps.Metro adds yet another layer of complexity, and I am already learning about many things at once.

Creating a responsive UI in WPF using MVVM involves many steps and components. I will need to do my work in a BackgroundWorkerautoscroll a text box, etc, and bind it in my MVVM view. What I can find here and there often lacks a few important points, but it’s generally easy to find help.

Your ViewModel needs to declare public properties for each of the things displayed in the view, that you might want to change in the ViewModel. For instance, with a progress bar, if you don’t know how many steps you will have in advance, but you don’t want to use percentages, you will need to bind the Maximum property in the VM. Opening message and confirmation boxes should be done in the view, otherwise your VM unit tests will open dialog boxes that you can’t close. To do that, you need to create a messaging system.

All in all, I still don’t like WPF/MVVM very much. It’s very verbose, and doing anything takes a huge number of steps, namespaces importing, classes, workers, commands, and messaging back and forth. I have yet to come to a point where I find that all this overhead is useful. WPF seems really powerful, but it’s also really complicated and verbose to do anything at all. The overhead of adding a screen is huge: you have to create like a thousand properties, relay commands, events and events handlers, etc. I get that it’s the right way, but it’s a really long and windy way.

The main problem I have seems to be that people come up with incredibly complicated solutions to simple problems, and then say stuff like “it is easy to do X” and “simply do Y”… after posting a hundred-lines-long post with half a dozen classes… to display a message box.

As an aside, I hate Windows XP. In addition to being incredibly buggy (most of our customer’s problems come from XP users), it prevents us from upgrading to .NET 4.5, and using shiny new toys. It’s like we’re stuck in the dark ages. We have almost 10% of our customers still using XP. It’s huge! And about 40% of them seem to never update their software version, even though they are asked to do it at each software startup. That’s a bit depressing. We can’t use the C# async/await keywords, and more and more NuGet packages require this version. I can’t even find how to display a MahApps.Metro dialog box without the async keyword.

Exploring various .NET build solutions: Albacore vs FAKE vs PSake

As I said in a previous post, I am changing our build process for our application, so I’m testing several build solutions.

FAKE is the newest and shiniest tool for .Net users. F# looks like a cross between Ruby (for the general syntax), and PowerShell (for the piping-fever-dream). Unfortunately, it seems to be missing a core piece of any proper build system: running an arbitrary exe file. I need to run the setup builder (InnoScript), but all I can find is creating a custom task, and it’s way overkill, and not very evolutive. Documentation is incredibly hard to find because of its generic name. Pro tip: do not name your software after a random generic word.

Albacore is great, running on Ruby, using Rake tasks. Installing Ruby on Windows is easy, as long as you don’t try to use some gems that won’t compile on your system. Unfortunately, Jenkins installed on Windows won’t run the ruby installed with Ruby Installer, for various reasons: PATH problems, rights problems, etc. Too bad, because my build script was working great.

PSake might be the easiest to use on a Windows build system. Documentation for PSake itself is very light, but Powershell is very well documented, very powerful, and we already use it in various places in our systems, so we know it pretty well.
The only thing I don’t like with Powershell is that, to keep things simple on one side, you have to do complicated things on the other. I don’t want to install a thousand plugins in Jenkins, so I need to build a batch “boostraper” that runs the PS scripts.

The good thing is that PSAke and Rake are very similar, so I was able to write the equivalent script in a few hours, just by putting my Rakefile and build.ps1 files side-by-side in Sublime Text.

Update

After a year working with PSake for all of my build scripts, I can confirm that it’s awesome. Powershell is a great automation language, it’s very mature, and it has thousands of libraries and extensions.

Rails is like magic…

… but more like black magic. The one where you have to sacrifice kittens to get anything done.

I want to do a simple thing using devise: authenticated users go to a page on the root of the site, and unauthenticated users go to another.
I’ve been banging my head for days on this. Between the various ways to do it, the different ruby, rails and devise versions that use different methods, it’s a mess. Nobody seems to agree on the best way to do it.

Well, I’ve found the way that I believe is the most simple.

Things to remember :

  • “devise_scope” is necessary. I do not understand why, nor what it does.
  • the “as: xxx” parts are necessary, too. It looks like Rails is fine with creating two routes pointing to the same URL, but wants different names for them. I would have tought that it would create these routes only at run-time.
  • do not modify several things at once and hope to understand what went wrong when everything crashes down, as long as you don’t understand the language and framework.

Building a .NET application for distribution

We have a Windows (WPF) app distributed to end users (general public).

I am changing the build process to simplify it. It is currently comprised of these steps :

  1. A SVN commit runs a Jenkins build
  2. Jenkins runs a few NAnt scripts
  3. NAnt builds the application through MSBuild
  4. It then launches a custom application that does several things:
    1. It downloads a few infos through a webservice, updates a DB, etc
    2. It modifies InnoSetup scripts with a few dynamic informations, like the version number
    3. It signs the binaries with a SSL certificate
    4. It launches the InnoSetup scripts to create the setup packages
    5. It signs the setup packages with the SSL certificate
  5. It then changes a few things before running the custom app again, in order to generate a different setup package

That’s quite a complicated and convoluted solution to a not-so-complicated problem. And, most importantly, it uses too much different technologies : I believe both the NAnt scripts and the custom application can be removed from the process.

So, I’m looking for a suitable replacement. I’ve had my eyes on Albacore for a few weeks, which looks very fun, and would allow me to use Ruby, which I might need to learn for later projects. But it has important problems:

  • It’s very light on documentation: the official wiki documents the V1, but it’s incompatible with the current V2, which is better. You have to look at the sources to see what’s available to you, and how to use it.
  • Help is hard to come by on the net.
  • It uses Ruby
    • it’s yet another layer in the build stack
    • it won’t allow me to get rid of the custom app (good luck updating an Access DB through a SOAP webservice)
    • runnig Ruby on Windows is easy, but many gems are not available (some of them very useful)

So now I’m looking at FAKE, which also looks promising. It has the huge advantage of allowing me to easily migrate the custom app (or simply reuse its components), because it’s .NET. But it also has problems:

  • Documentation does not seem much better, even though I haven’t yet started using it, so maybe it’s enough
  • Help seems to be even harder to come by, there seems to be even less FAKE questions on Stackoverflow than Albacore
  • It uses F#, which I don’t know at all, and won’t need in the future, but it’s always interesting to learn a new language (and apparently it’s the new kid on the block in .NET)

That being said, I will try FAKE anyway. It will allow me to remove build layers, and maybe remove the custom app. It will also probably be more easily adopted by the .NET community, especially since Scott Hanselman posted about it a few weeks ago.

Looking from the comments there, if FAKE does not work for me, I might want to try PSake: it’s in PowerShell, wich is a great scripting language, and I know pretty well already.