Is this a Best practice?

So I have done over may queries in this forum and many helpful minds make my problems getting solved and suggestions are made.
In order to make every Leaders and members of the forum understand my problem completely, I include the whole java script code of my project in every Topic I create.
Is that vulnerable?
Is there any ways to protect my code from being copied or misused while I include them in my topic?
Could we make them protected, so only the Adobe members could read it?
I blindly trusted this forum for being curious on exploring and getting cleared of problems :sweat_smile: .

3 Likes

Hi @san,

It is, to some extent, absolutely valuable to include code in your questions (it is, after all, the only real “source of truth”). For larger projects (or to “hide” your code or project), it is common to build a MWE (“Minimum Working Example”) that includes the issue of the code where you explain what you expect the code to do, what it does and ask why that is.

A slightly strong-worded, yet in my opinion great resource about how to ask such questions in general would be this video by LiveOverflow.

When you are experienced enough to be able to debug all of your code and find something that you don’t understand which you can pin-point to a single line of code, it might not be necessary to include code (I expected this part of the API to do this, but it did that. Why?), but that really requires a bit of experience with programming in JS and plugins in particular. No offense, but I don’t believe you’re at that stage, quite yet :slightly_smiling_face:.

All in all, my answers to your individual questions would therefore be:

Usually, no. Unless you include some security-critical code (license checking or similar things), this shouldn’t produce vulnerabilities (or if it does, it is actually good since someone is able to tell you. Otherwise, you’d get vulnerabilities without even knowing about it :slightly_smiling_face:)

Not technically. Copyright, by itself, prohibits people from simply using code that’s not their own unless that permission is explicitly granted. This, however, doesn’t mean that one couldn’t use three lines of code from the forums that do a more or less standard thing. All in all, you shouldn’t really share code that should remain secret in forums. Without sharing code, however, it’s probably impossible to properly help you, meaning you might be stuck with the same problem for the next few days/weeks, so it’s a matter of deciding what’s better :wink:.

No, and there shouldn’t be. This is a community forum, after all. When your question gets answered, it’s not just for you, it’s for everyone who might encounter the same question, which is why more time getting spent on answering can get justified. Therefore, that would be far from ideal.

7 Likes

Got that ! :slight_smile:

1 Like