Is it normal to re-use code?

by 16 replies
19
I am curious about developers in the field and if most of their code is written by them or is it normal for developers to re-use old code and enhance it to meet their needs?

I'm just wondering because what I've been doing for awhile now is just re-using past code from previous projects to complete current once but editing them to meet my needs.
#programming #code #normal #reuse
  • I do this often. The code i am re-using is my code but i usually reuse it if i need to to do the same task, no point in rewritting it.

    A lot of developers do this. It is called "Snippets". You have snippets of code that you can re-use at anytime. This is code that you typically will use in each and every project.
    • [1] reply
    • Yeah it is totally normal.l Work smart not hard
      • [2] replies
  • writing clear and maintainable code so that it can be reused is the way to go

    you can complete projects faster that way
  • I use the same code across projects all the time, I mostly do it in a form of classes and make them as generic as possible without being tied to a particular project. When developing in wordpress I already have it as plugin to include all these classes. This way you re-use and the efficiency is better because your functions need to be generic and work across all the sites. Hope this helps.
  • Hi, yes mostly people re-use their code and i am also use because it makes our work easy also save our time too
  • Yes Of-course that's the way to save time and improve productivity!
    Even in same program with the help of functions we reuse the same code as many time we want just by calling them.
  • It is very common. Not just normal. What is the point in inventing a block of code when you can re-use perfectly good example from your own work or another persons.
  • without examples and copy/paste code I would have never learned the little that I know ... without reusing code you would not be able to use answers from other people ..

    so yes, normal and sometimes it's even recommended because some problems require smart solutions, and smart solutions don't just grow in your head all the time .
  • There's absolutely nothing wrong about reusing codes, in fact it's not a bad thing at all. I'm using that method and mix it up with my own set of codes, it saves me a lot of time doing so. Ofcourse you should understand what you are reusing, learn from it, play with it and then apply it to some more of your projects that you are gonna be doing.

    Personally, it doesn't matter on how you write the codes, it's all on how your program works and thats all that matters.
  • Yes it is working normal. The reuse code is not showing error in the program.You can easily reuse the all types of code .
  • i am also use this code because our work easy also save our time
    thanx....>
    translation services uk

Next Topics on Trending Feed

  • 19

    I am curious about developers in the field and if most of their code is written by them or is it normal for developers to re-use old code and enhance it to meet their needs? I'm just wondering because what I've been doing for awhile now is just re-using past code from previous projects to complete current once but editing them to meet my needs.