Birth of a Feature: The improbable story of VI Snippet

The next version of LabVIEW will be coming to a presentation near you very soon.  I thought I would share the back story about one of the new features that you will see called the VI Snippet. 

First, the problem statement.  For many years, we’ve been working on better ways to empower users to share their code with other users – through better Web features on ni.com and better ways of packaging and distributing your VIs.  The popularity of the platform, and the expertise of our user base, can be measured in some ways by the number of VIs available on the Web – it’s a kind of currency for LabVIEW. 

We have a few challenges in enabling users to share code:

  1. LabVIEW is graphical, so you really need to see the block diagram to understand what techniques you want to learn more about
  2. Seeing the diagram ins’t enough – it needs to be easy to get the VI from a Web site into your LV environment so you can experiment with the code.  One advantage text-based languages has is you can simply cut and paste text from any document into your environment to transfer it.  LabVIEW code needs to move that easily. 

With these seemingly insurmountable hurdles in the way, enter the Hogg – that would be Simon Hogg, one of our talented young LabVIEW product managers.   Simon had some ideas on how we can create a better experience for users to share code, but rather than try to convince R&D to build something, he went off and built it prototyped it himself (the beauty of LabVIEW for fast prototyping).   The idea is simple, but when implemented comes across as magical.  In LabVIEW 2009, you create a special screen shot of your VI – called a VI Snippet – which embeds the actual binary information of the VI into the image.  You can then post that image anywhere on a Web page and other users simply drag the image onto a blank block diagram in LabVIEW and voilá! – the actual LabVIEW code is there, ready to explore, edit, or run.   Check out the video below to see it in action:

Once Simon created his prototype, it was quickly dubbed internally as “the Hogg Feature” or “the Hogg” for short.  We’ve even taken it to its verb form – similar to “googling” or “xeroxing” something, when you distribute a VI Snippet, you are “hogging it.” 

Naturally, there was the small step of actually designing, implementing, and testing the feature in R&D to make it work in the product for real – but having a working prototype was a great influencer.  If one of our product managers can prototype the feature, then certainly our R&D guys can develop it. 

So I wanted to share this story to show that even the best-laid plans at NI to smoothly manage the feature set of upcoming LabVIEW versions can be disrupted here when someone combines initiative with the power of LabVIEW programming to make something happen (and because the Hogg is a cool feature).  I look forward to “hogging” some VIs posted by the c0mmunity of LabVIEW users in the near future.

5 Responses to “Birth of a Feature: The improbable story of VI Snippet”

  1. Dan Says:

    That’s exciting stuff! I was wondering what happens to the dependencies? (i.e. where do the subvis end up?)

  2. A great way to share LabVIEW code « An “Engineers” Take Says:

    [...] posted about this upcoming LabVIEW feature on his blog and the brain behind the feature is one of the LabVIEW Product Managers, Simon [...]

  3. Yair Says:

    I agree that this looks like a useful feature. Have all your managers prototyping features.

    I haven’t looked at the release version yet, but I hope the suggestion made during the beta of marking the images so that it’s clear that it’s a snippet which can be used.

    Dan, when you select the option in the Edit menu, LabVIEW opens a file dialog, so you choose where you save the file.

    We’re considering adding this functionality to the Code Capture Tool, which would probably make it more usable, but we haven’t looked at the implementation yet (e.g. is the method even exposed? Is the file dialog part of it or can we specify our own file, which is in important part of making it more usable), so no guarantees.

  4. Soundar Says:

    Hi,
    Its very nice feature and impressive. But how it restricts the ‘Copy Image’ and ‘Copy Code’ when ‘drag and drop’ a VI Snippet (the .png file).

    And is it possible to know whether the .png file has Snippet feature or simply a image?

  5. Andrey Dmitriev Says:

    >And is it possible to know whether the .png file has
    >Snippet feature or simply a image?

    You can check if PNG have VI inside as hidden data:

    http://digital.ni.com/express.nsf/bycode/ex6a7h?opendocument&lang=en

    Andrey.

Leave a Reply