LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Am I commenting wrong?

Solved!
Go to solution

No problem I apperciate your desire to dig down to the bottom of how this LabVIEW thing works. Happy commenting.


"Should be" isn't "Is" -Jay
0 Kudos
Message 21 of 22
(320 Views)

If I'm going to write a novel about different things I tried and didn't work well, or a series of decisions/test results that lead me to implement something a specific way I sometimes use a cluster named "Notes" with just a string constant in it.  Then I can shrink the cluster down to just the terminal.  Sometimes I reference this cluster with my free label comments.

 

This isn't appropriate for comments that may be needed on a more regular basis because it hides them from yourself and other developers.  Also be I always make sure to be careful about putting things in that really belong in a detailed requirements document - it'd be better to formalize the documentation if it is appropriate.

 

For example, sometimes constants are derived from a lot of testing - It might be handy to copy a table of constant values and test results along with a brief description of the test and why the chosen constant was best into the code so that it is available for a handy reference if you ever need it.  Clearly this type of work should have something more formal that the code also references, but I like to leave enough information behind so that I can quickly understand what's going on, even if quickly means covering my code with a blown-up cluster (ctrl+z is my friend!).  I don't think I've ever done anything like my example, but there are lots of places I've got a series of notes about where I tried different implementations and provide a lot of data about why I didn't end up using it (too slow, erratic, too fast, etc).

 

That said, almost all my comments are free labels that either explain something or reference a specific item in a requirements or implementation document.

Message 22 of 22
(313 Views)