Better Software - April 2008 - (Page 32) A s A developer, I often have the feeling that I am writing code that others have previously written. How often have you built a standard application structure such as a GUI to modify or retrieve information from a database, built code to iterate through a sequence of objects, or scratched your head trying to determine the most efficient approach for storing data in a Perl hash? We shouldn’t have to create such common code from scratch. Many approaches are available to enable code reuse. Perhaps the most widely used at present are libraries containing frameworks, such as those for logging, presentation, or database-connection pooling. But just keeping track of the growing number of potentially viable frameworks is a headache for developers everywhere. Being heavily involved with Java, I find this burden increasing rather than decreasing over time. The Java library, useful as it is, is large enough that it is not always easy to find what I need. Software search engines may be the answer to finding chunks of reusable code. This article reviews some popular source code search engines in common use (links are located in the StickyNotes). search engine products. There are a significant number online, mostly commercial and paid for by advertisements. The prime example of this genre is the Google Code Search shown in figure 1. The interface is very easy to use. Search engine spiders crawl across the Web for information, index it, and display it in ranked order. For source code search engines, the search material is code gleaned from repositories such as sourceforge.net, which houses more than 100,000 open source projects; Apache projects; and other well-known open source applications. The spiders index not only source code but also Javadoc comments and POD for Perl, as well as documentation and code-specific wikis such as Wikicodia. Source code engines differ from generic text search engines in how they organize the results. Since code is organized into functions, classes, packages, etc., source code engines display results in a way that reflects that organization. To remain competitive, each search engine has slightly different emphases. The Krugle search engine, for example, provides excellent scoping via search-by-language and licensing options and by differentiating between comments, function definitions, function calls, and class definitions. WhAt Are source code seArch engines? Source code search engines have been adapted from generic source code seArch plug-ins Browser-based search engines target a general audience and play well to the use case of ad hoc searching. Developers, Figure 1: The main page for Google Code Search Figure 2: Koders’ context-sensitive search with Eclipse 32 BETTER SOFTWARE APRIL 2008 www.StickyMinds.com http://sourceforge.net http://www.StickyMinds.com
Table of Contents Feed for the Digital Edition of Better Software - April 2008 Better Software - April 2008 Contents Mark Your Calendar Contributions eLightenment Technology Speaking - A Change Would Do You Good Code Craft - A "D" In Programming, Part 1 Test Connection - Learning the Hardware Lessons Management Chronicles - The Art of Persuading Management Cover Story - Incremental and Iterative Development Developers...Start Your Engines Where Do I Go From Here Product Announcements 10 Things You Might Not Know About... The Last Word - Software Quality and the Prisoner's Dilemma Ad Index Better Software - April 2008 Better Software - April 2008 - (Page Intro) Better Software - April 2008 - Better Software - April 2008 (Page Cover1) Better Software - April 2008 - Better Software - April 2008 (Page Cover2) Better Software - April 2008 - Better Software - April 2008 (Page 1) Better Software - April 2008 - Better Software - April 2008 (Page 2) Better Software - April 2008 - Contents (Page 3) Better Software - April 2008 - Mark Your Calendar (Page 4) Better Software - April 2008 - Mark Your Calendar (Page 5) Better Software - April 2008 - Contributions (Page 6) Better Software - April 2008 - Contributions (Page 7) Better Software - April 2008 - eLightenment (Page 8) Better Software - April 2008 - eLightenment (Page 9) Better Software - April 2008 - eLightenment (Page 10) Better Software - April 2008 - eLightenment (Page 11) Better Software - April 2008 - eLightenment (Page 12) Better Software - April 2008 - Technology Speaking - A Change Would Do You Good (Page 13) Better Software - April 2008 - Code Craft - A "D" In Programming, Part 1 (Page 14) Better Software - April 2008 - Code Craft - A "D" In Programming, Part 1 (Page 15) Better Software - April 2008 - Code Craft - A "D" In Programming, Part 1 (Page 16) Better Software - April 2008 - Code Craft - A "D" In Programming, Part 1 (Page 17) Better Software - April 2008 - Test Connection - Learning the Hardware Lessons (Page 18) Better Software - April 2008 - Test Connection - Learning the Hardware Lessons (Page 19) Better Software - April 2008 - Management Chronicles - The Art of Persuading Management (Page 20) Better Software - April 2008 - Management Chronicles - The Art of Persuading Management (Page 21) Better Software - April 2008 - Management Chronicles - The Art of Persuading Management (Page 22) Better Software - April 2008 - Management Chronicles - The Art of Persuading Management (Page 23) Better Software - April 2008 - Cover Story - Incremental and Iterative Development (Page 24) Better Software - April 2008 - Cover Story - Incremental and Iterative Development (Page 25) Better Software - April 2008 - Cover Story - Incremental and Iterative Development (Page 26) Better Software - April 2008 - Cover Story - Incremental and Iterative Development (Page 27) Better Software - April 2008 - Cover Story - Incremental and Iterative Development (Page 28) Better Software - April 2008 - Cover Story - Incremental and Iterative Development (Page 29) Better Software - April 2008 - Developers...Start Your Engines (Page 30) Better Software - April 2008 - Developers...Start Your Engines (Page 31) Better Software - April 2008 - Developers...Start Your Engines (Page 32) Better Software - April 2008 - Developers...Start Your Engines (Page 33) Better Software - April 2008 - Developers...Start Your Engines (Page 34) Better Software - April 2008 - Developers...Start Your Engines (Page 35) Better Software - April 2008 - Where Do I Go From Here (Page 36) Better Software - April 2008 - Where Do I Go From Here (Page 37) Better Software - April 2008 - Where Do I Go From Here (Page 38) Better Software - April 2008 - Where Do I Go From Here (Page 39) Better Software - April 2008 - Where Do I Go From Here (Page 40) Better Software - April 2008 - Where Do I Go From Here (Page 41) Better Software - April 2008 - Where Do I Go From Here (Page 42) Better Software - April 2008 - Product Announcements (Page 43) Better Software - April 2008 - Product Announcements (Page 44) Better Software - April 2008 - Product Announcements (Page 45) Better Software - April 2008 - 10 Things You Might Not Know About... (Page 46) Better Software - April 2008 - The Last Word - Software Quality and the Prisoner's Dilemma (Page 47) Better Software - April 2008 - Ad Index (Page 48) Better Software - April 2008 - Ad Index (Page Cover3) Better Software - April 2008 - Ad Index (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.