What if I don't feel comfortable sharing my source code? Like if there is private info.
-
10Remove the private info. Or write another version that is safe and only has the relevant parts for where you’re stuck.– Dan BronCommented May 21, 2020 at 22:19
-
2Replace the private info with generic data– Nick is tiredCommented May 21, 2020 at 22:19
-
3Replace the private info with dummy data or come up with a different example that has the same problem. If neither of those are possible, you may be out of luck - people can't answer your question if you can't provide sufficient details.– John MontgomeryCommented May 21, 2020 at 22:22
-
1If there's bits of private data in it, redact it and replace it with fake data or clear it entirely (in the case of strings, you can also leave blank strings). If you consider your entire source code private, you'll need to find somewhere else to ask– Zoe - Save the data dump ModCommented May 21, 2020 at 22:29
-
19You should be cutting your code down to a stackoverflow.com/help/minimal-reproducible-example anyway; we can't help you with code we can't see.– jonrsharpeCommented May 21, 2020 at 22:29
-
1For big text exists lore ipsum and the rest you must edit it. it doesn't matter if John doe or harry potter stands for name or even test1 test2 test3, numbers usually doesn't ,atter ithere is only one number or 10....– nbkCommented May 21, 2020 at 22:38
-
4don't use a public website ...– Temani AfifCommented May 21, 2020 at 22:41
-
4@TemaniAfif: That is an oversimplification. You can use a public website as long as private information isn't published on it.– MakotoCommented May 21, 2020 at 22:48
-
What are you able to propose towards answering this?– philipxyCommented May 22, 2020 at 0:00
2 Answers
If you can't share your code, chances are very high that we can't really help you out.
It's fine to have code that's sensitive; you should ask for explicit permission to ask a question related to it. If you can, redact the sensitive parts of your code such that your team is comfortable with it being shared, or attempt to replicate the actual problem you're having in a vanilla, clean-room fashion.
From my perspective, you not wanting to share code is like calling emergency dispatch without being specific as to what's going on or what address you're calling from.
The actual problem that you're asking about is almost always logically orthogonal to any private data that you may have, and so it is simply a matter of extracting one from the other, allowing you to expose the problem in a general but understandable and possibly reproducible way. If you are not able to do this, then likely we can't help you.