Poor User Experience: Provide the user with useful information with error messages
Based on my last post regarding a bad experience installing Flash, today I had two experiences of Windows Vista blocking what I wanted to do.
The first occurrence was when I tried to delete a folder. At this point, Windows Vista happily popped up a dialog saying it was open in another program. This information would have been great if I only had one program open, however I had 3xVS, 3xIE, Firefox, Acrobat, 5xWindows Explorer, 3xCMD, Windows Media Player plus reflector open.
What I would have loved to see is the dialog saying:
"The action can't be completed because the folder is in-use by the following programs: "
"Windows Explorer - Locked"
"Notepad - SomeTextFileInsideLocked.txt"
"Close programs and try again."
I would have got the same error, but I would have just enough information for me to understand what I need to do in order to complete the action. Turns out the folder wasn't open, but a file inside the folder.
The same is true when I try and eject my USB Pen drive. If Windows had told me which applications was using the device, I would have been in a position to do something about it constructively, instead of closing possible applications in an attempt to close the correct one.
Of course, it could have been worse:
In summary if you have to display an error message, display enough information to allow the user progress instead of just blocking them and leaving them to work out what they did wrong. Error messages saying the user has done something wrong with no indication of what provides them with an unpleasant experience and reflects badly on your application.
You never know, I might get back on and continue some technical posts shortly.
Labels: Bad Software
How not to install your application - Adobe Flash and Windows Vista
Recently I have been using the online TV services in the UK (ITV Catchup, BBC iPlayer, C4 Watch Online) a lot, however every now and again the video would stop and I would have to exit full screen and re-enter. Very annoying when your just getting into Dr Who on iPlayer.
I thought I would just upgrade my Macromedia Adobe Flash plugin and this might fix the problem. This is the story of what happened when I attempt this.
1) Visit Macromedia website and download flash installer (1.4mb). I launched the installer, UAC displays, installer says it installed successfully.
2) Visit iPlayer - now says I don't have flash installed, please re-install. How odd! I just installed it.
3) Visit the Macromedia Adobe site, install Flash player via the website and not installer. IE Protection for addin asks for confirmation. Macromedia Adobe site says everything worked successfully.
4) Went back to iPlayer - nothing. Went to ITV, nothing. Flash had given up the ghost. Tried with firefox - install failed.
At this point, I got frustrated. The installer wasn't giving me any errors or guidance to anything going wrong - it was just saying everything was prefect.
After a bit of googling, I found my way to "Troubleshoot Adobe Flash Player installation for Windows".
In terms of guidance, this page tells me to uninstall (might as well tell me to reboot first to see if it fixes the problem), download flash, edit ActiveX settings, download SubInACL from Microsoft oh and then about Windows Vista installation failure. It says:
The letter changes with each Flash version, so may be "FlashUtilb.exe" or "FlashUtile.exe"
After doing this, everything worked just fine. However, this experience had multiple problems.
Firstly, when installing applications, the developer should always make sure that they did install successfully. If they didn't, then why are you displaying confirmation about a successful install? This just causes confusion for the user and makes your application look bad. The flash player should have reported that the install failed and directed me to the troubleshooting page instead of me having to find and go there myself.
If the installer does fail, then provide useful contextual help. It would have been great after being pointed to the troubleshooting page, if the page could have identified that I was on Windows Vista, knowing there are some known issues with Vista and have put that in a nice clear block at the top instead of including it in a long list of items. This way I could quickly see which solutions relate to me, but still be able to dig into other items which might cause the problem.
Adobe should have done this, or at least have some structure to the page such as related headings instead of a random list of possible solutions.
Is this too much to ask?
Labels: Bad Software
CCNet, MSBuild and MsBuildTasks
Recently, I setup a local CruiseControl.NET Server for a project I'm working on. In order for CCNet to execute a MSBuild project, you need to configure CCNet.config, this is found in your installation directory for the server - in my case 'C:\Program Files\CruiseControl.NET\server'.
The basic structure for a ccnet project would look something like this. You have a project and within that you have a series of tasks (you can find a more complete sample on the documentation page - http://ccnet.sourceforge.net/CCNET/Configuring%20the%20Server.html). These tasks are CCNet tasks, built into the server to use as part of your build process. In my example, I'm using the MSBuild task to build MyProject.sln.
<cruisecontrol>
<project name="MyProject">
<artifactDirectory>E:\CCNet\MyProject\Artifacts</artifactDirectory>
<tasks>
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>E:\CCNet\MyProject\Build\src\</workingDirectory>
<projectFile>MyProject.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug</buildArgs>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
<timeout>900</timeout>
</msbuild>
</tasks>
<publishers>
<xmllogger logDir="E:\CCNet\MyProject\Logs" />
</publishers>
<modificationDelaySeconds>10</modificationDelaySeconds>
</project>
</cruisecontrol>
At this point, my project happily building, next I want to execute my NUnit tests and have my results displayed in the web dashboard.
After my first attempt of using the CCNet NUnit task, the unit tests failed because I was referencing a file (naughty I know) on the disk and as NUnit shadow copies all of it's assemblies so they aren't locked I realised I needed to disable Shadow Copy. A very simple task I thought, NUnit accepts a parameter on the console application for this.
A quick look at the NUnit CCNet Task page and I was faced with a bit of a problem. The NUnit task looks like this:
<tasks>
<nunit>
<path>D:\dev\ccnet\ccnet\tools\nunit\nunit-console.exe</path>
<assemblies>
<assembly>D:\dev\MyProject.Tests\bin\Debug\MyProject.Tests.dll</assembly>
</assemblies>
</nunit>
</tasks>
Notice, no element for setting the command line properties!!! Such a core feature I can't believe it was missed. After a quick chat with the build manager at Red Gate, he pointed me towards http://msbuildtasks.tigris.org/ and their NUnit Task. This is a set of MSBuild Community Tasks which you can use as part of your msbuild script to perform various tasks - such as executing nunit tests.
Creating a MSBuild Script using MSBuild community tasks
MSBuild is a build system which defines how to build your .Net solutions. The script is based on xml, the basic outline is below:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<!-- Include MSBuild tasks here -->
</Project>
As part of this I am importing the MSBuild community tasks targets file, this will allow me to use the tasks later on. Notice at the top within the project element, I have defined a DefaultTarget (DefaultTargets="Test"). As far as I can tell, this is the target which will be executed first when the script is built, this will make more sense in a moment.
Once we have this in place, we need to define some tasks. In the example below, the first target is the build. This target has a single task, run the MSBuild task against my solution with the configuration as release. This will execute MSBuild to compile my application - excellent!
After the build target, we have the 'Test' target, as defined in the DefaultTargets this is what is executed first. I then use the DependsOnTarget to define the task which should be run before the current task, the 'Build' target could also depend on other targets. As a result, everything gets built in order based on their dependencies. This Test Target executed NUnit and runs the unit tests for MyProject.Tests.dll and outputs the results to nunit-results.xml. The continue on error property defines if the build should fail if a test fails - which it should!
<Target Name="Build">
<MSBuild Projects="MyProject.sln" Properties="Configuration=Release" />
</Target>
<Target Name="Test" DependsOnTargets="Build">
<Message Text="Tests to run"></Message>
<NUnit Assemblies=""..\bin\Release\MyProject.Tests.dll""
ContinueOnError="false"
ToolPath="E:\CCNet\Tools\NUnit\"
DisableShadowCopy="true"
OutputXmlFile="$(Logs)\nunit-results.xml" />
</Target>
The most important line for me was the ability to DisableShadowCopy as a property, the reason why I had to use the community tasks.
By using this, I can now have CCNet run this MSBuild script which in turn builds and executes my unit tests. Hopefully, this gives you a very quick overview of how to use the MSBuild community tasks. In a later post, I will explain my complete MSBuild script for my current project and how I utilise the community tasks.
Note:
There are more advanced ways of managing your ccnet config and your MSBuild scripts, if you are managing a number of different projects I would really recommend you investigate different ways of managing the config. This post was just how to manage your first project.
Team City - Update AssemblyInfo with current build number
When being applications, ideally you want your assemblies to be labelled with the associated build. This will allow you to keep track of your versions, useful for bug reports, and for .Net\CLR to correctly identity which version of an assembly to use. There are some disadvantages for doing this, one being you lose the flexibility to xcopy updated assemblies without having to recompile everything, this is the release why Microsoft keep versions at 2.0.0.0 (or 10.0.0.0 in the case of SQL Server 2008).
But, I want my assemblies to be labelled, as such I want to use the build counter TeamCity keeps track of when it builds my applications and have that as the value for my AssemblyVersion property. TeamCity is my current continuous integration server which uses MSBuild to compile my application, it is always best to take the build number from a CI server as it acts as a centralised point for revisions.
Within the TeamCity control panel, on the general settings page for your build configuration, you have two important boxes. The first box defines the build number format, there is then a place holder as {0} which is where TeamCity inserts it counter value. This counter value is within the second text box. Every time your project is built, this is increment. The counter contains the value which will be used for the next build.
We now have our build number in the format we want (in this case 1.0.0.28), but we need to be able to access this when the application is being built. As it happens, TeamCity provides this number within an environment variable BUILD_NUMBER which we can use within our build script via the $() syntax, the code below takes the number from TeamCity and puts it inside another variable called Version.
<PropertyGroup>
<Version>$(BUILD_NUMBER)</Version>
</PropertyGroup>
I then need to update my AssemblyInfo.cs file with this build number. The AssemblyInfo file contains all of the metadata about the assembly which is included when it is built. I just use a MSBuild community task to rewrite my complete AssemblyInfo.cs file with all of the required information.
<AssemblyInfo CodeLanguage="CS"
OutputFile="$(MSBuildProjectDirectory)\DLRHost.Engine\Properties\AssemblyInfo.cs"
AssemblyTitle="DLRHost.Engine"
AssemblyDescription="DLRHost Engine"
AssemblyConfiguration=""
AssemblyCompany="Ben Hall - Blog.BenHall.me.uk"
AssemblyProduct="DLRHost"
AssemblyCopyright="Copyright (c) Ben Hall, 2008"
AssemblyTrademark=""
ComVisible="false"
CLSCompliant="true"
Guid="d038566a-1937-478a-b5c5-b79c4afb253a"
AssemblyVersion="$(Version)"
AssemblyFileVersion="1.0.0.0" />
Notice at the bottom, as the AssemblyVersion I am using my variable which contains the TeamCity build number. After the assembly has been built, if we load the assembly in Reflector you can see all of the metadata included, including the correct Version.
In summary, that is now you can attach your current build number to your assemblies with TeamCity.
Labels: TeamCity
SQL Server 2008 RC0 - Enable FileStream post setup
Within CTP6 and RC0, there is a bug based around enabling filestream. Within the setup process, there is a tab which allows you to enable filestream as it is disabled by default. If you happen to miss that dialog and process in the installer you will have trouble enabling filestream via the sql configuration manager. In fact, on the properties dialog, after enabling FS the OK button does nothing.
The team have now wrote a blog post explain this: Enabling FILESTREAM post SQL2008 Setup - a Known Issue in SQL Config Manager
The solution is to run a WMI script (available on CodePlex - http://www.codeplex.com/SQLSrvEngine/Wiki/View.aspx?title=FileStreamEnable&referringTitle=Home)from the console . To do this:
1) Download (http://www.codeplex.com/SQLSrvEngine/Release/ProjectReleases.aspx?ReleaseId=14071)
2) Execute the vbs script (cscript filestream_enable.vbs /Machine:. /Instance:(local) /Level:3 /Share:MSSQLSERVER)
File stream should now be enabled. Hopefully this will be fixed for RTM.
Labels: SQL Server 2008
Team City - Moving your Data Directory
After running team city for a while, and being really happy with it, I noticed that all of its configuration and all of my artifacts where being stored on under my local users folder (C:\Users\Ben Hall\.BuildServer). On my system, I've moved all of my user profile information onto my E:\ drive, so I didn't really want this information on my C:. I also wasn't happy with the location because it wasn't easy to get at to browse.
After a bit of hunting around, I found that I needed to modify the TEAMCITY.DATA.PATH property to point it to my own custom location, after a bit more hunting around I found where that property actually was.
What you need to do, is first copy the .BuildServer directory to your new location, this has all of your settings. Next load a command property (as administrator) and enter the command:
C:\TeamCity\Bin\tomcat6w.exe //ES//TeamCity
This will load a TeamCity properties dialog, under Java at the bottom of the options you will find the property as shown below.
Restart the service and your done! If you get your license agreement again - your pointing to the wrong data directory.
Wiki Page: http://www.jetbrains.net/confluence/display/TCD3/System+Properties+for+Running+the+Server
Labels: TeamCity
NxtGenUG Fest08
Today, I attend the NxtGenUG Fest08 conference at TVP. This is a conference for all the members (plus people who paid) from the different regions to meet up and have a great conference at Microsoft UK. It was a great day! An excellent atmosphere, very good sessions - especially "whose session is it anyway?".
NxtGenUG also do awards for the best speakers over the past year, not heard any other user group doing this before and I think its a nice touch. As it happens, my Coventry Sandcastle nugget had the best feedback for the nuggets in Coventry (well, after the organisers nuggets were ruled out because they are organisers) so I was awarded a nice little trophy. Also turns out my recent Windows Clippings nugget in Cambridge had the best feedback, so I got an trophy for that too. I was pleased after receiving them.
Right, how do you sell stuff on ebay? :)
Plus I got Halo 3 for the 360 as my leaving swag! Great day, can't wait for Fest09!
Labels: NxtGenUG
Community call to action - Where are all the testers?
As many of you are aware, I currently work at Red Gate software as a Test Engineer. I have a strong interest in both code and test side and happy to discuss either at length. I joined Red Gate as a tester because I strongly believe Red Gate are doing something amazing, producing great useable software and I felt I could make a difference (for the better) as a tester. However, after six months of being a tester I have to ask the question - in the community, where are all of the testers? Developers are easy to find, they have massive conferences (PDC, TechEd) down to small user groups (NxtGenUG), I have been a member of NxtGenUG for almost 2 years since they first started in Coventry and I attended TechEd Europe but where are the testers at these types of events? Or am I just missing something?
I know recruiters have been asking this question for a while, but from a community point of view - where are all the testers? Where are the conversations happening? There must be a conversation happening about how we can improve software testing, how testers fit into the project structure and take advantage of new development technologies. Alt.Net has really promoted thinking differently about software development, but how many testers are involved in that kind of discussion? People such as Roy Osherove provides his experience and is very passionate about unit testing, but who is leading the way when it comes to functional\acceptance\integration testing? Where are people discussing how we can take advantage of "design for testability" from the testers point of view - not just developers?
Visual Studio 10 (Rosario) is apparently very focused on testers and how the visual studio ecosystem (VSTS) can support testers equally as well as software developers, but without a good public conversation happening how is it going to happen and not just let it fall by the waste side leaving them to focus on other existing parts. In November 2005, The Register wrote about Microsoft wanting to turn testers into 'Rock Stars', but since then nothing has happened. A Microsoft Tester Centre opened on MSDN in November 2007 (two years after The Register article) but its extremely light on content! It's not even a feature developer centre? In fact, the link is under "Servers and Enterprise Development" within the Developers Centre! How can Microsoft expect to make a major stand and push testing if they don't even have the testing centre under the right category?
Internally, Microsoft seem to have a really good setup with Software Design Engineer in Test (SDET) who I would class as 'Test Developers', but at heart still testers (also in terms of this post), while some of those such as Steve Rowe are blogging and talking about testing the reach externally still doesn't seem to be enough.
This is my call to action, If there are any testers (or Test Developers) reading this, we should talk!! Especially those in the UK, I would love to hear from you! We should have a chat about the testing community and testing in general.
Please either leave a comment or email Blog {at} BenHall {dot} me {dot} uk. On the other side - developers - what do you think?
Labels: Testing





Social networks
Twitter GitHub SlideShare