Search the Web for Source Code with Google Code Search
If you haven't heard about it already, Google has a service called Google Code Search. Description straight from the Google Code Search FAQ:


Google Code Search helps you find function definitions and sample code by giving you one place to search publicly accessible source code hosted on the Internet. With Google Code Search, you can:

  • Use regular expressions to search more precisely

  • Restrict your search by language, license or filename

  • View the source file with links back to the entire package and the webpage where it came from



So if you're looking for that elusive A.I. algorithm or just want to see "how other people did it", just head on to Google Code Search and zero in on that code.

Additional Resources:
The Official Google Code Search Forum
The Official Google Data API Developer Forum