u Notes from the Underground: Apparently, you can search code

Apparently, you can search code

Saturday, February 18, 2006

I didnt know this before, but there exist search engines for finding code that you can reuse. They didnt seem intelligent enough to me, and my being a first time user probably didnt help matters. (I am becoming a bit of a UI buff these days; I noticed that there ought to be checkboxes, rather than radio buttons or drop-down boxes for selecting languages within which to search.) I was trying to find some decent javascript code for doing generic form validations, and it took me a few tries before I could find one to my satisfaction. The problem seems to be that the only things there to be searched are the comments and the code themselves, and there are many ways of writing the same thing. E.g., isInteger(), checkInt(), validateInt(), intCheck() etc etc all do the same thing, and the search engine doesnt know well enough to return them all for the search 'validate form'. Still, I guess you can extract some value out of this by understanding how this usually works.

I got to know about this from a Wired article, that talks about Krugle, a new code searcher thats about to be launched. (Thanks to the SophistPundit)
The new service joins other source-code search engines like Koders and Codefetch, but Krugle intends to differentiate itself by allowing developers to annotate code and documentation, create bookmarks and save collections of search results in a tabbed workspace. Saved workspaces have unique URLs, so developers can send an entire collection of annotated code to a co-worker just by e-mailing a link.

Cool.
Krugle also contains intelligence to help it parse code and to differentiate programming languages, so a PHP developer could search for a website-registration system written in PHP simply by typing "PHP registration system."

Duh. Intelligence to recognise the language? Even my paleolithic VI can do that.

6 Comments:

At 7:42 PM, February 18, 2006, Blogger Rajat said...

I remember reading about Krugle somewhere. Didn't know about Koders & Codefetch.

BTW I don't think you should be linking 'search' & 'engines'to separate links. Unintuitive, if you ask me. ;-). I would rather prefer 'search engines like this & this'.
Think about it this way - if you had 13 search engines, what would you do? Link each letter of 'search engines'? No, you wouldn't do that.

 
At 9:48 PM, February 19, 2006, Anonymous Anonymous said...

Well, I would never link to 13 search engines in the first place. :D. Hmm, it seems OK to me, I think I've seen people putting out links like that, and also I didnt want to ruin the flow of the sentence. Yea, its probably unintuitive on seeing it for the first time. Anyways.

 
At 9:34 AM, February 20, 2006, Anonymous Anonymous said...

Thanks for the links Venu. Am at the threshold of a month long coding exercise. Will be useful, I guess.

 
At 2:52 PM, February 20, 2006, Blogger Dijas said...

Thats nice.....Will help me relieve some burden off my pitiable nut...

 
At 1:10 PM, February 23, 2006, Blogger Saturday Night Takeout said...

Really, why would you call VI paleolithic? I think of it more as avant-garde :D

 
At 2:05 PM, February 23, 2006, Anonymous Anonymous said...

Well, vi is probably the oldest editor out there, if you discount ed
. And its cool somewhat because it is avant-garde, yes, but it has irritated me many times because its so different and you need to keep reminding yourself that this is vi.

 

Post a Comment

<< Home