Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Structural

code: when is it really yours?

This topic is 5381 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The question is simple: when can you say that a piece of code is really your work? When can you put something on your website and say it's yours, and go to sleep with a clean conscience? I'm working on somesort of networking module that wraps the winsock functionality, but the winsock TCP code comes from a tutorial from gamedev. This tutorial had everything in one big main() function, but I split it into several functions to make it fit in the module. I added a few classes to make it look as one piece, and that's it. I even left large pieces of comment from the tutorial in the code because it was clear. Can I now say this is my code, with a reference to the gamedev tut for an explanation of the basic winsock functionality? Or is this evil copy-paste work and I shouldn't distribute it under my name? [edited by - Structural on September 23, 2003 11:55:26 AM]

Share this post


Link to post
Share on other sites
Advertisement
In my opinion, if you based your code on someone else''s code, then you should allways reference the original.

i guess that I consider something my code either when i coded it myself from scratch, or when i extensively altered someone else''s code.

"extensively" is left up to everybody''s personal definition...

[Hugo Ferreira][Positronic Dreams]
All your code are belong to us!

Share this post


Link to post
Share on other sites
I would say that if you give credit to the GameDev tutorial that its based off then you can say that you have created the wrapper.. I don''t think you can totally say that its all original work but then really if its basic winsock code then how different can it be from anyone elses even if you wrote it from your head..

I would say that its pretty safe to say that its your code, and if you state that the orginial workings are based on the GameDev Tutorial then you should have done enough

It doesn''t sound like your planning on charging anyone for the code, so why not?

Please visit Turt99 Productions

Share this post


Link to post
Share on other sites
well I don''t know about conscience, but I often study the DX tutorals for my projects, with bits & pieces of the DX apps in my project but I can sleep just fine

Who knows where the line is, but ultimately if you can put all the bits together into a nice package (a game??), then Im quite sure you can call it yours.

I figure that your conscience SHOULD be clear if you understand the code, and are capable of reproducing all of it without referring to tutorials. Granted though, after a few months of not looking at something specific you may need references..

just my 2 cents.


www.cppnow.com

Share this post


Link to post
Share on other sites
I code is not yours untill you can sit down and write the code yourself without look at the tutorial as a referance; untill then you should give a referance to the code and be honest about what you did. Give a link to the other artical and say that you reformated the code to make it more useable.

My first game&& My Resume&& My Homepage

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The code is yours if you can legally claim copyright to it.

Share this post


Link to post
Share on other sites
Hmm AP seems correct based on the fact that you CAN:

Write code based on tutorials, and not credit ANYONE without any recourse...

but again, your conscience should tell you otherwise, out of respect to the community I guess...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually, I don''t agree with the approach that "the code is yours if you can sit down and just write it without any references."

There are two problems I see with that:

1. Let''s say I take somebody else''s code and memorize it line by line so that I can reproduce it in my sleep. Can I say the code is mine? No.

2. I, personally, write code and forget about it right away. I guess I am impaired like that. I *always* need my design doc and the UML diagram and the API documentation, just to keep things straight. I normally comment every single class and every single function, so that I could run doxygen on my source to generate the API. And I do so after I write every function, because otherwise I just forget what I called this function or what I called that function. Does that mean the code I write is not mine? Ummm, nope, unless we get into the whole paradigm where code doesn''t belong to anyone... But that''s a whole different story.

----------

Now, when can you say that code is yours then? Well, I''d say when you can honestly say to yourself: I wrote that. I know, circular definition really. But I think it is such a subjective matter, that self-judgement* is the way to go. If saying it is yours "feels" right, then it is right. But citing any sources you referenced never hurt. My code, at least, is full of comments like: "This algorithm was taken, with modifications, from tutorial such-and-such" or "This class structure was inspired by one described in book such-and-such"... Hope that helps.

* Sorry, I am not sure that is the correct word... Self-assesment, maybe?

Share this post


Link to post
Share on other sites
just wondering

why i should rewrite something if i already understood it? wont it waste my time?

i can simply tell where i learnt this from and sleep well.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!