About creating clusters for the sake of cleaning up. About confusing clusters with a decent data structure.
It’s some weird sort of intermediate level programmer error, or something done when your code is ugly and you don’t want those wires and everything and you are tired and this is just messy..
Clusters are easily created.
Clusters are easily passed through loops, they don’t up much space in the higher levels of subvis, and if a very low-level logic part has some ugly cluster separation in it, nobody sees.
Clusters hide that you haven’t put much thought in your data structures.
Use them. For god’s sake, they make your block diagrams readable. If you really want to use one “data item” per state (queued state machine!), do so – but put some thoughts in them. Use variants.
(Well, you probably need to learn the lesson of having to change one item in an element and not having used a typedef in a program with hundreds of subvis only once.)
Group items logically
If you pass a position, cluster x and y. If you pass image processing data, group parameters..
Torvalds once said:
I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
I’m not somebody who likes to quote without context (which is here), but if you’ve figured out your data, you’re pretty far ahead in the game.
Oh, and if you still want to get one huge cluster and think that’s good programming style (it can be) – look into OOP. LabVIEW does support object oriented programming, and it’s not even bad. (Said by someone who refused to even look at it until someone showed off a very nice library.)
And if you have performance issues, we should have another talk 😉
Next part: Stuff I don’t understand..