The use of existing code for creating new software.

learn more… | top users | synonyms

31
votes
15answers
2k views

Does heavy library and code snippet usage make you a bad programmer?

Overall I'm in programming for about 8 years now and it seems to me that I'm relying more and more on open source libraries and snippets (damn you GitHub!) to "get the job done". I know that in time I ...
10
votes
7answers
917 views

Rule of thumb for cost vs. savings for code re-use [duplicate]

Is it a good rule of thumb to always write code for the intent of re-using it somewhere down the road? Or, depending on the size of the component you are writing, is it better practice to design it ...
86
votes
12answers
5k views

Best practices for sharing tiny snippets of code across projects

I always try to follow the DRY principle strictly at work; every time I've repeated code out of laziness it bites back later when I need to maintain that code in two places. But often I write small ...
22
votes
7answers
1k views

Does software reuse preclude process repeatability

The Problem - Code Reuse I was thinking about this question on software delivery, and I kept coming back to the issue of repeatability and / or reproducibility. They matter, because if you don’t ...
15
votes
7answers
547 views

How do you structure your shared code so that it is “re-findable” for new developers? [duplicate]

I started working at my current job about 8 months ago, and its been one of the best experiences I've had as a young programmer. It's a small company, and both my co-developers are brilliant guys. ...
29
votes
16answers
2k views

Do you have your own 'misc utils' library? What part are you most proud of? [closed]

I know that many of us maintain our own little personal library with tools and utilities that we use often. I've had mine since I was 16 years old so it has grown to quite a considerable size. Some ...
32
votes
5answers
2k views

Are there any actual case studies on rewrites of software success/failure rates?

I've seen multiple posts about rewrites of applications being bad, people's experiences about it here on Programmers, and an article I've ready by Joel Spolsky on the subject, but no hard evidence or ...
15
votes
9answers
929 views

How to promote code reuse and documentation? [closed]

As a team lead of about 10+ developers, I would want to promote code reuse. We have written a lot of code-- a lot of them are repetitive over the past few years. The problem now is that a lot of these ...
6
votes
7answers
756 views

How can I promote software reuse in a large company? [duplicate]

Take a large company, formed through many iterations of mergers and reorganizations. This company produces lots of different products that are all targeted to a specific industry. Most products share ...
2
votes
2answers
234 views

How to avoid code duplication across unrelated projects [duplicate]

I'm a contractor at a large Telco where I'm usually working on several different projects at once. The VCSs I use (mainly git and mercurial) tend to make me keep the code bases for unrelated ...
0
votes
1answer
190 views

How to reuse c++ code? [closed]

How do I call functions defined outside a source file given you shouldn't use header files? -- EDIT: generic(?) question below So, first, a problem should be broken down into simpler subproblems. ...
33
votes
4answers
4k views

What did Rich Hickey mean when he said, “All that specificity [of interfaces/classes/types] kills your reuse!”

In Rich Hickey's thought-provoking goto conference keynote "The Value of Values" at 29 minutes he's talking about the overhead of a language like Java and makes a statement like, "All those interfaces ...
43
votes
8answers
5k views

Why shouldn't classes be designed to be “open”?

When reading various Stack Overflow questions and others' code the general consensus of how to design classes is closed. This means that by default in Java and C# everything is private, fields are ...
42
votes
7answers
3k views

How do you keep track of what classes and functions your team has written?

When working on code, I face many of the same challenges that my teammates do, and I have written some helpful functions and classes, and so have they. If there is good communication, I'll hear about ...
26
votes
11answers
2k views

Is it wrong to take code you have produced at work and re-use it for personal projects?

Throughout my various workplaces and through my university life I always wrote code which I thought "this would be really useful in generic situations". Indeed, I intentionally write code, even if it ...
6
votes
5answers
533 views

Successful Common Code Libraries

Are there any processes, guidelines or best practices that can be followed for the successful implementation of a common code libraries. Currently we are discussing the implementation of common code ...
12
votes
3answers
453 views

Is there a software engineering principle that relates reuse and regression test cost on a production system?

I've worked on a large financial transaction system for a bank that looked after Pensions and Investments. After 15 years of feature changes, the manual regression test cost had climbed to $200K per ...
4
votes
6answers
719 views

When is a 'core' library a bad idea?

When developing software, I often have a centralised 'core' library containing handy code that can be shared and referenced by different projects. Examples: a set of functions to manipulate strings ...
15
votes
11answers
776 views

Have objects delivered in terms of code reuse?

I have often heard it said that objects have not delivered in terms of code reuse. Do you agree? If you believe that they haven't, why not?
8
votes
8answers
586 views

What counts as reinventing the wheel?

Do the following scenarios count as "reinventing the wheel" in your book? A solution exists, but not in the language you want to use, and existing solutions can't be interfaced with the language you ...
6
votes
7answers
1k views

What exactly is OO reuse?

And why is it often talked about? Like I know what OO programming is obviously... but people always say "Oh OO reuse is the biggest programming myth ever". What exactly does this mean?
4
votes
3answers
245 views

How to avoid programmers duplicating code [duplicate]

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, ...
1
vote
1answer
2k views

How to save useful code snippets? [duplicate]

I do a lot of web development and there are many code snippets that come up again and again so I dive back into the most recent project where I used it which isn't that efficient. How do you store ...
6
votes
6answers
294 views

Should I keep writing my own code, or get in the habit of RE-USING [closed]

this is a general question about programming, I hate using other people's code and I find myself coding things in my own way, even the simplest things like a web template, a PHP calendar, or a news ...
2
votes
5answers
818 views

How to turn on/off code modules?

I am trying to run multiple sites using single code base and code base consist of the following module (i.e. classes) User module Q & A module Faq module and each class works on MVC pattern ...