« New Primordial Ooze Banner | Main | Fake post on the Google blog over the weekend »

Google Unveils Code Search - Death of Krugle?

Codesearch_logo

I had previously wrote about the Krugle code searching engine. I never wound up using Krugle because it simply didn't match up to Google's default search. Now, Google has a specific frontend for searching code. What happens now?

I decided to experiment with some of the common searches that I do.

Let’s Compare

Let’s compare what Google Search, Google Code Search, and Krugle all return for the WPF class LinearDoubleKeyFrame.

Google Search returns these results. The first hit is as follows:

LinearDoubleKeyFrame Class (System.Windows.Media.Animation)

Animates from the Double value of the previous key frame to its own Value using linear interpolation.
windowssdk.msdn.microsoft.com/en-us/library/system.windows.media.animation.lineardoublekeyframe.aspx - 24k - Cached - Similar pages

Google Code Search returns these results. The fist hit is as follows:

   331:   DoubleAnimationUsingKeyFrames da = new DoubleAnimationUsingKeyFrames();
          da.KeyFrames.Add(new LinearDoubleKeyFrame(0.0,KeyTime.FromTimeSpan(TimeSpan.Zero)));
          da.KeyFrames.Add(new LinearDoubleKeyFrame(0.0,KeyTime.FromTimeSpan(delay.TimeSpan)));
          da.KeyFrames.Add(new LinearDoubleKeyFrame(1.0, KeyTime.FromTimeSpan(delay.TimeSpan + duration.TimeSpan)));
          da.Duration = delay + duration;

Notice how the Google Code Search is focused on finding me source code and not the API. This tells me that a combination of Google Search and Google Code Search is what I’m looking for.

Now let’s see what Krugle returns.

No standard Code files found for LinearDoubleKeyFrame language:c#.

Suggestions:

  • Make sure all search terms are spelled correctly.
  • Try broader/different search settings for Language, Project and Found In.
  • Check "Related Results" (to the right) for relevant Tech Info results.
  • Try different keywords.
  • Try more general keywords.

Know of a repository we should have found?

Help us improve our search results by sending us your feedback.

Oooh, that’s just NO GOOD. Krugle was very exciting to me, but my gut tells me that it’s very focused on open-source projects. They never seemed to penetrate MSDN, which should be easily indexed and added to their arsenal. So, Krugle is pretty much dead to me since I have a growing confidence that I’ll always get what I need by a simple combination of Google’s default search and their new code search.

Exploring Code Search

Like Google’s regular search, you can do an Advanced Search to fine-tune your results. You have extensive regular expressions support. I could, for instance tell the engine to search for this regular expression: Linear[A-Za-z]*KeyFrame. This correctly returns me results like “LinearDoubleKeyFrame,” “LinearColorKeyFrame,” and “LinearRectKeyFrame.” All of these results are relevant and exactly what I was looking for.

You can also filter on language, much like Krugle, but somewhat difficult/impossible with Google’s old-fashioned search (Did I just call Google search old-fashioned?!). However, VB.NET wasn’t a choice and neither was XAML. They may be added or forever omitted, who knows.

You can also filter your results on the kind of open-source license supported. I don’t personally have a use for this (maybe I should?) but I’m sure tons of open-source developers will find this feature essential. Choices range from the Apache License to the BSD License, to the venerable GPL and GLPL.

Finally, you can limit your search on packages and files. Packages seem to be domain and repository filters. The example they give is kernel.org, but I’m sure you can probably put in sourceforge.net or perhaps even codeplex.com. The filename filter is also pretty awesome and something I feel would be pretty difficult to accomplish precisely with Google Search.

What about Krugle, is it dead?

I personally feel that Google Code Search is going to kill Krugle in the long run. However, I fear that Krugle will suffer a painful extended demise rather than a quick and painless one.

Consider that the Google search engine is extremely basic just like all things Google. Perhaps Krugle can be of value to an audience that finds Google’s simple results lacking.

For instance, Krugle has links to Safari Books Online and their code search results have some pretty cool syntax highlighting. Furthermore, Krugle adorns their basic search feature with multiple result tabs as you dig deeper and deeper in your search journey. They also have UI elements allowing you to save results, add notes, and visualize where the source file lives in the project hierarchy.  That last item is pretty powerful.

That said, I still feel like a quick fix is all I need when I do my searches. I’ll probably use Google Search first and fall back to the source code search when I run out of ideas.

In my head, it’s better to provide a highly specialized yet simple tool that allows your users to combine and mash up multiple tools in in imaginative ways. A huge swiss army knife tool, like Krugle, is probably doomed to get too large, too confusing and ultimately unusable.

 

 

I had previously wrote about the Krugle code searching engine. I never wound up using Krugle because it simply didn't match up to Google's default search. Now, Google has a specific frontend for searching code. What happens now?

TrackBack

TrackBack URL for this entry:
http://www.primordia.com/blog/mt-tb.cgi/651

Comments

Nick,
Thanks for taking the time to try to compare search engines. It's not an easy thing to do. I remember all the Google-Yahoo wars about who had the most of this or that. I think that code search engines ultimately will be judged on the accuracy and relevancy of their results. We think the same indexing and page rank algorithms used to search text, images, video and books come up short when faced with the demands of programmers.

It’s unfortunate, I think, that you chose to compare on a search term where Google provides one C# search result and we provided none. Maybe searching on the sample searches suggested by the different engines – and doing those searches on the sites of the others might be more revealing. Just an idea.

Our engine is really aimed at developers doing more of an exploratory search process. We’ve observed, and are trying to support developers as they first search and review potential answers, then research these answers to better understand the project and review the technical documentation. Our 3 channels (code, tech pages, and projects) were based observing how a large number of developers actually used search.

So, again, we really appreciate the effort you are putting in to try and compare these products and want to help you come up with good analysis and feedback. It helps make us better.

Steve Larsen
Krugle

Thanks for the feedback Steve.

I suppose I should be careful not to generalize when something loses value for me that it doesn't necessarily lose value for everyone. Boy, how self-centered I can be!

Best of luck innovating around the 900lb. gorillas out there.

Post a comment