Jump to content

Funny Comments in NI VI code


Recommended Posts

I found this commment in the following NI VI - LabVIEW 8.0\vi.lib\_oldvers\_oldvers.llb\compatReadText.vi:

"this may need work, see note below" :o

post-549-1158951681.jpg?width=400

Makes you wonder.

Has anyone found other interesting comments left accidentally in NI's or your own code?

Link to post
Share on other sites

Uh, umm, he he ... I've made similar comments myself. :rolleyes:

Don't be too critical ... some of us are STILL cleaning up code written by FORMER employees who knew just enough LV to be dangerous. A sense of humor goes a long way in these situations. :blink:

Link to post
Share on other sites
Uh, umm, he he ... I've made similar comments myself. :rolleyes:

Don't be too critical ... some of us are STILL cleaning up code written by FORMER employees who knew just enough LV to be dangerous. A sense of humor goes a long way in these situations. :blink:

Now there's a signature... "I know enough LabVIEW to be dangerous." Maybe Michael could use that for the new LAVA users. Instead of "2 more posts to go" it could be "Enough LAVA to be dangerous." :P

Link to post
Share on other sites

That comment is not as bad as the ones ppl found in windows source code :

http://www.kuro5hin.org/story/2004/2/15/71552/7795

* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* !!!!!!!IF YOU CHANGE TABS TO SPACES, YOU WILL BE KILLED!!!!!!!

* !!!!!!!!!!!!!!DOING SO F*&^s THE BUILD PROCESS!!!!!!!!!!!!!!!!

* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Link to post
Share on other sites

I've seen much worse, in government LabVIEW code, but I can't repeat it here ...

On the NI comments, I'm actually surprised that we haven't seen more of this over the years. Lots of people I know put in temporary comments, and on a large project and deadlines they often do not get cleaned up.

My current client (Lockheed) uses color coding on temporary comments, so I have been thinking of making a scripting tool to go searching through a VI hierarchy for all text comments of a certain color(s).

Link to post
Share on other sites
I saw a strange help file some weeks ago. Actually several of these variant VIs have this help file text even though they are completely different.

post-4885-1159380162.png?width=400

Which presumably means that they were all copied from an existing VI and someone forgot to change their documentation (what, no checklist at NI?).

Link to post
Share on other sites
Which presumably means that they were all copied from an existing VI and someone forgot to change their documentation (what, no checklist at NI?).

If it isn't in the palettes, it doesn't always get checked. Only real zealots go digging into all the subVIs in vi.lib. Not that I'm referring to anyone on this forum or anything. :P

Link to post
Share on other sites
  • 2 weeks later...
We're not zealots, we're spelunkers and archeologists ...

:P

OK Just found a new tool - Google Code Search. I did a search on labview and found this in Perl code:

"

$self->tone(@$_) if ($_->[0] > 0);

usleep($_->[1]*15000);

}

# Now how many square meters of LabView code

# would you need to do this?

}

"

http://www.google.com/codesearch?q=+labvie...ent/SR780.pm#a0

Sometimes I feel like that.

Link to post
Share on other sites
OK Just found a new tool - Google Code Search. I did a search on labview and found this in Perl code:

"

$self->tone(@$_) if ($_->[0] > 0);

usleep($_->[1]*15000);

}

# Now how many square meters of LabView code

# would you need to do this?

}

"

http://www.google.com/codesearch?q=+labvie...ent/SR780.pm#a0

Sometimes I feel like that.

Could someone translate this in english? :blink:

Link to post
Share on other sites
Perl really looks like an explosion in an ASCII factory... (slashdot quote)

ROFL

yea, thats true - but I really like Perl and use it often.

Last example?

3 days ago I got a Phishig email and - WHOW - the website was still active.

So I wrote a Perl Script which is until now filling the Phisher's database with randomly generated PINs and TANs ;) - I'd really like to see the face of "da BoYz"*, if they realize, their "really successfull draft of phish" is not more than random numbers in the correct format ... :D

conculusion: Perl is fun :)

*BTW: in the Perl Cookbook there is an example, which manipulates a text string in a WaY tHaT eAcH 2nD ChArAcTeR is set to uppercase. This is extremely helpfull, if you have to communicate with "WaReZ DuDeZ" ;)

Link to post
Share on other sites

sub play_song {	my $self=shift;	for (([4,20],[5,20],[6,20],[7,20],[8,40],[ 8,40],		  [9,20],[9,20],[9,20],[9,20],[8,40],[-1,20],		  [9,20],[9,20],[9,20],[9,20],[8,40],[-1,20],		  [7,20],[7,20],[7,20],[7,20],[6,40],[ 6,40],		  [5,20],[5,20],[5,20],[5,20],[4,40])) {		$self->tone(@$_) if ($_->[0] > 0);		usleep($_->[1]*15000);	}	# Now how many square meters of LabView code	# would you need to do this?}

I see nothing in that code that would be complicated to implement in LabVIEW...

It says "for each of these sets of 2 values, pass the set to the tone function if the first element in the set is greater than 0, then sleep for a bit". Or, put more simply, each bracketed pair of numbers is a tone and a duration. It plays each tone for the given duration, and -1 means silence.

You would implement it in LabVIEW using an array of clusters, a for loop with auto-indexing, and a case structure. Pretty simple.

That guy must know just enough LabVIEW to be dangerous. :)

Link to post
Share on other sites
  • 3 weeks later...

On a related note. I get this error description in the lvfailurelog whenever I get a BadLinkerObjs error in LV 8.20 (which happens more often than I would wish).

.\editor\BadLinkerObjs.cpp(195) : DWarn: [LinkIdentity "Laser.lvclass:Laser Selection.ctl" [ My Computer] is NOT a bad subObj! Why are we propagating the myth that it is bad?

$Id: //labview/branches/Europa/dev/source/editor/BadLinkerObjs.cpp#49 $

Link to post
Share on other sites
  • 2 weeks later...
It might be an image bitmap. Anybody care to convert those ASCII values to an 8-bit picture control and see what colors we get?

:laugh: I don't think you'll see much - it'll be recognisable, but the ASCII equivalents are way up there in the basic page (all between F0 and FF if I'm not mistaken?)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.