DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Search It Sando Style - C#, C, and C++ Code Search Plugin for VS 2010

David Shepherd user avatar by
David Shepherd
·
Oct. 18, 12 · Interview
Like (0)
Save
Tweet
Share
2.28K Views

Join the DZone community and get the full member experience.

Join For Free

picture

if you're going to search, please do it with style.

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

picture

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).


picture

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).


picture

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.

picture

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.


picture

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.


picture

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.


picture

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

csharp Virtual screening code style

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Best Practices for Writing Clean and Maintainable Code
  • Core Machine Learning Metrics
  • DevOps Roadmap for 2022
  • How To Avoid “Schema Drift”

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: