9 Replies - 1747 Views - Last Post: 30 June 2009 - 10:46 PM

#1 k0b13r  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 15
  • View blog
  • Posts: 243
  • Joined: 18-July 06

Using someones code

Posted 16 June 2009 - 03:42 PM

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


Is This A Good Question/Topic? 0
  • +

Replies To: Using someones code

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 773
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: Using someones code

Posted 16 June 2009 - 03:50 PM

Moved to Corner Cubicle.

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.
Was This Post Helpful? 0
  • +
  • -

#3 k0b13r  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 15
  • View blog
  • Posts: 243
  • Joined: 18-July 06

Re: Using someones code

Posted 16 June 2009 - 04:11 PM

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 :D
Was This Post Helpful? 0
  • +
  • -

#4 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 610
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Using someones code

Posted 16 June 2009 - 05:43 PM

It depends on said code's licensing, the project at hand, the quality of the code, et al.

If I find a suitable library that does what I need, and saves me from writing the code, I'll likely use it. I tend to write my own stuff, because the more I write the more I learn.
Was This Post Helpful? 0
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2247
  • View blog
  • Posts: 9,237
  • Joined: 18-February 07

Re: Using someones code

Posted 16 June 2009 - 07:13 PM

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.
Was This Post Helpful? 0
  • +
  • -

#6 no2pencil  Icon User is online

  • Head MFIC
  • member icon

Reputation: 5066
  • View blog
  • Posts: 26,449
  • Joined: 10-May 07

Re: Using someones code

Posted 16 June 2009 - 07:14 PM

I've used This Tutorial twice... it rocks! :D :^:
Was This Post Helpful? 0
  • +
  • -

#7 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 5755
  • View blog
  • Posts: 10,078
  • Joined: 28-September 07

Re: Using someones code

Posted 16 June 2009 - 08:22 PM

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.
Was This Post Helpful? 0
  • +
  • -

#8 5thWall  Icon User is offline

  • Occasional Member

Reputation: 31
  • View blog
  • Posts: 529
  • Joined: 17-September 08

Re: Using someones code

Posted 27 June 2009 - 11:05 PM

Quote

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.
Was This Post Helpful? 0
  • +
  • -

#9 LegalBreaker  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 35
  • Joined: 25-June 09

Re: Using someones code

Posted 30 June 2009 - 08:38 PM

I would rather write my own library than use someone else's. It gives me more satisfaction personally.
Was This Post Helpful? 0
  • +
  • -

#10 firebolt  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 5,561
  • Joined: 20-February 09

Re: Using someones code

Posted 30 June 2009 - 10:46 PM

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1