01-08-2017 11:30 AM - edited 01-08-2017 11:35 AM
There is a user (or automatic bot?) that seems to bring old example code in compliance with the new site format.
For example, this example contains now the line at the bottom:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Unfortunately this does not really improve the example itself, which should be either retired or completely rewritten. It is just plain bad, confuses the new user, and plants the wrong ideas.
In summary, instead of cosmetically formatting the old example, they should be scrubbed much more thoroughly and a high bar should be set for quality. Currently the few good examples are drowned in a mud puddle or garbage. 😞
Currently we cannot even add comments to warn the unsuspecting newbie!
In Summary:
I think all old examples should go through some rigorous vetting and should contain a big header that they have not been verified by NI. Only a committee of experts can release them to some approved example area. Some examples (such as this) should just be deleted entirely! Poof!
01-08-2017 12:32 PM
This sounds like more evidence that there needs to be a community "peer review" before that example is published. Perhaps the Champions and/or Knights should have to approve things before it gets published. And with 1200+ examples already published, it would also be helpful to categorize them (DAQ, FIle IO, Queues, TCP/IP, etc.) to make it easier for anybody to find an example that would actually benefit them.
01-09-2017 09:06 AM - edited 01-09-2017 09:07 AM
Thanks for the feedback. The ideas you are talking about are actually what we are attempting to implement. However, I agree that there is probably some room for improvement.
As you are probably aware, with the launch of the refreshed community, we also launched an example submission process which includes gatekeeping by a group individuals who are well versed in coding best practices as well as the Community Example Style Guide.
However, this does not account for the ~5,000 examples that were created before this process and guidelines were put in place. All of these examples live in the Example Programs Draft area until they are reviewed and updated by one of our Example Scrubbers. These scrubbers, who are also trained in coding best practices, are not only responsible for the "cosmetic" updates of making sure the examples meet the new template but are also rearchitecting the code when necessary and in other instances recommending an example be removed all together if it is duplicative or straight up incorrect. Only example programs that are approved, either by the gatekeepers or the scrubbers, should be in the Example Programs area.
With the specific example that you mentioned in this post, it seems that the process may not have been followed as it should have. I will make sure to speak to the example scrubber about this document and to ensure that the correct processes are being followed as they continue thier work.
I also welcome involvement by the Knights/LV Champions in this process. If you think there is interest in these types of activities let me know and we can discuss it in more detail.
Lastly, with regards to the comment from crossrulz about categorizing the example programs. If you look in the Example Program area, you'll notice that the examples are labeled by high-level categories. Currently, this is mainly at the product level, but we are open to suggestions about how to improve these to make examples more browsable/findable, but not overwhelming to the user.
01-09-2017 11:24 AM
Thanks Hassan,
Just looking at the "drafts" vs. plain "example programs", both have been processed by "scrubbers", so it is not clear to me why this one got move out of the drafts. Maybe it should get moved back.
Maybe I did not scroll down far enough, but did you just enable comments or was that also possible yesterday? Maybe similar to wikipedia, there could be an out-of-band discussion area where anyone could discuss shortcomings and glaring errors.
Just randomly picking an example in the "drafts" area, we again see bad rube goldberg code. To append a 1D array to an existing 1D array, all we need is "built array" in concateneate mode, nothing else. The example currently needs to (1) measure the existing lenght of the new segment over and over (which is always the same, else the code would not work right, see below), (2) multiply with the iteration terminal, and (3) use the result to define the insert point of "insert into array" with every single iteration! This is much worse because it requires knowledge that the acquisition is of fixed output size. In the more typical example where we use continuous acquisition, the number of samples can change for each read and this calculation would fail miserably. If using "insert into array" for appending, the insert point needs to be calculated from the size if the existing array, not deduced from the fixed insert size and number of iterations..
Using "built array" does not care about the size of the existing array (here calculated indirectly from the size of the insertee :() and will always work correctly. Highly preferred over "insert into array"!
This example contains two attachments, the (presumably) original and the "verified" code. That seems good. But as I said, there are further improvements that could be applied.
01-10-2017 09:02 PM
I'm not sure what you would can do if you just want to remove an example but I think everyone has the ability to edit example programs if they want to. My understanding is that you have to be a gatekeeper/scrubber to move documents from drafts to examples but that anyone can make edits along the way. If we're doing our job right, everything that gets past drafts will meet the minimum requirements outlined in the style guidelines, but community members can always make additional improvements on whatever gets through.
That's what I was told anyway, I can check tomorrow by making an account with my gmail email to see what you can do with no extra privileges.
01-11-2017 07:12 AM
@Jacobson-ni wrote:
but I think everyone has the ability to edit example programs if they want to. My understanding is that you have to be a gatekeeper/scrubber to move documents from drafts to examples but that anyone can make edits along the way.
Just to be clear here: Anybody can make updates to the DRAFTS, not the actual released documents. Right?
Back to looking for community members to do some scrubbing, I would gladly give a few hours on Saturday and Sunday mornings to go through examples. I actually enjoy it and it would give me something to do before the wife and kid wake up.
01-11-2017 08:21 AM
@crossrulz wrote:
@Jacobson-ni wrote:
but I think everyone has the ability to edit example programs if they want to. My understanding is that you have to be a gatekeeper/scrubber to move documents from drafts to examples but that anyone can make edits along the way.
Just to be clear here: Anybody can make updates to the DRAFTS, not the actual released documents. Right?
I thought it was both but I'm not sure. I created a new account linked to my gmail (newly created, 0 posts) and went in to edit a document in the example programs. I was able to edit and it let me click publish but gave me the following error. There was nothing highlighted so I'm not sure what I was supposed to do. When I logged back in to this account I was able to make the same change and successfully publish so I will have to defer to our community managers on this one.
I thought it was both becauase I remember being concerned about griefing.
01-11-2017 07:01 PM
Isn't the error there that you were required to add a label?
01-12-2017 08:16 AM
That's what it says but I couldn't figure out where to do that
I didn't do anything different on this account (or at least not that I was aware of) and it let me publish the update as well.
01-12-2017 08:51 AM
In the Example Programs area, it is required to use pre-defined labels. However, only Example Gatekeepers can use labels. This is why you did not see the labels field when using your second account.
The document you were editing should have already had labels applied to it by a Gatekeeper. If not, someone will need to fix that.
In the Example Programs Drafts area, it is also required to use pre-defined labels and these can be applied by anyone.