Hi guys. I want to ask you one thing: do you use someones code? I mean, you need some feature(s) etc. And there's magically some library you coud use, with these features. What would you do: use it or write your own code ?
I heard "do not bash open doors" but ... I feel uneasy when I use someones code (I mean, it's open source and I'm allowed to do so!). How about you? Thanks for replies
This post has been edited by k0b13r: 16 June 2009 - 03:47 PM
Well when I am developing my own program (on my own) I try to avoid copy/pasting others' code to the maximum. Simply because I just don't feel good about that. For me it is interesting to solve the problem usign the standard tools and libraries in this case.
On the other side, when you are working in a team, you will be using other people's code on a daily basis.
Using other people's code is not such a bad thing if you are using this code legally. The problem is that when you just import other people's code you rarely learn more about that one specific task you imported code for.
Thanks for reply This was strictly a 'solo coding' question Without any team, and nothing really serious. Just little program(s) for fun or little help I see I'm not only one with 'copy&paste' problem, that's good
I use other peoples code all the time... you think I am going to reinvent Spring or Struts or Jython? It is a bit ridiculous yo count out well established libraries.
Now if we exclude well established libraries I have to say that I am not much of a copy-paster but I will peek at other projects or look at examples on MSDN or code from algorithm libraries. Often I will copy these over but then need to edit them to fit the context of my problem.
Outside of a well established library I never use any code that I don't understand completely and made my own (even if some of the variable names remained the same). But like I said, I do leverage well established libraries where possible -- and if you don't, I tip my hat to you -- and think your really missing out.
I have tried using other people's code. 95% of the time, I end up having to tear it apart and re-write it to make it work the way I need it to. As a result, I have come to discover that 95% of the time, it's easier to just write it myself and be done with it.
A novice was trying to fix a broken Lisp machine by turning the power off and on.
Knight, seeing what the student was doing, spoke sternly: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."
Knight turned the machine off and on.
The machine worked.
Will I copy+paste example code? Well yes, but only if I understand it. Like others have said, example code rarely "just fits" into whatever project I'm working on and I'd have a hard time tweaking it to my needs if I don't understand it.
I also don't mind using established libraries if I want to finish the larger project more than I want to learn how to do whatever the library accomplishes by doing it myself. In those cases I usually won't dive into the inner workings of the library any more than I need too.
Its really how you use the code. If its the whole code then its not really your stuff. Anyway, what benefit will you get if you just use the code and not understand it. If you understand it, its really just a code ready to be used, not "someones" code.