Question

so this might be a weird question, and it might be better to ask a psychologist but i thought since they probably wouldn't know much about programming, i could ask you guys. So i have an assignment and it asks me to solve a problem using an algorithm. So i finish the problem and then usually look online for better algorithms and see how people did theirs. But i was working on a problem that i had solved to about maybe 50%, but then i ran into a wall.

So i looked online and found this great algorithm, i want to use it (i have already implemented it) but i feel a bit jealous and guilty that i couldn't think of a way to solve it and like i have done something wrong. I will obviously cite where i got the algorithm from, so i'm not cheating. How should i view something like this, try to what i learned from the algorithm and try to apply it in the future? Do you guys ever feel like oh i copied it and i was unable to think about it on my own. I have like an ocd about this stuff. Thanks for any help and support

Was it helpful?

Solution

Consider this: if you had to always start from scratch and reinvent everything someone else figured out before you you'd still be sitting in a cave, hunt and gather plants for food - you get the picture.

Someone else invented the computer but you don't feel guilty about that, do you? There are a number of algorithms out there that are very fundamental and you use them even when you don't realize it - searching, sorting, memory management etc.

Copying is progress, it gives you the time to solve the new problems and someone else may end up copying your solutions if they are good.

...

However to get good you have to grunt through the basics and really get them. And blatantly copying won't give any better of a clue how to come up with your own. On top of that copying may be illegal - if a certain algorithm is protected by a patent for example.

My take is to use your better judgement and don't be too shy to copy but make sure you really understand what you're copying and strive to better yourself so that eventually others find you worth copying.

OTHER TIPS

Referring to algorithms from the internet is obviously not cheating. B'coz that is the reason why a noble guy has uploaded it. You should be certain that you would not always be able to think the best algorithm even if you have the right knowledge. Algorithms are like art and it comes the best when you are in the right state of mind... Hence don't worry and enjoy programming.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top