Basically i'm worried about theft. I'm not implying that anyone on stack exchange is a thief but about a year ago I posted on another site and a month later I found my code as a download in another guys name.

So how do you go about posting enough of the code so people can understand what you are doing and help you but without the fear of it being stolen.

I know a lot of code has been written a hundred times over already but I do a lot of games development and the ideas not just the implementation is in the code.

  • 17
    You can't call me a thief if I use code you post here. Please read stackexchange.com/legal. "You agree that all Subscriber Content that You contribute to the Network will be licensed under the Creative Commons Attribution Share Alike license.". So, when you post your code, you give it. – Ishtar Apr 12 '11 at 12:23
  • oh ok, I did not know that. does that mean I am waving my rights to intellectuality property by posting it here? – Skeith Apr 12 '11 at 12:36
  • 4
    @Skeith: you retain ownership, but are releasing the relevant snippet under the CC-BY-SA license. So you are giving it away, but under certain conditions. (I.e., don't post anything you don't own; that would be illegal.) – Fred Foo Apr 12 '11 at 13:32
  • 7
    If the other guy did not attribute the snippet of code to you, they are in violation of the CC Attribution Share Alike license. You are making it free to use by others, and others are free to re-share themselves--provided proper attribution is given. – Berin Loritsch Apr 12 '11 at 15:55
  • 2
    As @larsmans already pointed out you are not supposed to dump in your entire code. Only the relevant part of it for solving the issue. Just as abstract and less as possible. – Octavian A. Damiean Apr 12 '11 at 18:33
  • 1
    I'd like to see some of this scary important code that can fit in the length of a question/answer. – user1228 Apr 12 '11 at 19:43

You strip out all irrelevant parts until you get a minimal program that reproduces the error. Then you change the domain-specific variable/procedure names to foo, bar, baz, quux.

(I write almost exclusively open source software, but I still recommend the practice for very domain-specific logic; it helps to pinpoint the error without bothering the answer posters with stuff they don't need to understand.)

  • True but my code is 50,000 line plus and at least 30,000 of that is necessary to compile it. I like to make as much of the engine my self so I understand what is going on. – Skeith Apr 12 '11 at 12:13
  • 1
    @Skeith: if you were debugging, you wouldn't manually recheck all 50.000 lines every time, would you? – Fred Foo Apr 12 '11 at 13:31
  • @larsmans no id check the recent code or where the error was pointing but you said a program the recreated the error. I think I have mis understood you. – Skeith Apr 12 '11 at 13:36
  • 1
    @Skeith: by program, I don't mean a complete application, but preferably something that compiles and runs (with a custom main, for example). – Fred Foo Apr 12 '11 at 13:39
  • 3
    People should be doing this in the first place. – user1228 Apr 12 '11 at 19:43

It's a bitch, but I'm cold hearted and without sympathy. We've heard it since Day Zero: if you don't want it stolen, then don't post it. That is, find another way to show and share your skills and ideas; but lock up the silver beforehand.

OTOH, everybody knows and deeply, profoundly appreciates that the programming community could not possibly exist as it is without your own personal generosity. Thank you!

You must log in to answer this question.

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