Musings of a Tech Transfer Enthusiast
When fixing bugs most software developers start with a search. I know. I've watched them. They read the bug report, reproduce the problem (sometimes), and then search for relevant code. This is when it gets ugly. Developers either wander semi-randomly around the Solution Explorer (Roomba Style), struggle to use Find in Files with increasing levels of anger (William Foster Style), or I've even seen one user step through almost the entire program in the debugger (Slowskys Style). Please, for goodness' sake, next time you search try Sando Style. Our newly released version of Sando (0.3), is a free, open source extension for VS2010 that makes searching your C#, C, and C++ code as easy as using Google.
VS Gallery Download: http://bit.ly/SandoDownload
Getting Started With Sando
After installing Sando the main view will appear in your Visual Studio Studio, as shown to the left. The UI consists of the main input box (upper left), the search button (upper right), the results view (bottom center) and the normally folded advanced options (middle center). To use Sando simply open a solution, type in a search term, and press search (or hit return).
Once you search, you'll see results like those shown to the left. Notice how the method OpenFile is shown first, because it matches both search terms, whereas the lower ranked terms only match one of the two terms. Each result is shown with a representative icon that communicates both the element type (e.g., method, class, or plaintext) and the accessibility level if relevant (e.g., public or private).
See a result you like but not ready to commit to opening it? No problem, after the search is executed just press the down arrow to scroll through results, expanding each result to view a partial snippet when it is selected. In the picture to the left OpenFile has been selected and you can view the first few lines of this method. To open the method in the VS editor simply hit return or double click on the result.
Getting Fancy with Sando
So far we've discussed the very basics of how to use Sando. However, the entire Sando team dog-foods Sando (i.e., we use it everyday ourselves) and so it's got a few advanced features baked in, which I'll discuss here.
Halfway through your task and decide you need to search again? No need to pickup that mouse, Sando is designed to allow you to work mouse-free. Hit Alt+Shift+S and the Sando view will appear with the cursor in the text box, ready to search. Using this shortcut I find Sando to be a great way to open any file or method I'm thinking of, and thus I almost never open the Solution Explorer.
One of the things we noticed when using Sando is that sometimes you just don't want to see certain results. For instance, we have huge text files of words in our test directories, which are indexed by Sando, but sometimes we don't want to see these results. In the advanced section of Sando you can deselect any program type, such as a method or a comment, or any other type, such as a text line. Doing so means that deselected types won't appear in your results. This provides a quick way to eliminate unwanted items from your current search.
You may have noticed that Sando often changes the text just under its main input box. This is the status line and it is used to give you feedback on your query. If your query has hits it will tell you how many, and if it doesn't Sando may give you tips on how to improve your query. You may also notice the message that "Sando is still performing its initial index...". This occurs when you open a new project that Sando has not analyzed before. This only happens once and, when analyzing Sando itself, takes only ~1 minute to complete on a 1.7GHz machine with no SSD. For a machine with SSD I've seen this index happen almost instantly for sizable projects. Note that this indexing is necessary for Sando to be able to return search results virtually instantly on even *very* large Solutions.
Finally, while we've done our best to choose good defaults for most users, you may want to customize a few things. To do this, visit the Sando options page (Tools > Options) where you can configure the directory where Sando stores its index as well as the maximum number of results returned, which is by default set to 20. I recommend resetting this to 50, but I'm crazy about search so I didn't force this default on the masses...
Search With Style
Hopefully this post gives you a good idea of the functionality that Sando provides. My team and I have spent many a late night improving Sando based on early adopters' feedback and we truly think this release represents a big step forward in usability and robustness. If you have been using Sando now's the time to start recommending it to your friends. If you have been considering using Sando, you should now enjoy a much improved experience. Next time you search, I hope it's Sando Style!
VS Gallery Download: http://bit.ly/SandoDownload
Video Introduction (dated): http://bit.ly/SandoVideo
David Shepherd leverages software engineering research to create useful additions to the IDE.