Databases Reference
In-Depth Information
13.6.1 Implications for Tools for Opportunistic Searches
From our empirical studies, we have learned that developers are highly successful
when they do Web searches to find code snippets to remember syntax details or
to find facts. In this case, developers know exactly what they are looking for and
recognize it easily. However, developers are not highly successful when they search
on the Web for code snippets to clarify implementation details or fix errors, which is
the most common motivation for searching on the Web. We believe that improving
tools to help developers be more successful in this type of searches can make a
positive impact on the effectiveness of solving software problems. Based on our
findings, we give the following recommendations to tool designers.
13.6.1.1 Make Examples and Source Code Snippets More Visible
Developers are mainly looking for examples or code snippets on the Web. Even
when developers look for API Documentation or tutorials, they also want to see
examples of how to use certain functionality. However, Web browsers do not facili-
tate the identification of examples or code snippets in the search results.
Due to the fact that we observed that developers often look for search results that
contain examples or code snippets, we believe that it would be helpful if developers
could know which search results contain examples or code snippets. One possibility
is to augment the search results gathered from a search engine such as Google and
analyze which ones have source code. Mica [ 13 ] and Assieme [ 7 ] are two tools that
recently have shown that augmenting Web search results to make developers aware
of which results contains source code examples of API can make Web searches
more effective. Also, after identifying that a result has source code, we believe that
it would be useful to show technical and social information related to a piece of
source code. Recently, a prototype that augments Web search results with reputation
information has been developed [ 6 ].
Another possibility to make examples or code snippets more visible is to create
a crawler to gather source code snippets from tutorials, forums, API documentation
on the Web and create a repository of them. This repository could associate code
snippets with text surrounding them in Web pages so that code snippets would have
actual text associated with them to facilitate the matching between code snippets
and keywords in queries [ 14 ].
13.6.1.2 Show Error Related Information When an Exception Occurs
Nineteen percent of searches to clarify information were to fix errors. When devel-
opers compile, run, or test their source code, they copy and paste the exception in a
Web search engine and they try to find what causes an error, how it can be solved,
and what are the experiences of other people with that same issue.
Search WWH ::




Custom Search