LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
swatts

Global Variables

Status: New

Make the global variable icon double in size on the block diagram every time it is referenced by a VI in the project.

 

Global OK.PNG

 

So this is OK!

 

Global Bad.PNG

 

This is not so good. Although this suggestion is semi-facetious it is an immediate indicator of poor coupling

Lots of Love

Steve Watts

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

13 Comments
SamoraJ
Member
This is brilliant, If I were a NI dev I'd do it on my spare time
SamoraJ
Member
... And that's not just because I witnessed the inception
swatts
Active Participant

I might modify this slightly, it should increase every time you write to it, reading is fine

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Brandyn
Member

This is awesome!

Certified LabVIEW Architect
Certified Professional Instructor
Wart
Member

I love this idea, except all the code I've ever inherented will become instantly unreadable, though much prettier with all the large colors. Smiley LOL

NickNZ
Member

I checked the post date to see if was the 1st of April....

Intaris
Proven Zealot

Nope, not 1st of April.

 

Can't explain the fact that this has been kudo's otherwise.....

 

Smiley Frustrated

sridar.m
Member

..or it would be even better if we can vary its size like string constant. Nice idea that has been brought forward.

SteenSchmidt
Trusted Enthusiast

LOL Steve Smiley Very Happy

 

Ok, I think it might be going a bit overboard. On a serious note though no matter how such a condition should be indicated, it can't take into consideration dynamic loaded code nor in certain cases reentrancy. Both cases are problematic at runtime while being more or less impossible to detect at edit time.

 

Cheers,

Steen

CLA, CTA, CLED & LabVIEW Champion
swatts
Active Participant

Eeek!

I think you may have invented a race condition machine.

If you dynamically load a VI that accesses Global memory you need a smack, and then to sit on the naughty step and think about what you have done!. You can only come off that step when you apologise to us all.

 

What you have described fills me with so much horror, Steen you have a truely subversive mind.....

 

So new rule if the compiler detects a global write in a reentrant vi the icon should Quadruple in size, if the runtime engine detects a global write in a dynamic vi it should send an email to a team of NI code enforcers and they come round to your office and taunt you mercilessly, like a team of anti-cheerleaders.

 

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile