|Page (1) of 1 - 06/07/06||email article||print page|
Finding Your Code StashDevelopers have plenty of resources for locating source code.
One of the odd side effects of writing articles about software development is that I get weird e-mail from readers who imagine that I'm their personal consultant. One recent message said, "please give the coding form the subject of ASP.NET and VB.NET," as if I would drop everything just to find out what the heck he was asking for, as well as supply a custom-written application. These sort of requests happen with almost every form of writing -- I once had someone ask me to update a review I'd written about online community tools five years before, since he had to make a decision by Friday -- but software developers, it appears, want someone else to supply them with code.
This isn't always a bad idea (as long as it isn't me they look to). As with many creative endeavors, the best way to learn a new skill or to find out how a tool works is to look at lots of examples. It's a lot easier to see how tweaking the code to do this-teeny-thing changes the application, when you know that the application works in the first place.
Before open source software was common, the number of opportunities to examine such Real Live Code were relatively limited. One of the unsung advantages to open source development is that it makes a lot more examples available -- and it's perfectly legal, in most cases, to grab some of that code and use it in your own application. Instant software!
Naturally, there are the rewards of actually participating in and contributing to an open source project: knowing that the code you write will make a difference for anybody who uses this content management system, web server, or Java-based model railroad tool. Not every developer feeds code back to the community, however. While most developers use open source code in their applications, much of it is simply inserted into the application that was due, er, wasn't that last Thursday?
Finding the code you need, however, isn't always a matter of typing "open source content management" or "C++ e-commerce module" into a google search engine. Even when you find code, it's not in a useful context, or you have to download a whole project just to see if it's suitable for the need you're trying to fill. That's why several sites have sprung up -- and are still springing up! -- to help developers search through code libraries.
Here's a short list that may help you find the resources you need:
- Koders is probably the most general of these sites, promising an easy-to-use interface to search for source code examples. The company also offers an Enterprise Edition, which the company says "enables organizations to recognize significant productivity gains by improving code reuse. Developers and managers can search, review and report on the enterprise code base in ways never before possible."
- Krugle, still in beta, also promises to help you find code for open source projects and, more importantly, navigate through the code repositories. Says the company, which just got a $6.1 million infusion of venture capital money, "Krugle supports code search by crawling, parsing and indexing code found in all open source repositories, as well as code that exists in archives, mailing lists, blogs, and web pages." You can also add your own comments to the code and share notes about it, which could help other developers. The beta is closed, so you can't experiment quite yet, but you can watch a video of how it works from the DEMO conference.
- C Source Net is, as the name would imply, specific to C and C++ code, advertising that it has indexed 278,128,066 lines of C/C++ code. It may not be as exhaustive as some of the other resources, but it's extremely fast.
- The Code Project isn't only about providing code samples (the site also has articles and discussions) but it's a good source for C# and .NET-related code.
- Codase is an alpha release which you can play with to some degree. It's slightly limited at the moment, with more Linux code than, say, Visual Basic, and I found annoying typos that make me wonder if their indexing is better than their spelling (the site says they "covers codes usually hidden inside compressed files and source control repositories, where general search engines fail to find and index").
- DocJar is specifically written for Java programmers, and gives them an easy way to search java classes. The site is a little funky -- there's no "about us" for instance -- but it can still be of some use.
- Code Fetch gives you access to the source code that's listed in programming books, presumably making it ideal for anybody who is trying to come up to speed with, say, Flash or Objective C. The company makes money by selling the books.
- Need more than just code? Safari is a paid subscripion service that gives you access to the entirety of programming books from all the major book publishers, including SAMS, Addison-Wesley, Peachpit, O'Reilly -- not just the source code. I've had a Safari account for three years or more, and I'm amazed at how often I turn to it to explain a technical subject, including the code that illuminates a technique.
Esther Schindler has been writing about technology professionally since 1992, and her byline has appeared in dozens of IT publications. She's optimized compilers, owned a computer store, taught corporate training classes, moderated online communities, run computer user groups, and, in her spare time, written a few books. You can reach her at firstname.lastname@example.org.
Related Keywords: open source, software development, web site, krugle, programming, codase, koders, code fetch, find source code, code project, techniques, find what you need
Source:Digital Media Online. All Rights Reserved