Specifying scenario descriptions textually is typically a problem.
Posted on Monday, March 02, 2009 at 1:40 AM.Although meant in a humorous fashion, we do unfortunately see usage scenario descriptions very similar to those in the third image of this comic in the real world. Often times, we see these produced by analysts who have little to no programming experience. They end up providing a multi-level, point-form summary of the steps the software system needs to perform. But like shown in that comic's example, this quickly becomes unruly. Things often get even worse when such a scenario description accompanies a UML activity diagram or a UML sequence diagram.
We should first consider the role of a typical analyst. Their main task is to convey business concepts and processes, as well as the needs of the users, to one or more software developers. In many ways, this mirrors what the software developer eventually does. Namely, that's specifying a certain course of action that is to be performed by the computer. In the case of a computer being the target of the instructions, ambiguity is really not an option.
Over time, we have developed a variety of programming languages to help ease this task. At a higher level, UML has become one of the most common ways of modeling a software system. Unfortunately, it usually takes far too graphical of an approach. To properly convey all of the necessary information, the analysts must annotate the UML diagrams with the aforementioned point-form scenario descriptions. But like mentioned earlier, these textual descriptions often end up becoming difficult to work with. Even descriptions with just a couple levels of branching become awkward.
The analyst needs to be using a more rigorous textual medium to describe the problem to the software developers. In essence, what is needed is a form of pseudocode. Unfortunately, for analysts without much practical programming knowledge or experience, a very ad hoc approach is often taken. Sometimes this pseudo-pseudocode becomes just as difficult to work with as the point-form descriptions.
Some of the best analysts I've worked with were former developers. They were able to take a business problem, and rapidly break it down into pseudocode that was quite similar to C++ or Java, for instance. The more rigorous specification and syntax of languages like C++ and Java made them useful for describing high-level business or usage concepts in a consistent manner. Of course, the pseudocode itself wouldn't compile and couldn't be used directly, but the ideas were presented in a form that the developers could ingest very rapidly. They were able to in turn create a production-ready software system that better met the needs of the users.
I always feel weary working on a project where the analysts have limited hands-on programming experience. Those are the projects that often have the most communication difficulties between the developers and the analysts. In such situations, it is ideal to even have one of the developers come and work as an analyst. Instead of coding or designing the implementation itself, this person acts as a filter between the analysts and the developers. They take the ideas of the analyst, perhaps presented in point-form notes, and distill it down to a pseudocode more digestible by the developers.
It's unfortunate that despite all of the effort put into UML, little of practical value has been produced in this area. There have been some efforts put towards the Object Constraint Language, for instance. But OCL is somewhat limited in its scope. Perhaps the only real solution is, after all, to have analysts who were developers at one point, or who at least received much of the same training as a developer, and capable of writing code.








