Basically I’m new to network programming in Python, so I went on a tutorial online to find out about it. Using what was taught in the tutorial (creating a socket, connecting to ports, etc), I modified the code so that I made a program where two computers can send messages to one another.
If I were to apply for a job and show this to my interviewers, would the code for it technically be mine? It is fair to say that I didn’t modify the code by that much; However, what if for example I modified it into something like a tic-tac-toe game, where two users play each other from different PCs, would the code then be mine? I just don’t want to look like a plagiarizer hence why I ask.
3
No.
But you can claim that you modified the code so that you made a program where two computers can send messages to one another. Or you can claim that you modified it into something like a tic-tac-toe game, where two users play each other from different PC’s.
Just truthfully represent the amount of work that you put into it. You can’t claim ownership of some project on the Internet if others did part of the work.
I’d go with the classic line “it depends”.
As you already say that you didn’t modify it much, i’m fully on Roberts side. It’s not your project.
But on the other side: We developers all like to discuss, research and sometimes copy-paste for our projects. Fiddeling around with other peoples code is pretty common. If you modify it a lot, put some effort in it, providing new features or a different approach on the problem, then it’s your code.
Just stick to the truth about the amount of work you did truly by yourself and i’m sure no one will call you a plagiarizer.
If what you did was modify someone’s code to do something you wanted then it would be dishonest to claim that you code was “yours”. Rather, it is a program you created based on existing code.
Now you may have noticed that many programmers use other peoples code. All the time. Libraries and APIs are essentially a formalized way to use code that someone created in your own project. While what you did was not the same as using a library or API, it has the same effect.
In the case of the simple P2P program you can claim that you wrote a messaging application that utilizes another programmers implementation of simple web protocols. You can go ahead and call it your program, you should just give credit to whoever wrote the borrowed parts. And it would be best to add comments to the code citing the source, so other can find it if need be.
And in the case of the game, you wrote a game. You can claim this as your code. This game then utilizes a set of functions that you got from another source to enable multiplayer functionality. Again, you should probably site the source of that code at least in comments in your code. However in this situation you can probably get away with not explicitly telling this to others outside of the code, as you really did write the game.
Many developers rely on libraries to deal with some of the more complex problems they face. Things like network protocols, graphics, and advanced math are used by many people, so there are libraries that do all those things vary well. Utilizing this kind of code is not only completely acceptable, but also normal.
If you say “this is a IM client” or “this is a video game” nobody is going to be surprised if the network code is from a third party. Just don’t claim that you are the sole author of all parts of the code, and you should be fine.
However you should look into another possibility: Is the code in question protected by any terms of use? To this point I have been talking about code that is made available either with no terms, or very open terms. However if the author has some more specific terms follow them. If they only intended the code o be for educational purposes, than using it in any capacity beyond that is not okay. There are all kinds of limitations they may place on that code, so be careful about how you use it.
2