Slashdot Mirror


Public Code Repositories?

dubious9 asks: "Today I was refactoring a parser of mine to use a better implementation of a string searching algorithm. I went to the internet trying to find a good code repository where I might have a chance to find an implementation of a good algorithm, but a cursory glance turned out no clear winners. SourceForge was the best that I could find. Where is the best online repository/library of common and reusable code snippets?" We've tackled this subject a once or twice over the years, is SourceForge really the best answer or are there other options?

14 of 43 comments (clear)

  1. Google by DeadSea · · Score: 4, Informative
    A general search of the internet is bound to turn up algorithms that some random develper has posted but which are in now code archive. Furthermore, individual sites with code repositories generally aren't as good at searching.

    If your google search doesn't turn up any relavent hits, then going for the repositories might be a good idea, but which repository you turn to is likely to be language dependant. Depending on the subject matter you might even do well by picking up a book.

    I know java best, so I'll give my favorite Java repository: The Giant Java Tree

    Perl hackers will probably recommend CPAN

    I'm sure you will get an different site from each developer on Slashdot.

  2. Your might want to try.. by ewhenn · · Score: 5, Informative

    www.planetsourcecode.com

    Might be something there.

  3. Bob Stout's Snippets by JabberWokky · · Score: 2, Informative
    Many years ago, Bob Stout's Snippet's was a great resource. I think I got the name right. That, together with Ralf Brown's interrupt list, was a great resource for the PC coder.

    --
    Evan (going by memory, no time to Google to check)

    --
    "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  4. String match algorithm reference by freshmkr · · Score: 4, Informative
    Off topic, but you may find this resource useful:

    http://www-igm.univ-mlv.fr/~lecroq/string/index.ht ml

    --Tom

    1. Re:String match algorithm reference by oobar · · Score: 2, Informative

      That's a pretty neat site, very thorough.

      Another potentially useful one is the Dictionary of Algorithms and Data Structures (DADS). A query of "String search" returns about 33 hits.

  5. Code is proprietary by Webmonger · · Score: 2, Informative

    You aren't allowed to redistribute code you get from planetsourcecode.com, which is a shame.

  6. We should make our own! by Webmonger · · Score: 3, Funny

    We can make our own source code repository. Yeah, that's it. We'll call it codesource.org, and we can use MySQL and PHP to run it. Anyone know where I can find some source code to get started? :-)

  7. Every algorithm ever written now under one roof by Spudley · · Score: 4, Funny

    Where is the best online repository/library of common and reusable code snippets?

    The US Patent Office. :-/

    --
    (Spudley Strikes Again!)
  8. Re:Good idea! by froseph · · Score: 2, Funny
    > We've tackled this subject a once or twice over the years...
    >... but just for the sake of completeness we decided to cover it again.

    At least they know its a repost :P

  9. boost.org by blackcoot · · Score: 4, Informative

    boost.org seems to have some pretty neat stuff; however, i've never used thier stuff...

    fwiw (and moderately on topic), clr ("introduction to algorithms", but i suppose with the new edition that should be clrp...) has a boatload of string searching algorithms in it, including (i *think* -- i haven't flipped through much more than the graph section recently) the knuth-morris-pratt algorithm. i've generally found their pseudo-code to be reasonably readable (certainly more so than 90+% of the freely available code that i've tried to read).

  10. Perl and Java... by Xunker · · Score: 5, Informative

    I'm a Perlie and since it opened I've found Perlmonks totally invaluable -- their Q/A section actually has questions that I would ask if wasn't so beyond asking for help.

    On that thread, My java-esque friends tell me Java Junkies is equally good if you're of the Bean persuation.

    Both sites are, in case you didn't guess, based on the Everything Content Engine which is why they look so much alike.

    --
    Hilary Rosen's speech was about her love of money and her desire to roll around naked in a pile of money.
  11. Code snippets & Examples by Gefd · · Score: 2, Interesting

    If your interested in games or not, both FlipCode.com and GameDev.net have alot of reference material for common algorithms.
    They aren't exactly repositories as such, but there is alot of code snippets deposited in various sections throughout both sites.

    - Gef

  12. For Perl... by merlyn · · Score: 2, Informative
    The answer is obviously the CPAN.

    Other open-source languages, looking on the CPAN with some sense of jealousy, are slowly creating similar structures. The Freepan factors out the code that runs the CPAN into a generic tool. Feel free to contribute to the Freepan project if you can.

  13. Computer Science Research Search Site by frosencrantz · · Score: 2, Interesting
    This site (C.S. only directory) is a great resource for finding Computer Science papers (it covers science papers of all types) Source code is sometimes available or available by asking. You might find a paper that helps you decide how to code something yourself.

    Once you find a paper that is close to what you want there are ways to surf to similar/related papers.