22.4. RESULTSOur study led us to two kinds of insights: recommendations for designers of concern elaboration tools and hypotheses about the nature of concerns. We conclude this section with a discussion of the validity of our study. 22.4.1. Tool Design RecommendationsOur first two recommendations for designers of future concern elaboration tools follow directly from our results.
As we reported, despite the differences in searching supported by the concern elaboration tools studied, all participants tended to use a strategy of following the control flow in the program. Although all of the tools had affordances to help follow control flow, in some cases the lack of explicit support made following the control flow tedious and contributed to mistakes in concern elaboration.
For some change tasks, it was natural to describe the lines of code related to the concern. For other tasks, in particular those that add code, it was more natural to describe a condition in the executing system (e.g., a precondition). These conditions hold at one or more points in the execution, or simply execution points. A condition describing a set of execution points might be naturally defined, for example, in terms of the state of an object, the call stack, or a sequence of method calls. To assist code changes and other tasks, tools should map the execution points for a condition to corresponding points in the code. Our third recommendation is based on our analysis of the differences between concerns identified in the context of the reasons given by the programmers' for those differences.
A tool does not exist in isolation. Concern elaboration tools should be expected to work within the context of other development tools. When a participant using a concern elaboration tool knew that a part of the concern could be easily found with another tool, they sometimes chose to limit their exploration with the concern elaboration tool. For example, participants did not include parts of the concern which they knew would be caught by the compiler. The task in which the concern elaboration was posed also affected the extent of a concern that was captured. In a refactoring task, for instance, a developer is typically working with a system that is compilable and for which the compiler can be used to expand the edges of the concern. Our recommendation is that designers of concern elaboration tools should be aware of how other tools might be used to compensate and complement the description of a concern such that a programmer can elaborate a concern cost-effectively within the tool suite. A concern elaboration tool should not prescribe to the user how much of the concern needs to be identified for the task at hand. 22.4.2. Concern CharacterizationWhen we began this study, we assumed that concerns were definite entities that any motivated programmer could reliably identify. In particular, we spoke of a concern as though it were an unformed module that possessed an unambiguous, but possibly messy, interface. This implicit assumption was consistently contradicted by our three cases. In fact, what we found was that the exact concern was heavily dependent on the particulars of the taskit was not reasonable to define it precisely prior to making an actual change, leading to our third design recommendation. Reflecting on our results, we found that each case taught us something different about the murkiness of concerns. Concern boundaries are fuzzy. The Jex case involved the replacement of a concern's implementation. PAMT wrote:
This quote shows how the extent of the concern was dependent upon the context in which the concern was identified. Although the task posed to the developers was to find the code related to existing functionality in the system, it was not always possible to clearly delineate the boundaries of that functionality, perhaps because that functionality had not been considered as a unit during any previous development tasks. Concerns include execution points. The AMT case involved the insertion of new code into the concern. PFEAT wrote:
That is, the points where the code additions were legitimate depended on the code to be inserted. More importantly, these additions depended on a set of behavioral preconditions that had to be met for the inserted code to behave correctly. The interface between concerns is a concern. The AspectBrowser case involved the refactoring of a concern. Prior to performing the traversal feature refactoring task, PAMT wrote:
A couple of insights emerged from this interview with the participants. First, most of the code in the traversal concern would not physically change; the real concern in some sense is the interface between the traversal concern and the code that invokes it. On the other hand, the scope of the code in the traversal concern is likely to change from the invokers' classes to a number of new classes. Also, arriving at a sensible design requires a possibly deep perusal of both the traversal concern and the invoking code, as well as an understanding of how the traversal feature might be enhanced in the future. It is not entirely clear whether just the edges of the traversal concern are the concern or if the core of the traversal concern should be included as well.[2] If one can equate Parnas's notion of a design decision with a concern, discussions on modularity have weighed in on the side of an interface being distinct from its contents [4, 18, 19, 27].
Based on our experience through the three cases, we would now describe a concern as having the following elements:
The complete and correct articulation of a concern is fraught with problems and is seemingly unnecessary, at least in support of software evolution tasks. For example, completely characterizing the execution points of a concern depends on a description of all possible changes to a concern. It is also unnecessary because the current change requires only the determination of sufficient execution points to add the code. According to the expert in the AMT case, two different developers need not even derive the same points in the concern. 22.4.3. Study ValidityOur study was exploratory. By using three participants and three tools on three different systems and tasks, we were able to uncover and consider a range of behaviors and issues in concern elaboration. Despite these differences, some commonalities emerged, such as the strategies used to investigate the code bases, and some differences emerged, such as what the participants determined was the edge of a concern and how they did so. The results of our study provide guidance on the functionality designers should consider when building future tools of this type and hypotheses upon which to base further, more in-depth studies. We have avoided statements about the efficacy of the tools since programmer productivity is known to vary independently of tool use and because we did not compare our tools with existing, non-concern elaboration specific tools, such as grep. Furthermore, we recognize that we only examined a small part of the programming activity that contributes to productivity. To reflect on efficacy, a much larger study would be required. |