Guilty or not?

Yes, the big old question: when being "inspired" from tutorial code, is it legit to keep it and to anchor it into your project forever? Or is this considered stealing in some way? Surely, I have a personal guilt about this. I simply cannot live with just imitating someone else's ideas.

Now... I have come to some point where I see the impossibility to change something. I mean, let's take a very basic class, like a point, or maybe a tile. It has an int x and an int y. that's it. There is simply no other way. It is absolutely logical and I would have named it the same way. That goes for other classes too. This was driving me crazy, so I tried to work on my own code. And voilà, it worked. It took me some nerves and several tries and complete class rewrites, but in the end, I have learned more than by just copying. Even though I have the impression, the other code is still better in performance, I am happy to have created an own logic. Plus, with each class I write on my own, my understanding for the language and the game logic increases, allowing further derivations from available code.

Phew.. that confession eased my mind. How do you people go about this? Do you even let yourself inspire by someone else's code or are you all so talented that you come up with your own stuff in the very first second?

2 thoughts on “Guilty or not?

  1. Don’t think there are so many programmers who are ‘so talented’ as you describe; myself included. The way you seem to be going you will be ahead of 80% of programmers in 12 months. What I mean is, if you have the drive and the desire (many programmers just code ‘for a living’) then you will probably become better than those who don’t really care.

    As far as ‘stealing’ someone’s code: most tutorials specifically state you can freely use the code, or not. With open source, just check the type of licence and make sure you comply. I wouldn’t hesitate to use someone’s code if I thought it was good, either as-is or modified to suit myself. On the other hand someone who’s starting out should probably try and ‘re-invent the wheel’ at least once to get the experience. I don’t find myself writing too many ‘linked-list’ classes these days, but I used to 🙂

  2. Tutorial code by the very fact that it’s being released to help someone learn a programming language is implied to be something that people are encouraged to use and reuse. Personally, if it’s something simple I have no problems using it verbatim. It it’s large and complex then I normally modify it to the point where it almost doesn’t resemble the original code.

    I do, however give credit to the original author if I use their code.

Leave a Reply

Your email address will not be published. Required fields are marked *