Tutorial: Page (1) of 1 - 06/07/06
Email this story to a friend. email article Print this page (Article printing at MyDmn.com). print      facebook  

Finding Your Code Stash

Developers have plenty of resources for locating source code.

By Esther Schindler

Do I look like Miss Coding Answers, or something?

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 esthers@digitalmediaonlineinc.com.

Related Sites: IBN - IT Business Net ,   IBN - Business ,   IBN - SoftwareDev

Related Newsletters: IBN - IT Weekly Newsletter
Click Here to Comment on This Article
Most Recent Reader Comments:
  • Finding Your Code Stash by DMN Editorial at Jun. 07, 2006 10:02 pm gmt (Rec'd 3)

    Click Here To Read All Posts

    Must be Registered to Respond (Free Registration!!!, CLICK HERE)
    Source:Digital Media Online. All Rights Reserved
  • Dexim P-Flip Power Play Dock for iPhone/iPod touch
    polymer battery all in one neat device. Plug the P-Flip into your computer to charge its battery, then plug your iPhone into the P-Flip, and it charges the iPhone battery. Read More
    Apple Intros iPad
    After years of hype, Apple, Inc. today introduced the iPad, a portable computing device that looks like a big iPhone. Introduced today by Apple CEO Steve Jobs, the iPad features a touchscreen keypad, wireless capability, the capability to run all iPhone applications, all in a form factor that fits in between an iPhone and a MacBook. With the iPad, you can play movies, load maps, view photos, update your calendar, basically do the same things as on an iPhone, and more. Read More
    HDTV Buyer's Guidelines
    When it comes to choosing between Plasma and LCD, it's important to shop in the mindset that one high-def TV is not necessarily better than another - rather, it's a question of which one is right for you. That said, it can be a tough call to make when all that meets the eye are sleek screens and vibrant pictures - are Plasmas and LCDs really that different? Read More
    Tritton AX 180 universal gaming headset
    The Tritton AX 180 universal gaming headset is designed to work with the three major gaming platforms (Wii, xBox 360, and Sony PlayStation 3, via analog inputs), but also with both Macintosh and Windows based computers. Read More

    @ Copyright, 2010 Digital Media Online, All Rights Reserved
    p> Webmaster
    Privacy.