08-15-2023 04:07 PM
Steen,
As I said before, I'm open to reconsider the way I'm doing cleanups in LabVIEW. I'm not saying I will always wire error output of all close function but at least I will try to triple-consider if I'm missing a case.
But I will not change my way of doing TestStand cleanups, because they work really fine for me in my context (terminate, etc...). I agree with Sam about adding extra variables and preconditions : it sounds to me like over-engineering.
You can disagree, it's ok.
Maybe we can respectfully agree to disagree and stop the conversation here ?
Because I don't like the way it's going on.
I don't like your harsh tone either, sorry about that.
Anyway, it gives me a good reminder of why I'm not active on the NI forums.
08-15-2023 04:22 PM
@smi38 wrote:
I'm not saying I will always wire error output of all close function.
Nobody suggested you should. You didn’t catch my intent.
Anyway, it gives me a good reminder of why I'm not active on the NI forums.
Yeah, me too. On the internet at all. Sometimes I wonder if people have lost the skill to read, with all the misunderstandings coming out of this.
We’re probably so used to preprocessed headlines that are designed to tell us what to feel, that it has become seemingly unnecessary to read all the words, from multiple posts in a fragmented thread. It’s sufficient to read a glimpse of the last couple of posts and form our own opinion of the other 90% we didn’t read, including a full characterization of the person who wrote it.
Death of complex and meaningful discussion.
Please keep on ignoring errors from your system cleanup code.
08-15-2023 04:36 PM
@smi38 wrote:
@crossrulz a écrit :
@LLindenbauer wrote:
@SteenSchmidt wrote:
... 'TCP Close Connection' can output ca 15 different error codes, ...I've been wondering about that - is there a way to look up the possible errors a given function might emit? That would be quite the help in figuring out how to handle them.
You can dig through the error codes and see what would make sense for a function. Otherwise, see this idea: List every error code a function can give out!
Thanks for the link.
I took a look at it, in the comments it's explained that it's impossible to document the error codes outing of a function.
I don't find such an explanation in the link. Having worked with multiple APIs provided by hardware manufacturers, I found the level that the error output is documented to be generally correlated with how robust and pleasing to work with the API itself is.
On the matter of documenting, consider, for example, the Windows socket close function: https://learn.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-closesocket#return-value.
Consider also the fine-grained exception hierarchy present in python, where handling errors in a granular manner is considered an integral part of flow control.
08-15-2023 04:40 PM
@LLindenbauer wrote:
@smi38 wrote:
@crossrulz a écrit :
@LLindenbauer wrote:
@SteenSchmidt wrote:
... 'TCP Close Connection' can output ca 15 different error codes, ...I've been wondering about that - is there a way to look up the possible errors a given function might emit? That would be quite the help in figuring out how to handle them.
You can dig through the error codes and see what would make sense for a function. Otherwise, see this idea: List every error code a function can give out!
Thanks for the link.
I took a look at it, in the comments it's explained that it's impossible to document the error codes outing of a function.
I don't find such an explanation in the link. Having worked with multiple APIs provided by hardware manufacturers, I found the level that the error output is documented to be generally correlated with how robust and pleasing to work with the API itself is.
On the matter of documenting, consider, for example, the Windows socket close function: https://learn.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-closesocket#return-value.
Consider also the fine-grained exception hierarchy present in python, where handling errors in a granular manner is considered an integral part of flow control.
It's in the comments below the idea. AQ said "
My Google skills have failed me. Can anyone find the post I wrote sometime last year about why this is impossible to do and link it here? I'm pretty sure I wrote up why this is problematic for API documentation in any programming language in epic detail either on ni.com or lavag.org, but I cannot find it and I don't want to type it again.
I know... it sounds like a cop out to say this is impossible to do, but it's true -- even Microsoft, with its batallion of tech writers, abandoned trying to document this for APIs. I wish I had the post that explained why."
08-17-2023 12:10 PM
This is my challenge,
Enrique
08-17-2023 12:58 PM - edited 08-17-2023 01:13 PM
@Enrique.Noe wrote:
This is my challenge,
Enrique
I love that your notes implied code requirements that were not stated by the original poster! Those code requirements MATTER to exactly how the code is written!
Better, get them nailed down before you waste time writing code. Note: I have previously stated that I will not submit code for several reasons including the lack of use cases..
Now, as to your choice of where to branch the Error wire.
How do you expect to get a unique Error out of the Configuration file Read.vi String polymorphic instance? The file itself text. The reference is to a queue based object that stores STRINGS.
08-17-2023 01:32 PM
The requirements I assumed by logic, what's the point of sending something to a queue or an event if what you are supposed to send doesn't exist, so if there is nothing to send but you had no error, the for loop would not do any iteration, I could have made a shift register for the error but I decided to explicitly put the wire in the order I consider important, I believe the code is a way to communicate ideas.
08-17-2023 03:05 PM
@JÞB wrote:
Better, get them nailed down before you waste time writing code. Note: I have previously stated that I will not submit code for several reasons including the lack of use cases..
I threw together my best effort, and spitballing like that is kind of fun.
In reality, this challenge feels like "Here are 5 words, make them into a sentence" without specifying: What is the point of the sentence? What is the intent? What are you trying to convey? Who is your audience?
How do you judge what is correct? Correctness is situationally dependent... I would argue so is style...
Reminds me of this:
https://www.youtube.com/watch?v=aFwVf5a3pZM
08-17-2023 03:54 PM
In reality, this challenge feels like "Here are 5 words, make them into a sentence"
Yea, incredible how 5 vis can be wired so diferently depending on the person in charge, it is really fun, there is not right or wrong if you don't have the full context, I remember one time I was doing the 'right thing' and that caused a huge issue on the production code, i deleted something I considered trash code, in the context of the vi, it was trash, for the full application it was fundamental, this reminds me the followinghis is
08-18-2023 12:12 AM