-6

I am currently struggling with a piece of code at work, but legally I am not allowed to post the code online.

This is a very specific problem, and I am sure it's not possible to create a minimal code out of it.

In cases like this, how am I supposed to proceed? Is it possible to ask a question about code when I cannot post that code here publicly?

2
  • 6
    Honestly? I don't think you can proceed. We need a MCVE in order to help, even if that is pseudo code.
    – Bugs
    Commented Aug 11, 2017 at 7:22
  • 20
    "I am sure it's not possible to create a minimal code out of it." I can't imagine how that would not be possible. Refactor the code, change the variable names, make it do something completely different but semantically equivalent.
    – Cody Gray Mod
    Commented Aug 11, 2017 at 7:29

2 Answers 2

6

I encounter this same situation with my work all the time. If you are having debugging problems, there is no way you can get an adequate answer with pseudo code. What you need to do is narrow down to where you think the specific bug is and then post only that portion of the code.

For the content issue, take out anything specific that we really don't need anyway. For example, replace text with a placeholder like the "lorem ipsum" block. Change data values from names and social security numbers to dummy names and numbers.

As long as it is not a problem with a proprietary algorithm (which we would probably not be able to help with anyway) then posting the relevant aspects of the code while removing any company specifics will not run you into legal trouble. A good rule of thumb I use before I post is to ask if I have generalized the content enough that it could apply to several other industries. If so, it won't hurt my organization to share.

Look up How to create a Minimal, Complete, and Verifiable example for more information.

0
3

You need to create a pseudo code out of it, without MVCE it will be closed.

Otherwise, if you're really stuck and can't post any kind of code, you can try your luck in a chat with a tag that match the technologies you use and try to see if someone with experience can make a blind guess at what is going on.

Otherwise you may ask your team leader/manager about how to handle this.

Not the answer you're looking for? Browse other questions tagged .