01-02-2014 09:31 AM
@ouadji wrote:
@PaulG: If shift registers were added to the SSS ...
an interesting idea ...this could restore my faith in the sss 😉
This has been suggested before and explicitly rejected. Apparently LV R&D really don't like stacked sequence structures and they don't want to make any modifications to them, regardless of what others think.
01-02-2014 11:13 AM - edited 01-02-2014 11:14 AM
tst :Apparently LV R&D really don't like stacked sequence structures and ...
smart people in the LV R&D team. 😉
01-02-2014 12:11 PM - edited 01-02-2014 12:12 PM
Putting SRs on a SSS is like putting a onesie that says "Shake me" on a baby. It just begs people to abuse them. Sequence Locals are terrible only because you need to know so many different things about how to care and feed for them and they make your SSR cost you a lot of sleep. But, like babies, SSS's are necessary.
01-02-2014 01:33 PM - edited 01-02-2014 01:33 PM
Jeff : Sequence Locals are terrible only because you need to know so many different things about how to care and feed for them ...
ok Jeff !
in this case, what would be really interesting ... would be a tutorial on the good practices for using Sequence Locals.
01-02-2014 02:20 PM
good practice for using sequence locals: DON'T USE THEM!!!
If you are passing around sequence locals, you are a lot better off using the Flat Sequence Structure and therefore tunnels.
01-02-2014 02:23 PM
> what would be really interesting ... would be a tutorial on the good practices for using Sequence Locals.
Jeff said SSS are necessary, nothing about SL being necessary. 😉
Anyway... Here is probably the best tutorial on how to deal with sequence locals. 😄
01-02-2014 03:04 PM - edited 01-02-2014 03:07 PM
OK you'll sucker me back in.
First, I have not used a SSS in real code in the last decade. (I think there might be an example on Breakpoint where I satarized the SSS with intentionally overlapping SL's all on one side) Why? I write code for automated functional tests. These applications seldom need to be as highly optomized as possible and a QMH works more than well enough (the readability is a nice asset too when you integrate with the hardware) However, there are application areas where code optimization is of much greater concern. {No, No, No you'll not catch me spouting theoretical examples of such uses on a discussion Altenbach is engaged in unless you want me to point out annual coding challenges} The fact that such challenges exist is enough proof to me that tossing out the SSS is not a good idea.
SL's I did not say they were bad. some frame to frame data transfer mechanisim, local only to the structure, that does not use the UI thread, is needed. The SL provides one without slowing the structure needlessly. I submit replacing them with SRs would although, who can tell what the optomizer could do at the cost of longer compile times and tons of R&D effort for a use case that is rare. Replacing the SL with a Seq SR also would encourage the mis-use of SSS's where less obfuscated constructs are prefered (a VERY HIGH percentage use case for LabVIEW code)
SL's DO obfuscate code but, do not overtax the performance of the SSS.
All this becomes moot as soon as the first 3D holographic version of LabVIEW becomes available anyway- I hope to encourage the wide spread adoption of better programming practice before then! (What would you call spaghetti code you could walk through?)
Perhaps we should move this thread to a discussion forum.
01-02-2014 03:25 PM
A prime example is a stacked sequence with 18 frames (!!), 18 sequence local (!!), and 48 local variables(!!) (discussed here. Yes, somebody actually wrote this to solve a 3x3 system of linear equations!):
I don't even want to see the code for the 10x10 solution. ;D It can be rewritten with simple flat code as follows:
There are always better alternatives!
01-02-2014 03:38 PM
If we remove Stacked Sequence Structures from the palettes, how will we recognize the bad programmers on our teams at 20 paces? We'll actually have to get close to their code (and risk infection) if they don't have the SSS to use as a biohazard marker.
Just kidding.
I happen to like the SSS in some very select situations. If nothing else, it is a lot easier to work with when scripting than the FSS. I could support a compromise position where the SSS is not in the palette initially but appears in your palette after, say, 1000 hours of total development time. "Now that you know how to use LabVIEW, here's something you'll almost never use." 😉
01-02-2014 03:46 PM
The stacked sequence could be removed from the palette but still indirectly available after placing a flat sequence, followed by "right-click ... replace with stacked sequence".
The flat sequence structure left in the palette could simply be named "sequence structure" (no "flat"), with a right-clock menu: change to stacked/change to flat.