Some Usability Thoughts for the Weekend...
2 min read
2 min read
A couple of days ago I got the order to write a very simple program that would take a bunch of XML input files with the task to elaborate them in terms of grouping them according to some identifier and then to output the result (grouped per directory) in a more user friendly and readable way. While the prog is stupidly simple there are still some potential pitfall one might not realize immediately.
if(!Directory.Exists(destinationDir))But attention! What might a "dummy" user do what an "expert" user might not? Probably enter something like this:
{
Directory.CreateDirectory(destinationDir);
}
else
{
//delete all files and directories in destinationDir
}
if(!Directory.Exists(destinationDir))
{
Directory.CreateDirectory(destinationDir);
}
else
{
//create an output directory inside the specified
destinationDir = Path.Combine(destinationDir, "Out");
if(!Directory.Exists(destinationDir))
{
//create it
}
else
{
//Ask the user about wiping the content of the output directory
//Do it if confirmed
}
}