Databases Reference
In-Depth Information
APIs can be complex to use, with arcane incantations for calling methods or
instantiating classes. A reference example is easier to use than documentation,
because it gives the programmer a starting point that can be tweaked to suit the
situation.
7. Example of how to use features of a programming language.
In four anecdotes, respondents reported that reference examples of language syn-
tax and idioms were helpful when working with an unfamiliar programming
language. Users who haven't programmed in a language before, or have for-
gotten parts of it, or are using the language in a new way (e.g. new hardware),
searched for source code to serve as a language reference. One respondent wrote,
“...mostly I look for code for syntax, I don't always like to refer to topics for
syntax if it is readily available on my desktop.”
8. A block of code to be used as an example.
Developers look at a block of code to learn how to do something. There were
four situations that described this type of search. Programmers were not look-
ing for reusable components, but their goal was to learn through examples, such
as “examples of javascript implementation of menus” and “examples of thread
implementation in python.”
9. Confirmation and resolution of bugs
There were five searches that were looking for solutions to a bug. Sometimes the
can be in the form of of a report or post to a form that confirmed the presence
of an actual bug. At other times, there was a patch that repaired the bug. Three
of the searches led developers to find relevant information in mailing lists and
forums. Developers prefer to search for a patch or quick-fix by forming natural
language queries with the keywords from an error message or keywords based on
the functionality deviation caused by a bug. The need for code in such situations
is very specific in terms of implementation language, platform, version informa-
tion, size of patch and licensing requirements. In the process of debugging, if the
problem seems to occur while compiling a library or at run-time, users examine
the source code of a library to determine the exact problem.
3.5.2 Uncommon Searches
There were a few uncommon searches that are worthy of attention. These were look-
ing for a system to be used as a reference example, seeking a reference example for
using a GUI framework or widget, and searching for examples of language syntax
usage.
While developing or modifying a system, programmers look at existing similar
systems for ideas. Searches for systems that can be understood and the logic/princi-
ples can be borrowed to construct new systems. Two searches were for systems with
Search WWH ::




Custom Search