Hey Codemonkeys, Searchable Code

Started by Mr. Analog, June 06, 2006, 09:55:44 PM

Previous topic - Next topic

Mr. Analog

By Grabthar's Hammer

Darren Dirt

#1
Yeah, it's fast...

...because it returns nothing:

http://www.codefetch.com/search?qy=huffman+compression&lang=javascript

Nothing.

Okay, fine, I can understand that, only found a few good working examples.



But COME ON!

http://www.codefetch.com/search?qy=rot13&lang=javascript

Also Nada. ???


- - -

I looked on the "help and examples" page. The examples were no help.

Simple searching, comes up with no results, I must presume there's nothing in the indexes available to this search engine.



I tried one more thing, now I suspect that it's really just an excuse for having Amazon "buy this book" affiliate links. Cuz guess what? Inspiration struck: 'Maybe "rot13" is gonna be found under "rot 13" !'

http://www.codefetch.com/search?qy=rot+13&lang=javascript


Still nothing of value (although a bunch of "[something].pROTotype.[something]" comes up) but look at all the "Amazon" book links ::)

_____________________

Strive for progress. Not perfection.
_____________________

Mr. Analog

I didn't bother searching JavaScript, I tested it with C# and Java and it returned plenty of example code.

http://www.codefetch.com/search?qy=socket+tokenizer&lang=java

http://www.codefetch.com/search?qy=reflection&lang=csharp

Oh wait, they do have at least one example of a simple caesar cipher:
http://www.codefetch.com/search?qy=Caesar+cipher&lang=javascript

Remember, this isn't a programming concepts search engine, it's a code search engine, so when you search for some basic language component (perhaps you need some usage) then you pop in the keyword and you get all the book examples that they have recorded. A good example of this is:

http://www.codefetch.com/search?qy=vector&lang=java

Incedentally, the results are grouped by book and they give you links to Amazon so you can buy them (or at least find more information about the books).

I think the concept of this tool went over your head, through the town and out to sea.
By Grabthar's Hammer

Darren Dirt

#3
Methinks that at least *one* of their "rot13" examples would have a function called, or a comment containing the word, "rot13" -- or "rot 13". And I would expect the indexed code to include a Javascript/AJAX version since it's so ubiquitous and being client-side it's quite practical.


I was being a bit sarcastic when I said the "only" purpose of the searching was to show links to Amazon books... But thanks for letting me know that most (all?) of the code that is indexed actually comes FROM those books. That's actually a pretty unique idea, I guess.


So what you're saying is that if you're looking for a code snippet to perform a certain task, you need to guess correctly what the example code used for variable/function names or comments to get a search result? ;) Just kidding; I'm sure the more popular server- or compiled- languages have tons of handy examples and are useful to those doing large scale projects in those languages who don't have reference books themselves. etc.


- - -

Seriously though, I did a Javascript/AJAX search for "extends" and happily they include the popular "rico.js":

http://javascript.codefetch.com/example/ld/ch13/refactor/rico.js?qy=extends


and:
Quote from: Mr. Analog on June 08, 2006, 01:03:42 AM
Oh wait, they do have at least one example of a simple caesar cipher:
http://www.codefetch.com/search?qy=Caesar+cipher&lang=javascript

Remember, this isn't a programming concepts search engine, it's a code search engine

Yeah, that's a nice example -- Funny you should mention "Caesar" cuz I was just last night looking at a whole bunch of cipher/encryption examples at this way cool site: http://rumkin.com/tools/cipher/



_____________________

Strive for progress. Not perfection.
_____________________

Darren Dirt

I now "get it", after reading a very understandable explanation of "Vigen?re cipher".

Combine that with "Pigpen Cipher" and one could have some fun confusing snoopy folks, e.g. leaving a handwritten note on your desk at work with all these strange symbols... :D
_____________________

Strive for progress. Not perfection.
_____________________