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?